mirror of
https://github.com/zhigang1992/xverse-web-extension.git
synced 2026-04-30 21:52:45 +08:00
Adjust after merge
This commit is contained in:
@@ -630,8 +630,6 @@ export default class Wallet {
|
||||
}
|
||||
|
||||
async checkVisualsSendInscriptionsPage2(ordinalAddress, ordinalNumber, collection) {
|
||||
await expect(this.confirmTotalAmount).toBeVisible();
|
||||
await expect(this.confirmCurrencyAmount).toBeVisible();
|
||||
await expect(this.buttonExpand).toBeVisible();
|
||||
await expect(this.buttonCancel).toBeEnabled();
|
||||
await expect(this.buttonConfirm).toBeEnabled();
|
||||
@@ -711,16 +709,28 @@ export default class Wallet {
|
||||
editableFees?: boolean,
|
||||
sendAddress?: string,
|
||||
receiverAddress?: string,
|
||||
totalAmountShown: boolean = true,
|
||||
tokenImageShown: boolean = true,
|
||||
) {
|
||||
await expect(this.page.url()).toContain(url);
|
||||
await expect(this.confirmTotalAmount).toBeVisible();
|
||||
await expect(this.confirmCurrencyAmount).toBeVisible();
|
||||
await expect(this.buttonExpand).toBeVisible();
|
||||
await expect(this.buttonCancel).toBeEnabled();
|
||||
await expect(this.buttonConfirm).toBeEnabled();
|
||||
|
||||
await expect(this.feeAmount).toBeVisible();
|
||||
await expect(this.imageToken.first()).toBeVisible();
|
||||
|
||||
// Not all TX Screens show a total amount
|
||||
if (totalAmountShown) {
|
||||
await expect(this.confirmTotalAmount).toBeVisible();
|
||||
await expect(this.confirmCurrencyAmount).toBeVisible();
|
||||
}
|
||||
|
||||
if (tokenImageShown) {
|
||||
await expect(this.imageToken.first()).toBeVisible();
|
||||
}
|
||||
|
||||
if (editableFees) {
|
||||
await expect(this.buttonEditFee).toBeVisible();
|
||||
}
|
||||
|
||||
await this.buttonExpand.click();
|
||||
await expect(this.sendAddress.first()).toBeVisible();
|
||||
@@ -728,10 +738,6 @@ export default class Wallet {
|
||||
await expect(this.confirmAmount.first()).toBeVisible();
|
||||
await expect(this.confirmBalance.first()).toBeVisible();
|
||||
|
||||
if (editableFees) {
|
||||
await expect(this.buttonEditFee).toBeVisible();
|
||||
}
|
||||
|
||||
// Execute these checks only if sendAddress is provided
|
||||
if (sendAddress) {
|
||||
await expect(await this.sendAddress.first().innerText()).toContain(sendAddress.slice(-4));
|
||||
|
||||
@@ -9,7 +9,7 @@ test.describe('Swap Flow ME', () => {
|
||||
});
|
||||
|
||||
const marketplace = 'Magic Eden';
|
||||
const token = 'MONEY';
|
||||
const token = 'THE•MONEY•BEES';
|
||||
|
||||
test('Swap token via ME with standard fee mainnet #localexecution', async ({
|
||||
page,
|
||||
@@ -43,7 +43,8 @@ test.describe('Swap Flow ME', () => {
|
||||
// Had problems with loading of all tokens so I check that a 'DOG' is loaded
|
||||
await expect(wallet.labelTokenSubtitle.getByText('DOG').first()).toBeVisible();
|
||||
await expect(await wallet.divTokenRow.count()).toBeGreaterThan(0);
|
||||
await wallet.divTokenRow.filter({ hasText: token }).click();
|
||||
await wallet.inputField.fill(token);
|
||||
await wallet.divTokenRow.filter({ hasText: token }).first().click();
|
||||
await expect(wallet.nameToken.last()).not.toContainText('Select asset');
|
||||
await expect(wallet.imageToken.last()).toBeVisible();
|
||||
await expect(wallet.buttonGetQuotes).toBeDisabled();
|
||||
|
||||
@@ -9,7 +9,7 @@ test.describe('Swap Flow ME', () => {
|
||||
});
|
||||
|
||||
const marketplace = 'Magic Eden';
|
||||
const token = 'MONEY';
|
||||
const token = 'THE•MONEY•BEES';
|
||||
|
||||
test('Cancel swap token via ME', async ({ page, extensionId }) => {
|
||||
// Restore wallet
|
||||
@@ -43,7 +43,8 @@ test.describe('Swap Flow ME', () => {
|
||||
// Had problems with loading of all tokens so I check that a 'DOG' is loaded
|
||||
await expect(wallet.labelTokenSubtitle.getByText('DOG').first()).toBeVisible();
|
||||
await expect(await wallet.divTokenRow.count()).toBeGreaterThan(0);
|
||||
await wallet.divTokenRow.filter({ hasText: token }).click();
|
||||
await wallet.inputField.fill(token);
|
||||
await wallet.divTokenRow.filter({ hasText: token }).first().click();
|
||||
await expect(wallet.nameToken.last()).not.toContainText('Select asset');
|
||||
await expect(wallet.imageToken.last()).toBeVisible();
|
||||
await expect(wallet.buttonGetQuotes).toBeDisabled();
|
||||
|
||||
@@ -63,6 +63,8 @@ test.describe('Collectibles Tab - Rare sats', () => {
|
||||
false,
|
||||
addressOrdinals,
|
||||
addressOrdinals,
|
||||
false,
|
||||
false,
|
||||
);
|
||||
|
||||
// Cancel the transaction
|
||||
@@ -112,6 +114,8 @@ test.describe('Collectibles Tab - Rare sats', () => {
|
||||
false,
|
||||
addressOrdinals,
|
||||
addressOrdinals,
|
||||
false,
|
||||
false,
|
||||
);
|
||||
|
||||
await wallet.confirmSendTransaction();
|
||||
|
||||
@@ -53,7 +53,7 @@ test.describe('Transaction BTC', () => {
|
||||
await expect(initialBTCBalance).toEqual(displayBalanceNumerical);
|
||||
});
|
||||
|
||||
test('Send BTC - Cancel transaction testnet', async ({ page, extensionId }) => {
|
||||
test('Cancel BTC transaction testnet', async ({ page, extensionId }) => {
|
||||
// Restore wallet and setup Testnet network
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', true);
|
||||
@@ -114,7 +114,7 @@ test.describe('Transaction BTC', () => {
|
||||
await expect(initialBTCBalance).toEqual(balanceAfterCancel);
|
||||
});
|
||||
|
||||
test('Send BTC - confirm transaction testnet #localexecution', async ({ page, extensionId }) => {
|
||||
test('Confirm BTC transaction testnet #localexecution', async ({ page, extensionId }) => {
|
||||
// Restore wallet and setup Testnet network
|
||||
const wallet = new Wallet(page);
|
||||
await wallet.setupTest(extensionId, 'SEED_WORDS1', true);
|
||||
|
||||
Reference in New Issue
Block a user