Skip to content

Commit e6169bc

Browse files
committed
clean redundant code
1 parent c1e5e3f commit e6169bc

File tree

5 files changed

+1
-13
lines changed

5 files changed

+1
-13
lines changed

tests/e2e/find-wallet.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ test.describe("Find Wallet Page", () => {
88
test.beforeEach(async ({ page }) => {
99
findWalletPage = new FindWalletPage(page)
1010
await findWalletPage.goto()
11-
await findWalletPage.waitForPageReady()
1211
})
1312

1413
test("loads successfully", async ({ page }, testInfo) => {

tests/e2e/global.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ test.describe("Global", () => {
5454
test.beforeEach(async ({ page }) => {
5555
homePage = new HomePage(page)
5656
await homePage.goto()
57-
await homePage.waitForPageReady()
5857
})
5958

6059
async function switchToChinese(page: Page, homePage: HomePage) {
@@ -97,7 +96,6 @@ test.describe("Global", () => {
9796
page,
9897
}) => {
9998
await homePage.goto()
100-
await homePage.waitForPageReady()
10199

102100
await homePage.assertUrlMatches(`/${DEFAULT_LOCALE}/`)
103101

tests/e2e/home.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ test.describe("Home Page", () => {
99
test.beforeEach(async ({ page }) => {
1010
homePage = new HomePage(page)
1111
await homePage.goto()
12-
await homePage.waitForPageReady()
1312
})
1413

1514
test("loads successfully", async ({ page }, testInfo) => {

tests/e2e/pages/BasePage.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ export class BasePage {
4444
await this.page.waitForLoadState("networkidle", { timeout })
4545
}
4646

47-
/**
48-
* Wait for page to be loaded and ready
49-
*/
50-
async waitForPageLoad(): Promise<void> {
51-
await this.page.waitForLoadState("networkidle")
52-
}
53-
5447
/**
5548
* Scroll element into view
5649
*/
@@ -82,7 +75,7 @@ export class BasePage {
8275
*/
8376
async navigateTo(url: string): Promise<void> {
8477
await this.page.goto(url)
85-
await this.waitForPageLoad()
78+
await this.waitForPageReady()
8679
}
8780

8881
/**

tests/e2e/whitepaper.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ test.describe("Whitepaper Page", () => {
1111
test("whitepaper PDF link has correct href", async ({ page }) => {
1212
const whitepaperPage = new MdPage(page, PAGE_URL)
1313
await whitepaperPage.goto()
14-
await whitepaperPage.waitForPageReady()
1514
await whitepaperPage.verifyLinkVisible(PDF_LINK_TEXT)
1615
await whitepaperPage.verifyLinkHref(PDF_LINK_TEXT, PDF_PATH)
1716
})

0 commit comments

Comments
 (0)