fix #52: correct the StackedRouter on 'replace'
All checks were successful
/ depoly (push) Successful in 1m26s
All checks were successful
/ depoly (push) Successful in 1m26s
This commit is contained in:
parent
ee67993796
commit
ee31c38f32
5 changed files with 61 additions and 25 deletions
|
@ -9,11 +9,10 @@ export class SignInPage extends Page {
|
|||
return $("[name=serverUrl]");
|
||||
}
|
||||
|
||||
public static async beTheCurrentPage() {
|
||||
public static async urlIsTheCurrent() {
|
||||
const urlMatched =
|
||||
new URL(await browser.getUrl()).pathname === "/accounts/sign-in";
|
||||
const elementShowed = await this.serverUrlInput.isDisplayed();
|
||||
return urlMatched && elementShowed;
|
||||
return urlMatched;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,8 @@ describe("The index page", () => {
|
|||
it("jumps to the sign-in page if no account signed in", async () => {
|
||||
await IndexPage.open("");
|
||||
|
||||
expect(await browser.waitUntil(SignInPage.beTheCurrentPage));
|
||||
expect(await browser.waitUntil(SignInPage.urlIsTheCurrent));
|
||||
|
||||
expect(await browser.waitUntil(SignInPage.serverUrlInput.isDisplayed));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue