mirror of
https://github.com/zhigang1992/xverse-web-extension.git
synced 2026-01-12 09:43:44 +08:00
test: added timeout and mark flaky tests in ci as fixme (#910)
* test: addd timeout and mark flaky tests in ci as fixme * Update package-lock.json
This commit is contained in:
@@ -39,7 +39,7 @@ test.describe('Account Management', () => {
|
||||
await page.getByRole('textbox', { name: '' }).fill('Bla Bla Bla 1');
|
||||
await page.getByRole('button', { name: /confirm/i }).click();
|
||||
|
||||
await expect(page.getByText('Bla Bla Bla 1')).toBeVisible();
|
||||
await expect(page.getByText('Bla Bla Bla 1')).toBeVisible({ timeout: 5000 });
|
||||
|
||||
await page.getByRole('button', { name: /open account options/i }).click();
|
||||
await page.getByRole('button', { name: /rename account/i }).click();
|
||||
@@ -60,6 +60,6 @@ test.describe('Account Management', () => {
|
||||
await page.getByRole('button', { name: /account name/i }).click();
|
||||
await expect(page.getByText('Account 1')).toBeVisible();
|
||||
await page.getByRole('button', { name: /generate account/i }).click();
|
||||
await expect(page.getByText('Account 2')).toBeVisible();
|
||||
await expect(page.getByText('Account 2')).toBeVisible({ timeout: 5000 });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,39 +7,43 @@ const runeName = 'MINT•CAT•FOR•MAINNET•AIRDROP';
|
||||
const TEST_ORDINALS_ADDRESS = 'tb1p9c9qw2grtpufq6603rua4tejjnynrhpq4fjjl9mxekz77jllqslqee9t9r';
|
||||
|
||||
test.describe('Send runes', () => {
|
||||
test('Send Runes Page Visual Check without funds Mainnet', async ({ page, extensionId }) => {
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', false);
|
||||
// TODO: fix this test, added fixme as it's failing in CI
|
||||
test.fixme(
|
||||
'Send Runes Page Visual Check without funds Mainnet',
|
||||
async ({ page, extensionId }) => {
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', false);
|
||||
|
||||
// get own Ordinals Address for address check on review page
|
||||
const addressOrdinals = await wallet.getAddress('Ordinals');
|
||||
// get own Ordinals Address for address check on review page
|
||||
const addressOrdinals = await wallet.getAddress('Ordinals');
|
||||
|
||||
// Check if Rune is enabled and if not enable the rune and click on it
|
||||
await wallet.checkAndClickOnSpecificRune('SKIBIDI•OHIO•RIZZ');
|
||||
// Check if Rune is enabled and if not enable the rune and click on it
|
||||
await wallet.checkAndClickOnSpecificRune('SKIBIDI•OHIO•RIZZ');
|
||||
|
||||
const originalBalanceAmount = await wallet.checkVisualsRunesDashboard('SKIBIDI•OHIO•RIZZ');
|
||||
const originalBalanceAmount = await wallet.checkVisualsRunesDashboard('SKIBIDI•OHIO•RIZZ');
|
||||
|
||||
await wallet.buttonSend.click();
|
||||
await wallet.buttonSend.click();
|
||||
|
||||
await wallet.checkVisualsSendPage1('send-rune');
|
||||
await wallet.checkVisualsSendPage1('send-rune');
|
||||
|
||||
await wallet.receiveAddress.fill(addressOrdinals);
|
||||
// Check Info message
|
||||
await expect(wallet.infoMessageSendSelf).toBeVisible();
|
||||
await expect(wallet.buttonNext).toBeEnabled();
|
||||
await wallet.buttonNext.click();
|
||||
await wallet.receiveAddress.fill(addressOrdinals);
|
||||
// Check Info message
|
||||
await expect(wallet.infoMessageSendSelf).toBeVisible();
|
||||
await expect(wallet.buttonNext).toBeEnabled();
|
||||
await wallet.buttonNext.click();
|
||||
|
||||
await wallet.checkVisualsSendPage2('send-rune');
|
||||
const displayBalance = await wallet.labelBalanceAmountSelector.innerText();
|
||||
const displayBalanceNumerical = parseFloat(displayBalance.replace(/[^0-9.]/g, ''));
|
||||
await expect(originalBalanceAmount).toEqual(displayBalanceNumerical);
|
||||
await wallet.checkVisualsSendPage2('send-rune');
|
||||
const displayBalance = await wallet.labelBalanceAmountSelector.innerText();
|
||||
const displayBalanceNumerical = parseFloat(displayBalance.replace(/[^0-9.]/g, ''));
|
||||
await expect(originalBalanceAmount).toEqual(displayBalanceNumerical);
|
||||
|
||||
const maxAmount = displayBalanceNumerical + 100;
|
||||
const maxAmount = displayBalanceNumerical + 100;
|
||||
|
||||
await wallet.inputSendAmount.fill(maxAmount.toString());
|
||||
await expect(wallet.buttonInsufficientFunds).toBeVisible();
|
||||
await expect(wallet.buttonInsufficientFunds).toBeDisabled();
|
||||
});
|
||||
await wallet.inputSendAmount.fill(maxAmount.toString());
|
||||
await expect(wallet.buttonInsufficientFunds).toBeVisible();
|
||||
await expect(wallet.buttonInsufficientFunds).toBeDisabled();
|
||||
},
|
||||
);
|
||||
|
||||
test('Cancel - send one rune testnet #localexecution', async ({ page, extensionId }) => {
|
||||
const wallet = new Wallet(page);
|
||||
|
||||
@@ -10,8 +10,8 @@ test.describe('Swap Flow Unisat', () => {
|
||||
|
||||
const marketplace = 'Unisat';
|
||||
const token = 'MAX•DOG•ONCHAIN';
|
||||
|
||||
test('Cancel swap token via Unisat', async ({ page, extensionId }) => {
|
||||
// TODO: fix this test, added fixme as it's failing in CI
|
||||
test.fixme('Cancel swap token via Unisat', async ({ page, extensionId }) => {
|
||||
// Restore wallet
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', false);
|
||||
|
||||
@@ -75,7 +75,7 @@ test.describe('Transaction', () => {
|
||||
await expect(await wallet.containerTransactionHistory.count()).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
|
||||
test('Visual Check Runes Transaction history', async ({ page, extensionId }) => {
|
||||
test.fixme('Visual Check Runes Transaction history', async ({ page, extensionId }) => {
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', false);
|
||||
// Check if Rune is enabled and if not enable the rune and click on it
|
||||
|
||||
@@ -53,7 +53,8 @@ test.describe('Transaction STX', () => {
|
||||
await expect(page.getByRole('button', { name: /insufficient funds/i })).toBeVisible();
|
||||
});
|
||||
|
||||
test('Send STX - Cancel transaction mainnet', async ({ page, extensionId }) => {
|
||||
// TODO: fix this test, added fixme as it's failing in
|
||||
test.fixme('Send STX - Cancel transaction mainnet', async ({ page, extensionId }) => {
|
||||
// Restore wallet and setup Mainnet network
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', false);
|
||||
|
||||
Reference in New Issue
Block a user