Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui-test): remove wallet loading indicators #1753

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions apps/laboratory/tests/shared/validators/WalletValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,17 @@ import type { Locator, Page } from '@playwright/test'

export class WalletValidator {
private readonly gotoSessions: Locator
private readonly vercelPreview: Locator

constructor(public readonly page: Page) {
this.gotoSessions = this.page.getByTestId('sessions')
this.vercelPreview = this.page.locator('css=vercel-live-feedback')
}

async reload() {
await this.page.reload()
await this.page.getByTestId('wc-connect').isVisible()
await this.page.waitForTimeout(1000)
const isVercelPreview = (await this.vercelPreview.count()) > 0
if (isVercelPreview) {
await this.vercelPreview.evaluate((iframe: HTMLIFrameElement) => iframe.remove())
}
}

async expectConnected() {
await this.reload()
await this.gotoSessions.click()
await expect(this.page.getByTestId('session-card')).toBeVisible()
}

async expectDisconnected() {
await this.page.waitForTimeout(1000)
await this.reload()
await this.gotoSessions.click()
await expect(this.page.getByTestId('session-card')).not.toBeVisible()
}
Expand Down
Loading