Skip to content

Commit

Permalink
test: e2e - last round of fixing & disabling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljagiela committed Jan 24, 2025
1 parent b344450 commit a9986ed
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 13 deletions.
3 changes: 1 addition & 2 deletions packages/e2e-tests/src/assert/nftAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import chaiSorted from 'chai-sorted';
import testContext from '../utils/testContext';
import { Asset } from '../data/Asset';
import adaHandleAssert from './adaHandleAssert';
import { scrollToTheTop } from '../utils/scrollUtils';
import NftsCommon from '../elements/NFTs/nftsCommon';

use(chaiSorted);
Expand Down Expand Up @@ -125,7 +124,7 @@ class NftAssert {
await NftsPage.waitForNft(nftName);
} catch {
if (!shouldBeDisplayed) {
await scrollToTheTop(`${NftsPage.LIST_CONTAINER} ${NftsPage.NFT_CONTAINER}`);
await NftsPage.scrollToTheTop();
}
}
const nftItem = await NftsPage.getNftContainer(nftName);
Expand Down
3 changes: 1 addition & 2 deletions packages/e2e-tests/src/assert/nftCreateFolderAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import YoullHaveToStartAgainModal from '../elements/NFTs/youllHaveToStartAgainMo
import NftsFolderPage from '../elements/NFTs/nftsFolderPage';
import adaHandleAssert from './adaHandleAssert';
import { browser } from '@wdio/globals';
import { scrollToTheTop } from '../utils/scrollUtils';
import NftsCommon from '../elements/NFTs/nftsCommon';

