-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
// Uncomment when ParaTimes are released | ||
// import { test, expect } from '@playwright/test' | ||
// import { privateKey, privateKeyAddress } from '../utils/test-inputs' | ||
// import { fillPrivateKeyWithoutPassword } from '../utils/fillPrivateKey' | ||
import { test, expect } from '@playwright/test' | ||
import { privateKey, privateKeyAddress } from '../utils/test-inputs' | ||
import { fillPrivateKeyWithoutPassword } from '../utils/fillPrivateKey' | ||
import { warnSlowApi } from '../utils/warnSlowApi' | ||
import { mockApi } from '../utils/mockApi' | ||
|
||
// test.describe('ParaTimes', () => { | ||
// test('should clear form data on cancel transfer', async ({ page }) => { | ||
// await page.goto('/open-wallet/private-key') | ||
// await fillPrivateKeyWithoutPassword(page, { | ||
// privateKey: privateKey, | ||
// privateKeyAddress: privateKeyAddress, | ||
// persistenceCheckboxChecked: false, | ||
// persistenceCheckboxDisabled: false, | ||
// }) | ||
// await page.getByTestId('nav-paratime').click() | ||
// await page.getByRole('button', { name: /Deposit/i }).click() | ||
// await page.getByRole('button', { name: /Select/i }).click() | ||
// await expect(page.getByRole('listbox')).toBeVisible() | ||
// await page.getByRole('listbox').locator('button', { hasText: 'Cipher' }).click() | ||
// await page.getByRole('button', { name: /Next/i }).click() | ||
// await page.getByPlaceholder(privateKeyAddress).fill(privateKeyAddress) | ||
// await page.getByRole('button', { name: /Cancel transfer/i }).click() | ||
// await page.getByRole('button', { name: /Deposit/i }).click() | ||
// await page.getByRole('button', { name: /Select/i }).click() | ||
// await expect(page.getByRole('listbox')).toBeVisible() | ||
// await page.getByRole('listbox').locator('button', { hasText: 'Emerald' }).click() | ||
// await page.getByRole('button', { name: /Next/i }).click() | ||
// await expect(page.getByPlaceholder('0x...')).toHaveValue('') | ||
// }) | ||
// }) | ||
test.beforeEach(async ({ page }) => { | ||
await warnSlowApi(page) | ||
await mockApi(page, 500000000000) | ||
}) | ||
|
||
test.describe('ParaTimes', () => { | ||
test('should clear form data on cancel transfer', async ({ page }) => { | ||
await page.goto('/open-wallet/private-key') | ||
await fillPrivateKeyWithoutPassword(page, { | ||
privateKey: privateKey, | ||
privateKeyAddress: privateKeyAddress, | ||
persistenceCheckboxChecked: false, | ||
persistenceCheckboxDisabled: false, | ||
}) | ||
await page.getByTestId('nav-paratime').click() | ||
await page.getByRole('button', { name: /Deposit/i }).click() | ||
await page.getByRole('button', { name: /Select/i }).click() | ||
await expect(page.getByRole('listbox')).toBeVisible() | ||
await page.getByRole('listbox').locator('button', { hasText: 'Cipher' }).click() | ||
await page.getByRole('button', { name: /Next/i }).click() | ||
await page.getByPlaceholder(privateKeyAddress).fill(privateKeyAddress) | ||
await page.getByRole('button', { name: /Cancel transfer/i }).click() | ||
await page.getByRole('button', { name: /Deposit/i }).click() | ||
await page.getByRole('button', { name: /Select/i }).click() | ||
await expect(page.getByRole('listbox')).toBeVisible() | ||
await page.getByRole('listbox').locator('button', { hasText: 'Emerald' }).click() | ||
await page.getByRole('button', { name: /Next/i }).click() | ||
await expect(page.getByPlaceholder('0x...')).toHaveValue('') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters