From 285f0a5e0e13e70bfd8771c99e837c573ccd5bc9 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Fri, 19 Jul 2024 14:35:48 -0600 Subject: [PATCH] add instructions to run tests, and fix linting (for WebStorm) --- README.md | 6 +++++- test-playwright/.eslintrc.js | 16 ++++++++++++++++ test-playwright/create-project.spec.ts | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 test-playwright/.eslintrc.js diff --git a/README.md b/README.md index 2510962b0..1cfdb25be 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ npm run lint * Run the correct build: - * Test + * Staging ``` # (Let's replace this with a .env.development or .env.staging file.) # The test BVC_MEETUPS_PROJECT_CLAIM_ID does not resolve as a URL because it's only in the test DB and the prod redirect won't redirect there. @@ -69,6 +69,10 @@ npm run build ## Tests +### Automated + +`npx playwright test` + ### Register new user on test server On the test server, User #0 has rights to register others, so you can start diff --git a/test-playwright/.eslintrc.js b/test-playwright/.eslintrc.js new file mode 100644 index 000000000..4f8549d0b --- /dev/null +++ b/test-playwright/.eslintrc.js @@ -0,0 +1,16 @@ +module.exports = { + root: true, + parserOptions: { + ecmaVersion: 12, + sourceType: 'module', + requireConfigFile: false, + }, + plugins: [], + rules: { + quotes: [ + 'error', + 'single', + { avoidEscape: true, allowTemplateLiterals: true }, + ], + }, +}; diff --git a/test-playwright/create-project.spec.ts b/test-playwright/create-project.spec.ts index 68177ab9e..cb138df2b 100644 --- a/test-playwright/create-project.spec.ts +++ b/test-playwright/create-project.spec.ts @@ -35,7 +35,7 @@ test('test', async ({ page }) => { await expect(page.getByRole('code')).toContainText('did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F'); // Pause for 5 seconds - await page.waitForTimeout(5000); // I have to wait, otherwise the (+) button to add a new project doesn't appear + await page.waitForTimeout(5000); // I have to wait, otherwise the (+) button to add a new project doesn't appear // Create new project await page.locator('#QuickNav').getByRole('link').nth(2).click();