Skip to content

Commit

Permalink
fix(e2e): Removed visibility check from chains
Browse files Browse the repository at this point in the history
  • Loading branch information
HajekOndrej authored and mroz22 committed Nov 28, 2024
1 parent ba7a09c commit 8a01875
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AccountsPage {
activatNewCoin(coinName: NetworkSymbol) {
this.openAddAccountsModal();
cy.getTestElement('@modal/account/activate_more_coins').click();
cy.getTestElement(`@settings/wallet/network/${coinName}`).should('be.visible').click();
cy.getTestElement(`@settings/wallet/network/${coinName}`).click();
cy.contains('button', 'Find my').click();
cy.getTestElement('@modal').should('not.exist');
cy.discoveryShouldFinish();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class DeviceCompromisedModal {
ignoreDeviceCompromisedWarning() {
cy.getTestElement('@device-compromised/back-button').should('be.visible').click();
cy.getTestElement('@device-compromised/back-button').click();
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/suite-web/e2e/support/pageObjects/modalObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Modal {
close(): void {
cy.getTestElement('@modal/close-button').should('be.visible').click();
cy.getTestElement('@modal/close-button').click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MultiShareBackupModal {
}

finalizeMultiShareBackup(): void {
cy.getTestElement('@multi-share-backup/done/got-it-button').should('be.visible').click();
cy.getTestElement('@multi-share-backup/done/got-it-button').click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class OnboardingPage {
}

continuePin() {
cy.getTestElement('@onboarding/pin/continue-button').should('be.visible').click();
cy.getTestElement('@onboarding/pin/continue-button').click();
}

skipPin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ class SettingsDevicePage {
}

openCreateMultiShareBackup(): void {
cy.getTestElement('@settings/device/create-multi-share-backup-button')
.should('be.visible')
.click();
cy.getTestElement('@settings/device/create-multi-share-backup-button').click();
cy.getTestElement('@multi-share-backup/1st-info/submit-button').should('be.visible');
}

togglePinSwitch(): void {
cy.getTestElement('@settings/device/pin-switch').should('be.visible').wait(500).click();
cy.getTestElement('@settings/device/pin-switch').as('pinSwitch').should('be.visible');
cy.wait(500);
cy.get('@pinSwitch').click();
}

togglePassphraseSwitch(): void {
cy.getTestElement('@settings/device/passphrase-switch')
.as('passphraseSwitch')
.scrollIntoView();

cy.get('@passphraseSwitch').should('be.visible').click();
cy.get('@passphraseSwitch').should('be.visible');
cy.get('@passphraseSwitch').click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

class SettingsMenu {
openDeviceSettings(): void {
cy.getTestElement('@settings/menu/device').should('be.visible').click();
cy.getTestElement('@settings/menu/device').click();
}

openWalletSettings(): void {
cy.getTestElement('@settings/menu/wallet').should('be.visible').click();
cy.getTestElement('@settings/menu/wallet').click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class SuiteGuide {
openSidePanel() {
cy.getTestElement('@guide/button-open', { timeout: 20000 }).should('be.visible').click();
cy.getTestElement('@guide/button-open', { timeout: 20000 }).click();
cy.getTestElement('@guide/panel').should('exist');
}

Expand Down
9 changes: 3 additions & 6 deletions packages/suite-web/e2e/support/utils/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const passThroughInitialRun = ({ viewOnly = true } = {}) => {
} else {
cy.getTestElement('@onboarding/viewOnly/skip').click();
}
cy.getTestElement('@viewOnlyTooltip/gotIt', { timeout: 10_000 }).should('be.visible').click();
cy.getTestElement('@viewOnlyTooltip/gotIt', { timeout: 10_000 }).click();
};

export const passThroughAuthenticityCheck = () => {
Expand Down Expand Up @@ -133,12 +133,9 @@ export const enableRegtestAndGetCoins = ({ payments = [] }) => {

export const createAccountFromMyAccounts = (coin: string, label: string) => {
cy.getTestElement('@wallet/discovery-progress-bar', { timeout: 30000 }).should('not.exist');
cy.getTestElement('@account-menu/add-account').should('be.visible').click();
// if (cy.getTestElement('@modal').should('be.visible')) {
// cy.getTestElement('@account-menu/add-account').should('be.visible').click();
// }
cy.getTestElement('@account-menu/add-account').click();
cy.getTestElement('@modal').should('be.visible');
cy.get(`[data-testid="@settings/wallet/network/${coin}"]`).should('be.visible').click();
cy.get(`[data-testid="@settings/wallet/network/${coin}"]`).click();
cy.getTestElement('@add-account-type/select/input').click();
cy.get(`[data-testid="@add-account-type/select/option/${label}"]`).click();
cy.getTestElement('@add-account').click();
Expand Down
2 changes: 1 addition & 1 deletion packages/suite-web/e2e/tests/dashboard/assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe.skip('Assets', () => {

cy.get('[class^="AssetsView__Grid"]').then(grid => {
cy.wrap(grid).contains('Bitcoin').should('be.visible');
cy.wrap(grid).contains('Ethereum').should('be.visible').click();
cy.wrap(grid).contains('Ethereum').click();
});

cy.findAnalyticsEventByType<ExtractByEventType<EventType.SelectWalletType>>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Passphrase with cardano', () => {
cy.wrap(wallet)
.find('[data-testid="@collapsible-box/icon-collapsed"]')
.click({ scrollBehavior: 'bottom' });
cy.wrap(wallet).find('[data-testid$="/enabled"]').should('be.visible').click();
cy.wrap(wallet).find('[data-testid$="/enabled"]').click();
});

cy.getTestElement('@switch-device/cancel-button').first().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ describe('Passphrase numbering', () => {

// eject standard and the first hidden wallet
cy.getTestElement('@switch-device/wallet-on-index/0/eject-button').click();
cy.getTestElement('@switch-device/eject').should('be.visible').click();
cy.getTestElement('@switch-device/eject').click();

cy.getTestElement('@switch-device/wallet-on-index/0/eject-button').click();
cy.getTestElement('@switch-device/eject').should('be.visible').click();
cy.getTestElement('@switch-device/eject').click();

// add standard and another hidden wallet
cy.getTestElement('@switch-device/add-wallet-button').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('Account types suite', () => {
).then(currentAccounts => {
const numberOfAccounts1 = currentAccounts.length;

cy.getTestElement('@account-menu/add-account').should('be.visible').click();
cy.getTestElement('@account-menu/add-account').click();
cy.getTestElement('@modal').should('be.visible');
cy.get(`[data-testid="@settings/wallet/network/${coin}"]`)
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Sign and verify', () => {

cy.wait(300); // wait until is the dropdown loaded
cy.getTestElement('@wallet/menu/extra-dropdown').click();
cy.getTestElement('@wallet/menu/wallet-sign-verify').should('be.visible').click();
cy.getTestElement('@wallet/menu/wallet-sign-verify').click();
});

/* Test case
Expand Down

0 comments on commit 8a01875

Please sign in to comment.