Skip to content

Commit 0b9e4e3

Browse files
committed
move config and fix tsconfig error
1 parent b4a66a7 commit 0b9e4e3

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
## VS Code CodeQL E2E Tests
22

3-
When running the tests locally on a mac a different processor has to be emulated, which makes everythign VERY slow. Hence many timeouts in the test.
3+
When running the tests locally on a mac a different processor has to be emulated, which makes everythign VERY slow. Therefore we need to add higher timeouts in the test, so that they pass locally.
44

55
### How to use locally
66

77
Setup
88

9-
- run `docker-compose build` from the e2e test folder `vscode-codeql/extensions/ql-vscode/test/e2e`
10-
- run `docker-compose up` from the e2e test folder `vscode-codeql/extensions/ql-vscode/test/e2e`
9+
- go to the e2e test folder on your terminal
10+
- run `docker-compose build`
11+
- run `docker-compose up`
1112

1213
Run tests
1314

14-
- run `npx playwright test --ui` from the vscode-codeql folder `vscode-codeql/extensions/ql-vscode` to follow the test while it's running. This UI has a 'locator' tool with which elements on the test screen can be
15+
- run `npx playwright test --ui` from the e2e test folder to follow the test while it's running. This UI has a 'locator' tool with which elements on the test screen can be found
1516
- use `npx playwright test --debug` to follow the test in real time and interact with the interface, e.g. press enter or input into fields, stop and start
1617

17-
If you get failures after the first test run you can try to remove the volume data, e.g. by running `docker-compose down -v`. Sometimes already existing queries from former runs change the input the extension needs.
18+
During the test elements are created in the docker volume, e.g. the downloaded database or query data. This might interfer with other tests or when running a test twice. If that happens restart your docker volume by using `docker-compose down -v` and `docker-compose up`. Sometimes already existing queries from former runs change the input the extension needs.

extensions/ql-vscode/playwright.config.ts renamed to extensions/ql-vscode/test/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { defineConfig, devices } from "@playwright/test";
1010
* See https://playwright.dev/docs/test-configuration.
1111
*/
1212
export default defineConfig({
13-
testDir: "./test/e2e",
13+
testDir: ".",
1414

1515
timeout: 5 * 60 * 1000,
1616
/* Run tests in files in parallel */

extensions/ql-vscode/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
"noEmit": true
2525
},
2626
"include": ["src/**/*.ts"],
27-
"exclude": ["node_modules", "test", "**/view"]
27+
"exclude": ["node_modules", "*.config.ts", "test", "**/view"]
2828
}

0 commit comments

Comments
 (0)