Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/black-23.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Nov 11, 2023
2 parents 674b095 + 0f5893b commit d15e1c7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@update:search="getFilteredData()"
chips
closable-chips
clearable
item-title="name"
item-value="id"
hide-selected
Expand Down
2 changes: 1 addition & 1 deletion tests/static/e2e/pages/auth-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class AuthPage {
this.registerButton = page.getByRole("button", { name: "Register" })
// Shared Components
this.emailLabel = page.getByLabel("Email")
this.passwordLabel = page.getByLabel("Password")
this.passwordLabel = page.getByLabel("Password", { exact: true })
}

async gotoLogin() {
Expand Down
2 changes: 1 addition & 1 deletion tests/static/e2e/pages/incident-edit-sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class IncidentsPage {
this.CloseButton = page.getByRole("button", { name: "Close" })

this.CostsTab = page.getByRole("tab", { name: "Costs" })
this.CostsAmount = page.getByLabel("Amount")
this.CostsAmount = page.getByLabel("Amount", { exact: true })
}

async goto(incident: string) {
Expand Down
8 changes: 4 additions & 4 deletions tests/static/e2e/pages/incidents-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export class IncidentsPage {
.getByRole("button")
.nth(2)
this.EditMenu = page.getByTestId("incident-table-edit")
this.EditViewEdit = page.getByRole("menuitem", { name: "View / Edit" })
this.EditCreateReport = page.getByRole("menuitem", { name: "Create Report" })
this.EditRunWorkflow = page.getByRole("menuitem", { name: "Run Workflow" })
this.EditDelete = page.getByRole("menuitem", { name: "Delete" })
this.EditViewEdit = page.getByText("View / Edit", { exact: true })
this.EditCreateReport = page.getByText("Create Report", { exact: true })
this.EditRunWorkflow = page.getByText("Run Workflow", { exact: true })
this.EditDelete = page.getByText("Delete", { exact: true })
}

async goto() {
Expand Down
6 changes: 3 additions & 3 deletions tests/static/e2e/pages/report-incident-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export class ReportIncidentPage {
this.page = page
this.route = orgSlug + Routes.ReportIncident
this.reportHeader = page.getByText("Report Incident").first()
this.titleTextBox = page.getByLabel("Title")
this.descriptionTextBox = page.getByLabel("Description")
this.titleTextBox = page.getByLabel("Title", { exact: true })
this.descriptionTextBox = page.getByLabel("Description", { exact: true })
this.projectDropdown = page.getByRole("combobox").filter({ hasText: "Project" }).locator("i")
this.typeDropdown = page.getByRole("button", { name: "Type" })
this.priorityDropdown = page.getByRole("button", { name: "Priority" })
Expand Down Expand Up @@ -97,7 +97,7 @@ export class ReportIncidentPage {
}

async resetPageView() {
await this.pageBorder.click()
// await this.pageBorder.click()
}

async pageObjectModel(
Expand Down
14 changes: 7 additions & 7 deletions tests/static/e2e/report-submission.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d15e1c7

Please sign in to comment.