Adjust feePriority for swap flow

This commit is contained in:
Christine Pinto
2024-08-08 10:32:21 +02:00
parent 5f30c79239
commit 390a3b45a7
4 changed files with 8 additions and 5 deletions

View File

@@ -858,12 +858,15 @@ export default class Wallet {
// had to disable this rule as my first assertion was always changed to a wrong assertion
/* eslint-disable playwright/prefer-web-first-assertions */
async switchToHighFees() {
async switchToHighFees(feePriorityShown: boolean = true) {
// Save the current fee amount for comparison
const originalFee = await this.feeAmount.innerText();
const numericOriginalFee = parseFloat(originalFee.replace(/[^0-9.]/g, ''));
await expect(numericOriginalFee).toBeGreaterThan(0);
const feePriority = await this.labelFeePriority.innerText();
let feePriority = 'Medium';
if (feePriorityShown) {
feePriority = await this.labelFeePriority.innerText();
}
// Click on edit Fee button
await this.buttonEditFee.click();

View File

@@ -73,7 +73,7 @@ test.describe('Swap Flow Exchange', () => {
// We can only continue if the FeeRate is above 0
await wallet.waitForTextAboveZero(wallet.feeAmount, 30000);
await wallet.switchToHighFees();
await wallet.switchToHighFees(false);
await wallet.buttonSwap.click();
await wallet.checkVisualsSendTransactionReview('swap', false, selfBTC);

View File

@@ -91,7 +91,7 @@ test.describe('Swap Flow ME', () => {
// We can only continue if the FeeRate is above 0
await wallet.waitForTextAboveZero(wallet.feeAmount, 30000);
await wallet.switchToHighFees();
await wallet.switchToHighFees(false);
await wallet.buttonSwap.click();
await wallet.checkVisualsSendTransactionReview('swap', false, selfBTC);

View File

@@ -94,7 +94,7 @@ test.describe('Swap Flow Unisat', () => {
// We can only continue if the FeeRate is above 0
await wallet.waitForTextAboveZero(wallet.feeAmount, 30000);
await wallet.switchToHighFees();
await wallet.switchToHighFees(false);
await wallet.buttonSwap.click();
await wallet.checkVisualsSendTransactionReview('swap', false, selfBTC);