Skip to content

Commit

Permalink
test: adjust e2e tests to new login
Browse files Browse the repository at this point in the history
  • Loading branch information
angelo-v committed Mar 3, 2024
1 parent 8b1b086 commit 6b775d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions apps/tests/actions/signIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ export async function signIn(
idp: string = "http://localhost:4000",
) {
const originalLocation = page.url();
page.on("dialog", (dialog) => {
dialog.accept(idp);
});
const loginButton = page.locator("pos-login").getByRole("button");
await loginButton.click();

const idpUrl = page.getByLabel("Please enter your Identity Provider");
await idpUrl.fill("http://localhost:4000");
await idpUrl.press("Enter");

await expect(page).toHaveURL(
"http://localhost:4000/.account/login/password/",
);
Expand Down
2 changes: 1 addition & 1 deletion apps/tests/text-search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test("finds a thing based on the label index", async ({ page }) => {
await signIn(page, alice);

// when searching for a text
const navigationBar = page.getByPlaceholder("Search");
const navigationBar = page.getByPlaceholder("Search or enter URI");
await navigationBar.fill("ometh");

// and choosing the first result
Expand Down

0 comments on commit 6b775d6

Please sign in to comment.