From 4931ea4b304f42d8bd57b359d353e5a5b840b935 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Fri, 10 Nov 2023 18:54:02 -0800 Subject: [PATCH 1/2] Continue to work on fixing playwright tests (#3970) --- .../dispatch/src/tag/TagFilterAutoComplete.vue | 1 - tests/static/e2e/pages/report-incident-page.ts | 2 +- tests/static/e2e/report-submission.spec.ts | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/dispatch/static/dispatch/src/tag/TagFilterAutoComplete.vue b/src/dispatch/static/dispatch/src/tag/TagFilterAutoComplete.vue index b19a24134ed6..ac5a39bb1c77 100644 --- a/src/dispatch/static/dispatch/src/tag/TagFilterAutoComplete.vue +++ b/src/dispatch/static/dispatch/src/tag/TagFilterAutoComplete.vue @@ -7,7 +7,6 @@ @update:search="getFilteredData()" chips closable-chips - clearable item-title="name" item-value="id" hide-selected diff --git a/tests/static/e2e/pages/report-incident-page.ts b/tests/static/e2e/pages/report-incident-page.ts index e2f1a53ee671..b270b61876dd 100644 --- a/tests/static/e2e/pages/report-incident-page.ts +++ b/tests/static/e2e/pages/report-incident-page.ts @@ -97,7 +97,7 @@ export class ReportIncidentPage { } async resetPageView() { - await this.pageBorder.click() + // await this.pageBorder.click() } async pageObjectModel( diff --git a/tests/static/e2e/report-submission.spec.ts b/tests/static/e2e/report-submission.spec.ts index 00637f96004b..7fa6fe9445c5 100644 --- a/tests/static/e2e/report-submission.spec.ts +++ b/tests/static/e2e/report-submission.spec.ts @@ -18,13 +18,13 @@ test.describe("Authenticated Dispatch App", () => { await reportIncidentPage.reportIncident(title, description, project, type, priority, tags) // Soft validate that we get redirected to the incident submission form - await expect - .soft(page) - .toHaveURL( - encodeURI( - `./default/incidents/report?project=${project}&incident_priority=${priority}&incident_type=${type}&title=${title}&description=${description}` + tags.map((tag) => "&tag=" + tag).join("") - ) - ) + let expectedURL = encodeURI( + `/default/incidents/report?project=${project}&incident_priority=${priority}&incident_type=${type}&title=${title}&description=${description}` + tags.map((tag) => "&tag=" + tag).join("") + ) + // replace + with %20 + let pageURL = page.url().replace(/\+/g, "%20") + + await expect.soft(pageURL).toContain(expectedURL) // Soft validate that we recieve the report form. await expect From 0f5893ba3de53d319291f0f461636004064f2c47 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Fri, 10 Nov 2023 18:56:51 -0800 Subject: [PATCH 2/2] Have playwright.yml only run on chromium --- .github/workflows/playwright.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 4fe00fbcd6e2..775b3295835d 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -58,7 +58,7 @@ jobs: - name: Setup sample database run: dispatch database restore --dump-file data/dispatch-sample-data.dump && dispatch database upgrade - name: Run tests - run: npx playwright test --project=chromium --project=firefox + run: npx playwright test --project=chromium - uses: actions/upload-artifact@v3 if: always() with: