Skip to content

Commit

Permalink
chore: trim
Browse files Browse the repository at this point in the history
  • Loading branch information
arein committed Dec 19, 2023
1 parent c8df3d1 commit 2efc7ac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
9 changes: 0 additions & 9 deletions apps/laboratory/tests/shared/pages/WalletPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ import type { SessionParams } from '../types'
export class WalletPage {
private readonly baseURL = WALLET_URL

private readonly gotoAccounts: Locator

private readonly gotoSessions: Locator

private readonly gotoHome: Locator

private readonly gotoPairings: Locator

private readonly gotoSettings: Locator

constructor(public readonly page: Page) {
this.gotoAccounts = this.page.getByTestId('accounts')
this.gotoSessions = this.page.getByTestId('sessions')
this.gotoHome = this.page.getByTestId('wc-connect')
this.gotoPairings = this.page.getByTestId('pairings')
this.gotoSettings = this.page.getByTestId('settings')
}

async load() {
Expand Down
31 changes: 0 additions & 31 deletions apps/laboratory/tests/shared/validators/WalletValidator.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,16 @@
import { expect } from '@playwright/test'
import type { Locator, Page } from '@playwright/test'
import { WALLET_URL } from '../constants'

export class WalletValidator {
private readonly baseURL = WALLET_URL

private readonly gotoAccounts: Locator

private readonly gotoSessions: Locator

private readonly gotoHome: Locator

private readonly gotoPairings: Locator

private readonly gotoSettings: Locator

constructor(public readonly page: Page) {
this.gotoAccounts = this.page.getByTestId('accounts')
this.gotoSessions = this.page.getByTestId('sessions')
this.gotoHome = this.page.getByTestId('wc-connect')
this.gotoPairings = this.page.getByTestId('pairings')
this.gotoSettings = this.page.getByTestId('settings')
}

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

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

async expectRecievedSign({ chainName = 'Ethereum' }) {
await expect(this.page.getByText('Sign Message')).toBeVisible()
await expect(this.page.getByTestId('request-details-chain')).toHaveText(chainName)
}

async expectRecievedSignTyped({ chainName = 'Ethereum' }) {
await expect(this.page.getByText('Sign Typed Data')).toBeVisible()
await expect(this.page.getByTestId('request-details-chain')).toHaveText(chainName)
}
}

0 comments on commit 2efc7ac

Please sign in to comment.