Skip to content

Commit

Permalink
test(extension): maintenance 4th Apr 2024 (#1025)
Browse files Browse the repository at this point in the history
* test(extension): fix LW-2338, LW-6661, LW-6662

* test(extension): block LW-2343 due to bug

* test(extension): block LW-2541 due to bug

* test(extension): fix LW-8501
  • Loading branch information
wklos-iohk authored Apr 4, 2024
1 parent 3dc5e5e commit e89d70f
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 7 deletions.
15 changes: 13 additions & 2 deletions packages/e2e-tests/src/assert/educationalListAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,23 @@ class EducationalListAssert {
const glossaryTranslation = await t(this.glossaryTranslationPath);
const videoTranslation = await t(this.videoTranslationPath);
const expectedTitle = await t('browserView.sidePanel.aboutYourWallet');
const expectedTitles = [glossaryTranslation, faqTranslation, videoTranslation, videoTranslation];
const expectedTitles = [
glossaryTranslation,
faqTranslation,
videoTranslation,
videoTranslation,
faqTranslation,
faqTranslation,
faqTranslation
];
const expectedSubtitles = [
await t('educationalBanners.subtitle.whatIsADigitalAsset'),
await t('educationalBanners.subtitle.howToSendReceiveFunds'),
await t('educationalBanners.subtitle.secureSelfCustody'),
await t('educationalBanners.subtitle.connectingDApps')
await t('educationalBanners.subtitle.connectingDApps'),
await t('educationalBanners.subtitle.conwayEra'),
await t('educationalBanners.subtitle.governanceFeatures'),
await t('educationalBanners.subtitle.governanceActions')
];
await this.assertSeeWidget(expectedTitle, expectedTitles, expectedSubtitles);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/assert/tokensPageAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TokensPageAssert {
assertCounterNumberMatchesWalletTokens = async () => {
const tokensCounterValue = Number((await TokensPage.counter.getText()).slice(1, -1));
if (tokensCounterValue > 0) await TokensPage.coinGeckoCredits.scrollIntoView();
await browser.pause(1000);
await TokensPage.tokenRowSkeleton.waitForDisplayed({ reverse: true, timeout: 60_000 });
const rowsNumber = (await TokensPage.getRows()).length;
expect(rowsNumber).to.equal(tokensCounterValue);
};
Expand Down
5 changes: 5 additions & 0 deletions packages/e2e-tests/src/elements/tokensPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TokensPage {
private CLOSED_EYE_ICON = '[data-testid="closed-eye-icon"]';
private OPENED_EYE_ICON = '[data-testid="opened-eye-icon"]';
private VIEW_ALL_BUTTON = '[data-testid="view-all-button"]';
private TOKEN_ROW_SKELETON = '.ant-skeleton';

get sendButtonPopupMode(): ChainablePromiseElement<WebdriverIO.Element> {
return $(this.SEND_BUTTON_POPUP_MODE);
Expand Down Expand Up @@ -98,6 +99,10 @@ class TokensPage {
return $(this.OPENED_EYE_ICON);
}

get tokenRowSkeleton(): ChainablePromiseElement<WebdriverIO.Element> {
return $(this.TOKEN_ROW_SKELETON);
}

async getRows(): Promise<WebdriverIO.ElementArray> {
return $$(this.TOKENS_TABLE_ROW);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,12 @@ Feature: Onboarding - Create wallet
Scenario: Create Wallet - Mnemonic verification - incorrect word order
Given I click "Create" button on wallet setup page
Then "Mnemonic writedown" page is displayed with 24 words
And I save mnemonic words
And I click "Next" button during wallet setup
When I enter 24 incorrect mnemonic words on "Mnemonic verification" page
When I fill passphrase fields using saved 24 words mnemonic in incorrect order
Then I see incorrect passphrase error displayed
And "Next" button is disabled during onboarding process
When I enter 24 correct mnemonic words on "Mnemonic verification" page
When I enter saved mnemonic words
Then "Next" button is enabled during onboarding process

@LW-10138
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/src/features/TokensPagePopup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Feature: LW: Tokens tab - popup view
Background:
Given Wallet is synced

@LW-2343 @Testnet @Mainnet
@LW-2343 @Testnet @Mainnet @Pending
@issue=LW-10211
Scenario: Tokens title and counter
When I see Tokens counter with total number of tokens displayed
Then Tokens counter matches the number of wallet tokens
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/src/features/TransactionsPopup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Feature: Transactions - Popup view
When I navigate to Transactions popup page
Then Transactions section is displayed

@LW-2541 @LW-2543 @LW-2544 @Testnet
@LW-2541 @LW-2543 @LW-2544 @Testnet @Pending
@issue=LW-101212
Scenario: Popup View - Transactions tab - Counter matches the number of rows, transactions are loaded and skeleton disappears
When I navigate to Transactions popup page
And Transactions section is displayed
Expand Down
6 changes: 6 additions & 0 deletions packages/e2e-tests/src/steps/onboardingSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import analyticsBanner from '../elements/analyticsBanner';
import { getWalletsFromRepository } from '../fixture/walletRepositoryInitializer';
import OnboardingWalletSetupPageAssert from '../assert/onboarding/onboardingWalletSetupPageAssert';
import OnboardingAnalyticsBannerAssert from '../assert/onboarding/onboardingAnalyticsBannerAssert';
import { shuffle } from '../utils/arrayUtils';

const mnemonicWords: string[] = getTestWallet(TestWalletName.TestAutomationWallet).mnemonic ?? [];
const invalidMnemonicWords: string[] = getTestWallet(TestWalletName.InvalidMnemonic).mnemonic ?? [];
Expand Down Expand Up @@ -408,3 +409,8 @@ Then(/^I see Analytics banner displayed correctly$/, async () => {
Then(/^I (see|do not see) Analytics banner$/, async (shouldSee: 'see' | 'do not see') => {
await OnboardingAnalyticsBannerAssert.assertBannerIsVisible(shouldSee === 'see');
});

When(/^I fill passphrase fields using saved 24 words mnemonic in incorrect order$/, async () => {
const shuffledWords = shuffle([...mnemonicWordsForReference]);
await RecoveryPhrasePage.enterMnemonicWords(shuffledWords);
});

0 comments on commit e89d70f

Please sign in to comment.