Skip to content

Commit

Permalink
chore: change send transaction popup title/button (#1672)
Browse files Browse the repository at this point in the history
- Closes FE-970
  • Loading branch information
LuizAsFight authored Nov 29, 2024
1 parent 12b92b5 commit e187dc5
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-emus-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

chore: change title/button text of Approve transaction screen
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
fetch-depth: 0

- name: CI Setup
uses: FuelLabs/github-actions/setups/node@master
uses: FuelLabs/github-actions/setups/node@58bcd91d7246e40938e1971be0b0fe35b253dff0
with:
node-version: 20.11.0
pnpm-version: 9.5.0
Expand Down
2 changes: 1 addition & 1 deletion packages/app/playwright/crx/crx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ test.describe('FuelWallet Extension', () => {
);

await hasAriaLabel(approveTransactionPage, 'Confirm Transaction');
await getButtonByText(approveTransactionPage, /Approve/i).click();
await getButtonByText(approveTransactionPage, /Submit/i).click();

await expect(transferStatus).resolves.toBe('success');
const balance = await receiverWallet.getBalance();
Expand Down
18 changes: 9 additions & 9 deletions packages/app/playwright/e2e/SendTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test.describe('SendTransaction', () => {
await expectButtonToBeEnabled(btnLocator);
await btnLocator.click();

await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();
await hasText(page, '0.001 ETH');

// Wait for transaction to be confirmed
Expand Down Expand Up @@ -102,7 +102,7 @@ test.describe('SendTransaction', () => {

// Approve transaction
await hasText(page, '0.001 ETH');
await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();

// Wait for transaction to be confirmed
await hasText(page, 'success');
Expand Down Expand Up @@ -147,7 +147,7 @@ test.describe('SendTransaction', () => {

// Approve transaction
await hasText(page, `0.01 ${ALT_ASSET.symbol}`);
await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();

// Wait for transaction to be confirmed
await hasText(page, 'success');
Expand Down Expand Up @@ -184,7 +184,7 @@ test.describe('SendTransaction', () => {

await hasText(page, '0.001 ETH');

await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();
await hasText(page, '0.001 ETH');

// Wait for transaction to be confirmed
Expand Down Expand Up @@ -226,7 +226,7 @@ test.describe('SendTransaction', () => {

await hasText(page, '0.001 ETH');

await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();
await hasText(page, '0.001 ETH');

// Wait for transaction to be confirmed
Expand Down Expand Up @@ -271,7 +271,7 @@ test.describe('SendTransaction', () => {
await btnLocatorBeforeApprv.click();

// Waiting button change to Approve in order to get updated fee amount
await page.waitForSelector('button:has-text("Approve")');
await page.waitForSelector('button:has-text("Submit")');
await page.waitForTimeout(1000);

// Going back to select other fee value
Expand All @@ -293,13 +293,13 @@ test.describe('SendTransaction', () => {
await btnLocator.click();

// Waiting button change to Approve in order to get updated fee amount
await page.waitForSelector('button:has-text("Approve")');
await page.waitForSelector('button:has-text("Submit")');
await page.waitForTimeout(1000);

await hasText(page, '0.001 ETH');

await page.waitForTimeout(1000);
await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();
await hasText(page, '0.001 ETH');

// Wait for transaction to be confirmed
Expand Down Expand Up @@ -350,7 +350,7 @@ test.describe('SendTransaction', () => {

// Approve transaction
await hasText(page, `${maxAmountAfterFee} ETH`);
await getButtonByText(page, 'Approve').click();
await getButtonByText(page, 'Submit').click();
await hasText(page, `${maxAmountAfterFee} ETH`);

// Wait for transaction to be confirmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const selectors = {
if (state.matches('txSuccess')) return 'Transaction sent';
if (state.matches('txFailed')) return 'Transaction failed';
if (state.matches('sendingTx')) return 'Sending transaction';
return 'Approve Transaction';
return 'Review Transaction';
},
origin: (state: TransactionRequestState) => state.context.input.origin,
originTitle: (state: TransactionRequestState) => state.context.input.title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function TransactionRequest() {
isLoading={isLoading || status('sending')}
isDisabled={shouldDisableApproveBtn}
>
Approve
Submit
</Button>
</Layout.BottomBar>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const TxApprove = () => {
isDisabled={ctx.shouldDisableApproveBtn}
onPress={ctx.handlers.approve}
>
Approve
Submit
</Button>
</>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class FuelWalletTestHelper {
async walletApprove() {
const walletPage = await this.getWalletPopupPage();

const approveButton = getButtonByText(walletPage, 'Approve');
const approveButton = getButtonByText(walletPage, 'Submit');
await approveButton.click();
}

Expand Down

0 comments on commit e187dc5

Please sign in to comment.