From b235769a995c2e09ad2b9e572eee137f6f266538 Mon Sep 17 00:00:00 2001 From: mahula Date: Fri, 21 Nov 2025 14:44:14 +0100 Subject: [PATCH 1/5] set latest node lts version in .tool-versions --- .tool-versions | 1 + 1 file changed, 1 insertion(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..6264dcc --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 24.11.1 \ No newline at end of file From 80ebd6bc862c493a3155ee74bfc46310f826d540 Mon Sep 17 00:00:00 2001 From: mahula Date: Fri, 21 Nov 2025 14:59:22 +0100 Subject: [PATCH 2/5] fix import issue --- cypress/e2e/steps/login.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/steps/login.ts b/cypress/e2e/steps/login.ts index fd4cffd..9fcd85e 100644 --- a/cypress/e2e/steps/login.ts +++ b/cypress/e2e/steps/login.ts @@ -3,8 +3,8 @@ /* eslint-disable import/no-relative-parent-imports */ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor' -import { loginPage } from '../pages/LoginPage' -import { welcomePage } from '../pages/WelcomePage' +import { loginPage } from '../pages/LoginPage.js' +import { welcomePage } from '../pages/WelcomePage.js' Given('The web browser is at the login page', () => { cy.visit('/login') From baf66c4241b3903bbf5853b008b7d17081f0d019 Mon Sep 17 00:00:00 2001 From: mahula Date: Fri, 21 Nov 2025 15:39:55 +0100 Subject: [PATCH 3/5] refactor typescript configuration --- cypress/e2e/steps/login.ts | 4 ++-- cypress/tsconfig.json | 12 +++++++++--- tsconfig.json | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/steps/login.ts b/cypress/e2e/steps/login.ts index 9fcd85e..fd4cffd 100644 --- a/cypress/e2e/steps/login.ts +++ b/cypress/e2e/steps/login.ts @@ -3,8 +3,8 @@ /* eslint-disable import/no-relative-parent-imports */ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor' -import { loginPage } from '../pages/LoginPage.js' -import { welcomePage } from '../pages/WelcomePage.js' +import { loginPage } from '../pages/LoginPage' +import { welcomePage } from '../pages/WelcomePage' Given('The web browser is at the login page', () => { cy.visit('/login') diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index b24df79..a757e19 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,8 +1,14 @@ { "compilerOptions": { - "target": "es5", - "lib": ["es5", "dom"], + "target": "ES2022", + "lib": ["ES2022", "dom"], + "module": "ESNext", + "moduleResolution": "node", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, "types": ["cypress", "node"] }, - "include": ["./**/*.ts", ".vuepress/config.ts"] + "include": ["./**/*.ts"], + "exclude": ["node_modules"] } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 0a5ad3b..04a5284 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,9 @@ "module": "nodenext", "lib": ["ES2022", "dom"], "strict": true, + "skipLibCheck": true, "types": ["cypress", "node"] }, "include": ["**/*.ts", ".vuepress/config.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "cypress"] } \ No newline at end of file From 1598d43237b61275d90562e00767fcffe973a18e Mon Sep 17 00:00:00 2001 From: mahula Date: Fri, 21 Nov 2025 15:52:36 +0100 Subject: [PATCH 4/5] a little linting --- cypress/e2e/steps/login.ts | 2 -- eslint.config.cjs | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/steps/login.ts b/cypress/e2e/steps/login.ts index fd4cffd..c8a70c6 100644 --- a/cypress/e2e/steps/login.ts +++ b/cypress/e2e/steps/login.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable import/no-relative-parent-imports */ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor' diff --git a/eslint.config.cjs b/eslint.config.cjs index 405acf3..f9e3722 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -22,7 +22,7 @@ const compat = new FlatCompat({ module.exports = defineConfig([ { - ignores: ['.gitignore', '.github/', '.vuepress/public/', '**/*md', '**/*.json', '**/build/', 'cypress/reports/', 'cypress/screenshots/', 'LICENSE', 'node_modules/'], + ignores: ['.gitignore', '.github/', '.vuepress/public/', '.vuepress/.temp/', '**/*md', '**/*.json', '**/build/', 'cypress/reports/', 'cypress/screenshots/', 'LICENSE', 'node_modules/'], languageOptions: { globals: { @@ -226,6 +226,7 @@ module.exports = defineConfig([ '.gitignore', '.github/', '.vuepress/public/', + '.vuepress/.temp/', '**/*md', '**/*.json', '**/build/', From b1f3ee337d19d47a7644237fee7212aea4c306e0 Mon Sep 17 00:00:00 2001 From: mahula Date: Fri, 21 Nov 2025 15:54:08 +0100 Subject: [PATCH 5/5] usenode version set in .tool-versions for github workflows --- .github/workflows/e2e.run.tests.yml | 8 ++++---- .github/workflows/e2e.test.build.docs.yml | 10 +++++----- .github/workflows/e2e.test.lint.yml | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.run.tests.yml b/.github/workflows/e2e.run.tests.yml index 74cf937..5058651 100644 --- a/.github/workflows/e2e.run.tests.yml +++ b/.github/workflows/e2e.run.tests.yml @@ -7,13 +7,13 @@ jobs: name: Run all E2E tests runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Set Node version uses: actions/setup-node@633bb92bc0aabcae06e8ea93b85aecddd374c402 # v6.0.0 with: - node-version: '>=22.15.0' - - - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + node-version-file: '.tool-versions' - name: E2E - Run all tests id: e2e-run diff --git a/.github/workflows/e2e.test.build.docs.yml b/.github/workflows/e2e.test.build.docs.yml index 2f84bb2..653887a 100644 --- a/.github/workflows/e2e.test.build.docs.yml +++ b/.github/workflows/e2e.test.build.docs.yml @@ -25,13 +25,13 @@ jobs: needs: files-changed runs-on: ubuntu-latest steps: - - name: Set Node version - uses: actions/setup-node@633bb92bc0aabcae06e8ea93b85aecddd374c402 # v6.0.0 - with: - node-version: '>=22.15.0' - - name: Checkout code uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Set Node version + uses: actions/setup-node@633bb92bc0aabcae06e8ea93b85aecddd374c402 # v6.0.0 + with: + node-version-file: '.tool-versions' + - name: E2E Testing | Build Docs run: npm install && npm run docs:build diff --git a/.github/workflows/e2e.test.lint.yml b/.github/workflows/e2e.test.lint.yml index 6a508cd..0dab8c8 100644 --- a/.github/workflows/e2e.test.lint.yml +++ b/.github/workflows/e2e.test.lint.yml @@ -25,13 +25,13 @@ jobs: needs: files-changed runs-on: ubuntu-latest steps: - - name: Set Node version - uses: actions/setup-node@633bb92bc0aabcae06e8ea93b85aecddd374c402 # v6.0.0 - with: - node-version: '>=22.15.0' - - name: Checkout code uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Set Node version + uses: actions/setup-node@633bb92bc0aabcae06e8ea93b85aecddd374c402 # v6.0.0 + with: + node-version-file: '.tool-versions' + - name: E2E files | Lint run: npm install && npm run test:lint:eslint