refactor: 💡 Fix linting errors in e2e (#2563)
This commit is contained in:
1 parent
7e56e1cccf
commit
6e71712092
8 files changed
+627
-59
No files matched your search
@@ -4,10 +4,7 @@
|
||||
*/
|
||||
|
||||
import { test } from '../playwright.config.js';
|
||||
import { expect } from '@playwright/test';
|
||||
import { execSync } from 'child_process';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { readFile } from 'fs/promises';
|
||||
|
||||
import { authenticatedState } from '../global-setup.js';
|
||||
import {
|
||||
|
||||
@@ -143,7 +143,7 @@ test('Vault Credential Store (User & Key Pair) @ce @aws @docker', async ({
|
||||
const keyData = await readFile(sshKeyPath, {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
if (keyData != retrievedKey) {
|
||||
if (keyData !== retrievedKey) {
|
||||
throw new Error('Stored Key does not match');
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
import { test } from '../playwright.config.js';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { authenticatedState } from '../global-setup.js';
|
||||
import {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
import { test } from '../playwright.config.js';
|
||||
import { expect } from '@playwright/test';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
import { authenticatedState } from '../global-setup.js';
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
import { test } from '../playwright.config.js';
|
||||
import { expect } from '@playwright/test';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
import { authenticatedState } from '../global-setup.js';
|
||||
|
||||
@@ -37,9 +37,9 @@ test('Worker Tags @ce @ent @aws @docker', async ({ page }) => {
|
||||
.getByRole('columnheader')
|
||||
.nth(i)
|
||||
.innerText();
|
||||
if (header == 'Worker') {
|
||||
if (header === 'Worker') {
|
||||
workerListWorkerIndex = i;
|
||||
} else if (header == 'Tags') {
|
||||
} else if (header === 'Tags') {
|
||||
workerListTagIndex = i;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,6 @@ test('Worker Tags @ce @ent @aws @docker', async ({ page }) => {
|
||||
.getByRole('table')
|
||||
.getByRole('columnheader')
|
||||
.count();
|
||||
let dialogTagIndex;
|
||||
let dialogTypeIndex;
|
||||
for (let i = 0; i < dialogHeadersCount; i++) {
|
||||
const header = await page
|
||||
@@ -67,9 +66,7 @@ test('Worker Tags @ce @ent @aws @docker', async ({ page }) => {
|
||||
.getByRole('columnheader')
|
||||
.nth(i)
|
||||
.innerText();
|
||||
if (header == 'Tag') {
|
||||
dialogTagIndex = i;
|
||||
} else if (header == 'Type') {
|
||||
if (header === 'Type') {
|
||||
dialogTypeIndex = i;
|
||||
}
|
||||
}
|
||||
@@ -142,8 +139,6 @@ test('Worker Tags @ce @ent @aws @docker', async ({ page }) => {
|
||||
.getByRole('table')
|
||||
.getByRole('columnheader')
|
||||
.count();
|
||||
let workerDetailsKeyIndex;
|
||||
let workerDetailsValueIndex;
|
||||
let workerDetailsTypeIndex;
|
||||
for (let i = 0; i < workerDetailsHeadersCount; i++) {
|
||||
const header = await page
|
||||
@@ -151,11 +146,7 @@ test('Worker Tags @ce @ent @aws @docker', async ({ page }) => {
|
||||
.getByRole('columnheader')
|
||||
.nth(i)
|
||||
.innerText();
|
||||
if (header == 'Key') {
|
||||
workerDetailsKeyIndex = i;
|
||||
} else if (header == 'Value') {
|
||||
workerDetailsValueIndex = i;
|
||||
} else if (header == 'Type') {
|
||||
if (header === 'Type') {
|
||||
workerDetailsTypeIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,13 +22,14 @@
|
||||
"admin:dev:firefox": "yarn run admin --project=firefox --headed",
|
||||
"admin:dev:safari": "yarn run admin --project=webkit --headed",
|
||||
"desktop": "yarn workspace desktop build && yarn run desktop:dev",
|
||||
"desktop:dev": "npx playwright test --config desktop/playwright.config.js --reporter=html"
|
||||
"desktop:dev": "yarn playwright test --config desktop/playwright.config.js --reporter=html"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.21.3",
|
||||
"@playwright/test": "^1.43.0",
|
||||
"concurrently": "^9.1.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"eslint": "^8.54.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-n": "^16.3.1",
|
||||
|
||||
Reference in new issue
Block a user