class NftCreateFolderAssert {
Expand Down Expand Up @@ -101,7 +100,7 @@ class NftCreateFolderAssert {
async verifySeeAllOwnedNfts() {
const ownedNftNames = testContext.load('ownedNfts');

await scrollToTheTop(`${TokenSelectionPage.ASSET_SELECTOR_CONTAINER} ${TokenSelectionPage.NFT_CONTAINER}`); // make sure we are starting from the top
await TokenSelectionPage.scrollToTheTop(); // make sure we are starting from the top

const displayedNftNames = await NftsCommon.getAllNftNamesWithScroll(
`${TokenSelectionPage.ASSET_SELECTOR_CONTAINER} ${TokenSelectionPage.NFT_CONTAINER}`
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/src/elements/NFTs/nftsCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class NftsCommon {
while (hasMoreItems) {
for (const nftElement of nftElements) {
const nftName = await nftElement.getText();
if (!nftNames.includes(nftName)) {
if (!nftNames.includes(nftName) && !nftName.toLowerCase().includes('folder')) {
// skip saving folders
nftNames.push(nftName);
}
}
Expand Down
6 changes: 5 additions & 1 deletion packages/e2e-tests/src/elements/NFTs/nftsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChainablePromiseArray } from 'webdriverio/build/types';
import { ChainablePromiseElement } from 'webdriverio';
import testContext from '../../utils/testContext';
import { browser } from '@wdio/globals';
import { scrollDownWithOffset } from '../../utils/scrollUtils';
import { scrollDownWithOffset, scrollToTheTop } from '../../utils/scrollUtils';
import NftsCommon from './nftsCommon';

class NftsPage {
Expand Down Expand Up @@ -108,6 +108,10 @@ class NftsPage {
}
);
}

async scrollToTheTop() {
await scrollToTheTop(`${this.LIST_CONTAINER} ${this.NFT_CONTAINER}`);
}
}

export default new NftsPage();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import testContext from '../../utils/testContext';
import { generateRandomString } from '../../utils/textUtils';
import { TokenSearchResult } from './tokenSearchResult';
import { browser } from '@wdio/globals';
import { scrollDownWithOffset } from '../../utils/scrollUtils';
import { scrollDownWithOffset, scrollToTheTop } from '../../utils/scrollUtils';
import { ChainablePromiseElement } from 'webdriverio';

class TokenSelectionPage extends CommonDrawerElements {
Expand Down Expand Up @@ -251,6 +251,10 @@ class TokenSelectionPage extends CommonDrawerElements {
}
}
}

async scrollToTheTop() {
await scrollToTheTop(`${this.ASSET_SELECTOR_CONTAINER} ${this.NFT_CONTAINER}`);
}
}

export default new TokenSelectionPage();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Feature: Send - Multiple selection for Extended Browser View
Background:
Given Wallet is synced

@LW-5043
@LW-5043 @Pending
@issue=LW-12151
Scenario Outline: Extended view - Send - Multiple tokens selection - <assetsType> - happy path
And I click "Send" button on page header
When I enter a valid "shelley" address in the bundle 1 recipient's address
Expand Down Expand Up @@ -65,7 +66,8 @@ Feature: Send - Multiple selection for Extended Browser View
| Tokens |
| NFTs |

@LW-5046
@LW-5046 @Pending
@issue=LW-12151
Scenario Outline: Extended view - Send - Multiple tokens selection - <assetsType> - clear and cancel
And I click "Send" button on page header
When I enter a valid "shelley" address in the bundle 1 recipient's address
Expand All @@ -91,7 +93,8 @@ Feature: Send - Multiple selection for Extended Browser View
| Tokens |
| NFTs |

@LW-5267
@LW-5267 @Pending
@issue=LW-12151
Scenario Outline: Extended view - Send - Multiple tokens selection - <assetsType> - Maximum amount to select is 30
And I click "Send" button on page header
When I enter a valid "shelley" address in the bundle 1 recipient's address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Feature: Send - Multiple selection for Popup View
Background:
Given Wallet is synced

@LW-5044
@LW-5044 @Pending
@issue=LW-12151
Scenario Outline: Popup view - Send - Multiple tokens selection - <assetsType> - happy path
And I click "Send" button on Tokens page in popup mode
When I enter a valid "shelley" address in the bundle 1 recipient's address
Expand All @@ -26,7 +27,8 @@ Feature: Send - Multiple selection for Popup View
| Tokens |
| NFTs |

@LW-5045
@LW-5045 @Pending
@issue=LW-12151
Scenario Outline: Extended view - Send - Multiple tokens selection - <assetsType> - clear and cancel
And I click "Send" button on Tokens page in popup mode
When I enter a valid "shelley" address in the bundle 1 recipient's address
Expand All @@ -52,7 +54,8 @@ Feature: Send - Multiple selection for Popup View
| Tokens |
| NFTs |

@LW-5268
@LW-5268 @Pending
@issue=LW-12151
Scenario Outline: Extended view - Send - Multiple tokens selection - <assetsType> - Maximum amount to select is 30
And I click "Send" button on Tokens page in popup mode
When I enter a valid "shelley" address in the bundle 1 recipient's address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default new (class NewTransactionExtendedPageObject {
const nftNames = await NftsCommon.getAllNftNamesWithScroll(
`${TokenSelectionPage.ASSET_SELECTOR_CONTAINER} ${TokenSelectionPage.NFT_CONTAINER}`
);
await TokenSelectionPage.scrollToTheTop();
let nftsCount = nftNames.length;
for (const nftName of nftNames) {
nftsCount--;
Expand Down
2 changes: 2 additions & 0 deletions packages/e2e-tests/src/steps/nftFoldersSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Given(
);

When(/^I click "Create folder" button on NFTs page$/, async () => {
await NftsPage.createFolderButton.waitForClickable();
await NftsPage.createFolderButton.click();
});

Expand Down Expand Up @@ -206,6 +207,7 @@ Then(/^I can see "Add NFT" button active$/, async () => {
When(
/^I (left|right) click on the NFT folder with name "([^"]*)"$/,
async (clickType: 'left' | 'right', folderName: string) => {
await NftsPage.scrollToTheTop();
const nftFolder = await NftsPage.getFolder(folderName);
await nftFolder.click({ button: clickType });
}
Expand Down

0 comments on commit a9986ed

Please sign in to comment.