Skip to content

Commit

Permalink
test(extension): maintenance 18th June 2024 (#1228)
Browse files Browse the repository at this point in the history
* test(extension): enable LW-3226 and LW-3227

* test(extension): add new tag for CIP-95 tests

* test(extension): refactor and move LW-4877

* test(extension): fix LW-10321 and LW-10322
  • Loading branch information
wklos-iohk authored Jun 18, 2024
1 parent e37c4e6 commit 9edb9ca
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChainablePromiseElement } from 'webdriverio';
class WalletAccountsMenuItem {
protected CONTAINER_SELECTOR;
private ITEM = '//div[@data-testid="wallet-account-item"]';
private ICON = '//span[@data-testid="wallet-account-item-icon"]';
private ICON = '//span[@data-testid="avatar-root"]';
private LABEL = '//span[@data-testid="wallet-account-item-label"]';
private PATH = '//span[@data-testid="wallet-account-item-path"]';
private DISABLE_BUTTON = '//button[@data-testid="wallet-account-item-lock-btn"]';
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/elements/transactionsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TransactionsPage {
private TRANSACTIONS_TABLE_ITEM_FIAT_AMOUNT = '[data-testid="fiat-amount"]';
private TRANSACTIONS_TABLE_ITEM_TIMESTAMP = '[data-testid="timestamp"]';
private TRANSACTIONS_SKELETON = '[data-testid="infinite-scroll-skeleton"]';
private TRANSACTIONS_COST_ADA = '[data-testid="send-transaction-fee-ada"]';
private TRANSACTIONS_COST_ADA = '[data-testid="transaction-fee-value-ada"]';
private ASSET_INFO_AMOUNT = '[data-testid="asset-info-amount"]';
private SUMMARY_FEE_CONTAINER = '[data-testid="summary-fee-container"]';
private OUTPUT_SUMMARY_CONTAINER = '[data-testid="output-summary-container"]';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,32 @@ Feature: Staking Page - Delegated funds - Multiple pools - Extended View
And I navigate to Staking extended page
When I click on pool name in the first currently staking component
Then I see stake pool details drawer for "AzureADA" stake pool opened from currently staked component

@LW-4877
Scenario: Extended View - Stake pool details - Enter and Escape buttons support
Given I am on Staking extended page
And I open Browse pools tab
And I switch to list view on "Browse pools" tab
And I input "APEX" to the search bar
And I click on the stake pool with ticker "APEX"
Then Drawer is displayed
When I press keyboard Enter button
Then I see Changing Staking Preferences modal
When I press keyboard Enter button
Then I see Manage delegation drawer
# When I press keyboard Enter button # TODO: update when LW-8625 is resolved
# Then I see Manage delegation drawer Confirmation page
# When I press keyboard Escape button # TODO: update when LW-8623 is resolved
# Then Staking exit modal is displayed
# When I press keyboard Escape button
# Then I see Manage delegation drawer Confirmation page
# When I press keyboard Enter button
# And I press keyboard Enter button
# Then staking password drawer is displayed
# When I press keyboard Escape button # TODO: update when LW-8623 is resolved
# Then Staking exit modal is displayed
# When I press keyboard Escape button
# Then staking password drawer is displayed
When I press keyboard Escape button
# When I press keyboard Enter button
Then Drawer is not displayed
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/features/NFTsExtended.feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Feature: LW-423: NFTs - Extended view
Given I am on NFTs extended page
When I click on a widget item with subtitle: "<subtitle>"
Then I see a "<type>" article with title "<subtitle>"
Examples:
Examples:
| type | subtitle |
| Glossary | What are collections? |
| FAQ | How to buy an NFT? |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@NetworkSwitching-extended
@NetworkSwitching-extended @Testnet @Mainnet
Feature: LW: Network Switching - extended view

Background:
Given Wallet is synced
And I disable showing Multidelegation beta banner
And I disable showing Multidelegation persistence banner

@LW-3226
Scenario Outline: Extended View - Currency symbol is correct when on different network
Expand All @@ -14,9 +16,7 @@ Feature: LW: Network Switching - extended view
And I wait for the transaction history to be loaded and all transactions to be confirmed
Then I see <ticker> in the list of transactions
When I navigate to Staking extended page
And I wait for stake pool list to be populated
Then I see <ticker> in the cost column
And I see <ticker> in current staked pool
Then I see <ticker> in current staked pool
When I click "Send" button on page header
And I've entered accepted values for all <network> fields of simple Tx
Then I see <ticker> in transaction fee
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@NetworkSwitching-popup
@NetworkSwitching-popup @Testnet @Mainnet
Feature: LW: Network Switching - popup view

Background:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@Staking-NonDelegatedFunds-Extended @Testnet
@CIP-95-Extended @Testnet
Feature: CIP-95 Static methods

@LW-10611
Scenario: [CIP-95] Static methods - user hasn't staked yet
Scenario: CIP-95 - Static methods - user hasn't staked yet
Given I open wallet: "TAWalletNonDelegated" in: extended mode
When I open CIP-95 test DApp
And I see CIP-95 test DApp authorization window
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/hooks/beforeTagHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Before(
async () => await extendedViewWalletInitialization(TestWalletName.TAWalletDelegatedFunds)
);

Before({ tags: '@Staking-NonDelegatedFunds-Extended' }, async () => {
Before({ tags: '@Staking-NonDelegatedFunds-Extended or @CIP-95-Extended' }, async () => {
await extendedViewWalletInitialization(TestWalletName.TAWalletNonDelegatedFunds);
await localStorageInitializer.disableShowingMultidelegationBetaBanner();
await localStorageInitializer.disableShowingMultidelegationDAppsIssueModal();
Expand Down
8 changes: 0 additions & 8 deletions packages/e2e-tests/src/steps/commonSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ When(/^I close a toast message$/, async () => {
await ToastMessage.clickCloseButton();
});

// TODO: deprecated step, to be removed when remaining usages are replaced inside StakingPageDelegatedFundsExtended.feature
Then(/(An|No) "([^"]*)" text is displayed/, async (expectedResult: string, expectedText: string) => {
await $(`//*[contains(text(), "${(await t(expectedText)) ?? expectedText}")]`).waitForDisplayed({
timeout: 5000,
reverse: expectedResult === 'No'
});
});

Then(
/I see that content of "([^"]*)" (public key|address) is in clipboard/,
async (walletName: string, walletProperty: string) => {
Expand Down
4 changes: 0 additions & 4 deletions packages/e2e-tests/src/steps/stakingSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ Then(
}
);

Then(/^I click pool name in currently staking component$/, async () => {
await StakingPageObject.clickPoolNameInStakingInfoComponent();
});

Then(
/^(Initial|Switching) Delegation success screen is displayed in (extended|popup) mode$/,
async (process: 'Initial' | 'Switching', mode: 'extended' | 'popup') => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const UserProfile = ({
[cx.circle]: radius === 'circle',
[cx.noBackground]: background === 'none',
})}
data-testid={testId ?? 'avatar-root'}
data-testid={'avatar-root'}
>
<RadixUIAvatar.Image
className={cx.image}
Expand Down

0 comments on commit 9edb9ca

Please sign in to comment.