Skip to content

Commit

Permalink
make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
wleightond committed Jun 13, 2024
1 parent 6b3b80b commit 23f02f2
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/canary-tokens.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Token Tests', () => {
{ name: 'Azure Entra ID login', extraFields: null },
{ name: 'Fast redirect', extraFields: () => cy.get('#redirect_url').type('www.google.pt') },
{ name: 'Slow redirect', extraFields: () => cy.get('#redirect_url').type('www.google.pt') },
{ name: 'Sensitive command', extraFields: () => cy.get('#cmd_process').type('test.exe') },
{ name: 'Sensitive command', extraFields: () => cy.get('#cmd_process').type('test.exe') },
{ name: 'Web image',
extraFields: () => {
cy.get('input[type="file"]').selectFile('cypress/fixtures/logo.png', { force: true })
Expand All @@ -42,7 +42,7 @@ describe('Token Tests', () => {
cy.visit('https://ssl-srv72.net/nest/')

cy.contains(item.name).click()

cy.get('#1__slide').click()
// Take a screenshot for the initial state
cy.screenshot(`snapshots/${item.name.toLowerCase().replace(/ /g, '_')}/not_filled`, { clip: { x: 0, y: 0, width: 890, height: 640 } })
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('Token Tests', () => {
// Click on 'Manage Token' and take a screenshot
cy.contains('Manage Token').click()
cy.screenshot(`snapshots/${item.name.toLowerCase().replace(/ /g, '_')}/manage_token`, { clip: { x: 0, y: 0, width: 890, height: 640 } })

// Click on 'Token History' and take a screenshot
cy.contains('Token History').click()
cy.screenshot(`snapshots/${item.name.toLowerCase().replace(/ /g, '_')}/token_history`, { clip: { x: 0, y: 0, width: 890, height: 640 } })
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
2 changes: 1 addition & 1 deletion cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './commands'
import './commands'
2 changes: 1 addition & 1 deletion frontend_vue/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"singleQuote": true,
"singleAttributePerLine":true,
"printWidth": 80
}
}
12 changes: 6 additions & 6 deletions frontend_vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ For the component of the app to work together, every token name should be aligne
i.e. the Clode Site, will be always referenced as ```clonedsite```, as per backend documentation.

### Add a constant and token service
1. Define a constant in the TOKENS_TYPE list to reference the token name.
1. Define a constant in the TOKENS_TYPE list to reference the token name.

This constant will be used throughout the dynamic imports. For example, for the Cloned Site token, add the following constant:

Expand All @@ -87,10 +87,10 @@ export const TOKENS_TYPE = {
};
```

2. Add the UI elements in tokenServices.ts
2. Add the UI elements in tokenServices.ts

- Upload the icon for the token to the ```assets/token_icons``` directory.

- Make sure the icon filename matches the backend-provided name.


Expand All @@ -108,9 +108,9 @@ i.e. for ClonedSite
```
---

### Token's folder
### Token's folder

Add a folder inside components/tokens
Add a folder inside components/tokens
> Name it as the backend provided token's name
#### The folder should contain the following files:
Expand All @@ -122,7 +122,7 @@ Add a folder inside components/tokens
├── howToUse.ts # Array of suggestions
├── ManageToken # Component included in the ManageToken page
├── TokenDisplay # Displayer for token snippet/url/png/download/etc

#### ActivatedToken.vue
- Displays the `TokenDisplay` component along with additional instructions for the user if needed.

Expand Down
Binary file modified frontend_vue/src/assets/logo_footer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<!--
hidden field for expected_referrer
doesn't require user input
<!--
hidden field for expected_referrer
doesn't require user input
-->
<BaseFormTextField
id="expected_referrer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export default function generateMysqlToken(
`SET @bb = CONCAT(\"CHANGE MASTER TO MASTER_PASSWORD='my-secret-pw', MASTER_RETRY_COUNT=1, MASTER_PORT=3306, MASTER_HOST='${hostname}', MASTER_USER='${token}\", @@lc_time_names, @@hostname, \"';\"`
);
const code = encoded
? `SET @b = ${encodedCode};
? `SET @b = ${encodedCode};
SET @s2 = FROM_BASE64(@b);
PREPARE stmt1 FROM @s2;
EXECUTE stmt1;
PREPARE stmt2 FROM @bb;
EXECUTE stmt2;
START REPLICA;`
: `${decodedCode};
: `${decodedCode};
PREPARE stmt FROM @bb;
EXECUTE stmt;
START REPLICA;`;
Expand Down
2 changes: 1 addition & 1 deletion frontend_vue/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ p {
animation: none !important;
transition: none !important;
}
}
}
2 changes: 1 addition & 1 deletion frontend_vue/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
'700': 'hsl(158, 8%, 26%)',
'800': 'hsl(160, 8%, 22%)',
'900': 'hsl(154, 7%, 19%)',
'950': 'hsl(168, 10%, 10%)',
'950': 'hsl(168, 10%, 10%)',
},
'yellow': {
'300': 'hsl(36, 100%, 91%)',
Expand Down
2 changes: 1 addition & 1 deletion frontend_vue/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
globals: true,
environment: 'jsdom',
},
resolve: {
resolve: {
alias: {
'@': '/src'
}
Expand Down

0 comments on commit 23f02f2

Please sign in to comment.