-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
import { expect, Page } from "@playwright/test"; | ||
import { contextDefaults } from "./context"; | ||
|
||
export const navigateToService = async (page: Page, slug:string) => { | ||
|
||
await page.goto(`/${contextDefaults.team.slug}/${slug}`); | ||
export const navigateToService = async (page: Page, slug: string) => { | ||
await page.goto(`/${contextDefaults.team.slug}/${slug}`); | ||
|
||
await expect( | ||
page.getByRole("link", { name: slug }), | ||
).toBeVisible(); | ||
await expect(page.getByRole("link", { name: slug })).toBeVisible(); | ||
|
||
return true | ||
} | ||
return true; | ||
}; | ||
|
||
export const publishService = async (page:Page) => { | ||
page.getByRole("button", { name: "CHECK FOR CHANGES TO PUBLISH" }).click(); | ||
await expect( | ||
page.getByRole("heading", { name: "Check for changes to publish" }), | ||
).toBeVisible(); | ||
page.getByRole("button", { name: "PUBLISH", exact: true }).click(); | ||
} | ||
export const publishService = async (page: Page) => { | ||
page.getByRole("button", { name: "CHECK FOR CHANGES TO PUBLISH" }).click(); | ||
await expect( | ||
page.getByRole("heading", { name: "Check for changes to publish" }), | ||
).toBeVisible(); | ||
page.getByRole("button", { name: "PUBLISH", exact: true }).click(); | ||
}; | ||
|
||
export const turnServiceOnline = async (page: Page) =>{ | ||
page.locator('[aria-label="Service settings"]').click(); | ||
page.getByLabel("Offline").click(); | ||
export const turnServiceOnline = async (page: Page) => { | ||
page.locator('[aria-label="Service settings"]').click(); | ||
page.getByLabel("Offline").click(); | ||
|
||
page.getByRole("button", { name: "Save", disabled: false }).click(); | ||
await expect( | ||
page.getByText("Service settings updated successfully"), | ||
).toBeVisible(); | ||
} | ||
page.getByRole("button", { name: "Save", disabled: false }).click(); | ||
await expect( | ||
page.getByText("Service settings updated successfully"), | ||
).toBeVisible(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters