Skip to content

Commit 4f520d1

Browse files
fix: eslint complains
Signed-off-by: Carlos Feria <[email protected]>
1 parent 8011db0 commit 4f520d1

File tree

6 files changed

+34
-21
lines changed

6 files changed

+34
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ npm run start
5858
| --------------- | ----------------------------- | -------------------------------------- |
5959
| MOCK | Enables or disables mock data | `off` |
6060
| AUTH_REQUIRED | Enable/Disable authentication | false |
61-
| CONSOLE_API_URL | Enable/Disable authentication | http://localhost:8080 |
61+
| CONSOLE_API_URL | Set Console API URL | http://localhost:8080 |
6262
| OIDC_CLIENT_ID | Set Oidc Client | frontend |
6363
| OIDC_SERVER_URL | Set Oidc Server URL | `http://localhost:8090/realms/console` |
6464
| OIDC_SCOPE | Set Oidc Scope | openid |

e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"clean:all": "rimraf ./dist ./node_modules",
88
"lint": "eslint .",
99
"lint:fix": "eslint . --fix",
10-
"format": "prettier --check './src/**/*.{ts,tsx,js,json}'",
11-
"format:fix": "prettier --write './src/**/*.{ts,tsx,js,json}'",
10+
"format": "prettier --check './tests/**/*.{ts,tsx,js,json}'",
11+
"format:fix": "prettier --write './tests/**/*.{ts,tsx,js,json}'",
1212
"test": "npx playwright test --project='chromium'",
1313
"test:trace": "npx playwright test --project='chromium' --trace on",
1414
"test:ui:host": "npx playwright test --ui-host 127.0.0.1"

e2e/playwright.config.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig, devices } from '@playwright/test';
1+
import { defineConfig, devices } from "@playwright/test";
22

33
/**
44
* Read environment variables from file.
@@ -16,7 +16,7 @@ const DESKTOP_CONFIG = {
1616
* See https://playwright.dev/docs/test-configuration.
1717
*/
1818
export default defineConfig({
19-
testDir: './tests',
19+
testDir: "./tests",
2020
/* Run tests in files in parallel */
2121
fullyParallel: true,
2222
/* Fail the build on CI if you accidentally left test.only in the source code. */
@@ -26,14 +26,14 @@ export default defineConfig({
2626
/* Opt out of parallel tests on CI. */
2727
workers: process.env.CI ? 1 : undefined,
2828
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
29-
reporter: 'html',
29+
reporter: "html",
3030
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
3131
use: {
3232
/* Base URL to use in actions like `await page.goto('')`. */
3333
baseURL: process.env.CONSOLE_UI_URL ?? "http://localhost:3000/",
3434

3535
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
36-
trace: 'on-first-retry',
36+
trace: "on-first-retry",
3737

3838
// Capture screenshot after each test failure.
3939
screenshot: "only-on-failure",
@@ -43,18 +43,18 @@ export default defineConfig({
4343
/* Configure projects for major browsers */
4444
projects: [
4545
{
46-
name: 'chromium',
47-
use: { ...devices['Desktop Chrome'], ...DESKTOP_CONFIG },
46+
name: "chromium",
47+
use: { ...devices["Desktop Chrome"], ...DESKTOP_CONFIG },
4848
},
4949

5050
{
51-
name: 'firefox',
52-
use: { ...devices['Desktop Firefox'], ...DESKTOP_CONFIG },
51+
name: "firefox",
52+
use: { ...devices["Desktop Firefox"], ...DESKTOP_CONFIG },
5353
},
5454

5555
{
56-
name: 'webkit',
57-
use: { ...devices['Desktop Safari'], ...DESKTOP_CONFIG },
56+
name: "webkit",
57+
use: { ...devices["Desktop Safari"], ...DESKTOP_CONFIG },
5858
},
5959

6060
/* Test against mobile viewports. */

e2e/tests/example.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { test, expect } from '@playwright/test';
1+
import { test, expect } from "@playwright/test";
22

3-
test('has title', async ({ page }) => {
4-
await page.goto('https://playwright.dev/');
3+
test("has title", async ({ page }) => {
4+
await page.goto("https://playwright.dev/");
55

66
// Expect a title "to contain" a substring.
77
await expect(page).toHaveTitle(/Playwright/);
88
});
99

10-
test('get started link', async ({ page }) => {
11-
await page.goto('https://playwright.dev/');
10+
test("get started link", async ({ page }) => {
11+
await page.goto("https://playwright.dev/");
1212

1313
// Click the get started link.
14-
await page.getByRole('link', { name: 'Get started' }).click();
14+
await page.getByRole("link", { name: "Get started" }).click();
1515

1616
// Expects page to have a heading with the name of Installation.
17-
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
17+
await expect(page.getByRole("heading", { name: "Installation" })).toBeVisible();
1818
});

e2e/tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"lib": ["ES2022", "DOM"],
6+
"strict": true,
7+
"esModuleInterop": true,
8+
"moduleResolution": "bundler",
9+
"types": ["playwright", "node"]
10+
},
11+
"include": ["playwright.config.ts", "tests/**/*"],
12+
"exclude": ["node_modules"]
13+
}

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default tseslint.config([
2525
ecmaVersion: 2020,
2626
globals: globals.browser,
2727
parserOptions: {
28-
project: ["./common/tsconfig.json", "./client/tsconfig.node.json", "./client/tsconfig.app.json"],
28+
project: ["./common/tsconfig.json", "./client/tsconfig.node.json", "./client/tsconfig.app.json", "./e2e/tsconfig.json"],
2929
tsconfigRootDir: import.meta.dirname,
3030
},
3131
},

0 commit comments

Comments
 (0)