Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ jobs:
WITH_ANVIL: true
URL: https://${{ steps.preview.outputs.preview_url }}
RPC_URL: ${{ secrets.RPC_URL }}
GUARDIAN_UI_INFURA_API_KEY: ${{ secrets.GUARDIAN_UI_INFURA_API_KEY }}
GUARDIAN_UI_ALCHEMY_API_KEY: ${{ secrets.GUARDIAN_UI_ALCHEMY_API_KEY }}
VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
run: pnpm run e2e

Expand Down
4 changes: 4 additions & 0 deletions e2e/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export const cookieNames = {
e2e: 'SW_e2e',
}

export const walletNames = {
monitorAddress: 'monitorAddress',
walletConnect: 'walletConnect',
Expand Down
11 changes: 6 additions & 5 deletions e2e/extendTest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test as base } from '@guardianui/test'
import { test as base } from '@playwright/test'

import {
api,
Expand All @@ -7,16 +7,15 @@ import {
swap,
vault,
queue,
anvil,
wallet,
osToken,
graphql,
element,
helpers,
settings,
guardian,
transactions,
} from './fixtures'
import { resetAllChains } from './fixtures/wallet/helpers'


const baseTest = base.extend<E2E.ExtendedTest>({
Expand All @@ -26,14 +25,12 @@ const baseTest = base.extend<E2E.ExtendedTest>({
swap,
queue,
vault,
anvil,
wallet,
osToken,
graphql,
element,
helpers,
settings,
guardian,
transactions,
})

Expand All @@ -55,6 +52,10 @@ const log = {

const getFileName = (value: string) => value.replace(/^.*\/(.*)\//gm, '$1/')

baseTest.beforeAll(async () => {
await resetAllChains()
Comment thread
mike-diamond marked this conversation as resolved.
})

baseTest.afterEach(async ({}, testInfo) => {
const { title, error, duration, file, retry } = testInfo

Expand Down
15 changes: 0 additions & 15 deletions e2e/fixtures/anvil/index.ts

This file was deleted.

93 changes: 0 additions & 93 deletions e2e/fixtures/anvil/setBalance.ts

This file was deleted.

3 changes: 1 addition & 2 deletions e2e/fixtures/element/checkLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const createCheckLink: Wrapper = ({ page }) => (

if (isPopup) {
const [ newPage ] = await Promise.all([
page.waitForEvent('popup'),
page.waitForEvent('popup', { timeout: 15_000 }),
page.getByTestId(testId).click(),
])

Expand All @@ -33,7 +33,6 @@ export const createCheckLink: Wrapper = ({ page }) => (
await expect(page).toHaveURL(expectedURL)

if (!skipPageHeadingCheck) {
await page.waitForLoadState('networkidle')
await expect(page.getByTestId('page-heading')).toBeVisible()
}
}
Expand Down
13 changes: 2 additions & 11 deletions e2e/fixtures/element/checkVisibility.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { expect } from '@playwright/test'


type Wrapper = E2E.FixtureMethod<CheckVisibility, 'page'>

type Input = {
Expand All @@ -15,14 +12,8 @@ export const createCheckVisibility: Wrapper = ({ page }) => (
const { testId, isVisible = true } = values

const selector = `[data-testid="${testId}"]`
const state = isVisible ? 'visible' : 'hidden'

if (isVisible) {
await page.waitForSelector(selector, { state: 'visible' })
expect(await page.isVisible(selector)).toBe(true)
}
else {
await page.waitForSelector(selector, { state: 'hidden' })
expect(await page.isVisible(selector)).toBe(false)
}
await page.waitForSelector(selector, { state })
}
)
115 changes: 0 additions & 115 deletions e2e/fixtures/guardian.ts

This file was deleted.

4 changes: 0 additions & 4 deletions e2e/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ export { default as user } from './user'
export { default as swap } from './swap'
export { default as vault } from './vault'
export { default as queue } from './queue'
export { default as anvil } from './anvil'
export { default as wallet } from './wallet'
export { default as osToken } from './osToken'
export { default as graphql } from './graphql'
export { default as element } from './element'
export { default as helpers } from './helpers'
export { default as settings } from './settings'
export { default as guardian } from './guardian'
export { default as transactions } from './transactions'


Expand All @@ -21,12 +19,10 @@ export type { UserFixture } from './user'
export type { SwapFixture } from './swap'
export type { VaultFixture } from './vault'
export type { QueueFixture } from './queue'
export type { AnvilFixture } from './anvil'
export type { WalletFixture } from './wallet'
export type { OsTokenFixture } from './osToken'
export type { ElementFixture } from './element'
export type { HelpersFixture } from './helpers'
export type { GraphqlFixture } from './graphql'
export type { SettingsFixture } from './settings'
export type { GuardianFixture } from './guardian'
export type { TransactionsFixture } from './transactions'
Loading
Loading