Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions packages/app/playwright/crx/utils/popup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Page } from '@playwright/test';

import { expect } from '@fuels/playwright-utils';
import { Address } from 'fuels';
import { getByAriaLabel, hasText, visit, waitAriaLabel } from '../../commons';
import type { MockData } from '../../mocks';

Expand Down Expand Up @@ -108,22 +109,9 @@ export async function getClipboardText(popupPage: Page): Promise<string> {
export async function getAddressForAccountNumber(
popupPage: Page,
accountName: string,
accountNumber: number
Comment thread
nelitow marked this conversation as resolved.
_accountNumber: number
): Promise<string> {
await getByAriaLabel(popupPage, 'Accounts').click();

// Construct the XPath selector dynamically based on the order of the account in the list
const xpathSelector = `/html/body/div[2]/div/div/div/div/article[${accountNumber}]/div[1]/div[2]/div/div/button`;

// Click on the element
await popupPage.click(`xpath=${xpathSelector}`);

await getByAriaLabel(popupPage, accountName).click({
position: {
x: 10,
y: 10,
},
});

return getClipboardText(popupPage);
const account = await getAccountByName(popupPage, accountName);
if (!account?.address) return '';
return Address.fromDynamicInput(account.address).toString();
}
2 changes: 1 addition & 1 deletion packages/app/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DEFAULT_NETWORKS: Array<
isSelected: false,
},
{
name: 'Fuel Sepolia Devnet',
name: 'Fuel Ignition Sepolia Devnet',
Comment thread
cursor[bot] marked this conversation as resolved.
url: 'https://devnet.fuel.network/v1/graphql',
chainId: CHAIN_IDS.fuel.devnet,
explorerUrl: 'https://app-devnet.fuel.network',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test.describe('Forward Custom Asset', () => {
context,
page,
extensionId,
amountToFund: bn.parseUnits('0.001'),
amountToFund: bn.parseUnits('0.01'),
}));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test.describe('Forward Half Custom Asset', () => {
context,
page,
extensionId,
amountToFund: bn.parseUnits('0.001'),
amountToFund: bn.parseUnits('0.01'),
}));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test.describe('Mint Assets', () => {
context,
page,
extensionId,
amountToFund: bn.parseUnits('0.001'),
amountToFund: bn.parseUnits('0.01'),
}));
});

Expand All @@ -63,7 +63,7 @@ test.describe('Mint Assets', () => {

// test asset is correct
const assetId = calculateAssetId(MAIN_CONTRACT_ID, await getBaseAssetId());
await page.waitForTimeout(10000); // Wait for slow VM
await page.waitForTimeout(2000); // Brief wait before popup detection

const walletNotificationPage =
await fuelWalletTestHelper.getWalletPopupPage();
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-contract-tests/src/contract-ids.devnet.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"ExternalContract": "0xd979f703306204cbcec50fe740d677f842db363090c0f708a5debbe57ec6ba38",
"MainContract": "0xee66b4695109f8b6497aafbac959c20a398a20dd8a55603e27a6020834dceb21"
"ExternalContract": "0xa7ac82064995d8a534efcc7a0cf24619789ac4664aa29ec20a122183327b9a2c",
"MainContract": "0xee7552b40c6b23ebbfa20217aaef6c3358f41277b548740607fdeae1d6b97790"
}
4 changes: 2 additions & 2 deletions packages/e2e-contract-tests/src/contract-ids.testnet.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"ExternalContract": "0x77ed3b607f7a316b2b95684be600a2b44c570a4d99bba091205df76fcba53113",
"MainContract": "0xcfd33edad0a69a9bed46547e4e9f0f07dc241e6c6f665b8fa62fc72d49452f24"
"ExternalContract": "0xaaf03c1b56b8e5499b9bf721c8f341831a1804203207c768800f4c06ab7e5898",
"MainContract": "0xc6dcdbb73792db28376817e35690bf6ca4dd11ba72a8b5f0e013c34e52324c90"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.100.6
Fuels version: 0.103.0
Forc version: 0.68.1
Fuel-Core version: 0.43.1
*/
Expand Down Expand Up @@ -571,43 +571,12 @@ export class CustomAssetInterface extends Interface {
super(abi);
}

declare functions: {
decimals: FunctionFragment;
name: FunctionFragment;
symbol: FunctionFragment;
total_assets: FunctionFragment;
total_supply: FunctionFragment;
burn: FunctionFragment;
mint: FunctionFragment;
deposit: FunctionFragment;
deposit_half: FunctionFragment;
deposit_half_and_mint: FunctionFragment;
deposit_half_and_mint_from_external_contract: FunctionFragment;
panic_tx: FunctionFragment;
revert_tx: FunctionFragment;
};
}

export class CustomAsset extends __Contract {
static readonly abi = abi;
static readonly storageSlots = storageSlots;

declare interface: CustomAssetInterface;
declare functions: {
decimals: InvokeFunction<[asset: AssetIdInput], Option<number>>;
name: InvokeFunction<[asset: AssetIdInput], Option<StdString>>;
symbol: InvokeFunction<[asset: AssetIdInput], Option<StdString>>;
total_assets: InvokeFunction<[], BN>;
total_supply: InvokeFunction<[asset: AssetIdInput], Option<BN>>;
burn: InvokeFunction<[sub_id: string, amount: BigNumberish], void>;
mint: InvokeFunction<[recipient: IdentityInput, sub_id: Option<string>, amount: BigNumberish], void>;
deposit: InvokeFunction<[], BN>;
deposit_half: InvokeFunction<[], BN>;
deposit_half_and_mint: InvokeFunction<[recipient: IdentityInput, sub_id: string, amount: BigNumberish], BN>;
deposit_half_and_mint_from_external_contract: InvokeFunction<[recipient: IdentityInput, sub_id: string, amount: BigNumberish, contract_id: ContractIdInput], BN>;
panic_tx: InvokeFunction<[], void>;
revert_tx: InvokeFunction<[], void>;
};

constructor(
id: string | Address,
Expand Down
Loading
Loading