Skip to content

Commit ad0e58b

Browse files
authored
test maintenance 30 Apr 2025 (#1849)
* test(extension): fix tests affected by LW-10975 * test(extension): replace hardcoded texts [LW-7278]
1 parent 9c1f768 commit ad0e58b

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

apps/browser-extension-wallet/src/views/browser-view/features/nfts/selectors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ export const nftDetailSelector = (asset: AssetOrHandleInfo): NftDetailProps => {
6262
image,
6363
tokenInformation: [
6464
{
65-
name: 'Policy ID',
65+
name: i18n.t('core.nftDetail.policyId'),
6666
value: asset.policyId.toString()
6767
},
6868
{
69-
name: 'Asset ID',
69+
name: i18n.t('core.nftDetail.assetId'),
7070
value: asset.assetId.toString()
7171
},
7272
{
73-
name: 'Media URL',
73+
name: i18n.t('core.nftDetail.mediaUrl'),
7474
value: image
7575
}
7676
],

packages/e2e-tests/src/assert/nftAssert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ class NftAssert {
8888
expect(await NftDetails.tokenInfoSectionTitle.getText()).to.equal(await t('core.nftDetail.tokenInformation'));
8989

9090
await NftDetails.policyIdLabel.waitForDisplayed();
91-
expect(await NftDetails.policyIdLabel.getText()).to.equal('Policy ID'); // TODO: replace with translation keys when LW-7278 is resolved
91+
expect(await NftDetails.policyIdLabel.getText()).to.equal(await t('core.nftDetail.policyId'));
9292
await NftDetails.policyIdValue.waitForDisplayed();
9393
await NftDetails.assetIdLabel.waitForDisplayed();
94-
expect(await NftDetails.assetIdLabel.getText()).to.equal('Asset ID');
94+
expect(await NftDetails.assetIdLabel.getText()).to.equal(await t('core.nftDetail.assetId'));
9595
await NftDetails.assetIdValue.waitForDisplayed();
9696
await NftDetails.mediaUrlLabel.waitForDisplayed();
97-
expect(await NftDetails.mediaUrlLabel.getText()).to.equal('Media URL');
97+
expect(await NftDetails.mediaUrlLabel.getText()).to.equal(await t('core.nftDetail.mediaUrl'));
9898
await NftDetails.mediaUrlValue.waitForDisplayed();
9999
}
100100

packages/e2e-tests/src/elements/addNewWallet/MainModal.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { OnboardingMainPage } from '../onboarding/mainPage';
55
class AddNewWalletMainModal extends OnboardingMainPage {
66
private MODAL = '.ant-modal-content';
77
private CLOSE_BUTTON = '[data-testid="navigation-button-cross"]';
8-
private AREA_OUTSIDE_MODAL = '.ant-modal-mask';
8+
private MODAL_MASK = '.ant-modal-mask';
99

1010
get container(): ChainablePromiseElement<WebdriverIO.Element> {
1111
return $(this.MODAL);
@@ -15,8 +15,8 @@ class AddNewWalletMainModal extends OnboardingMainPage {
1515
return $(this.CLOSE_BUTTON);
1616
}
1717

18-
get areaOutsideModal(): ChainablePromiseElement<WebdriverIO.Element> {
19-
return $(this.AREA_OUTSIDE_MODAL);
18+
get modalMask(): ChainablePromiseElement<WebdriverIO.Element> {
19+
return $(this.MODAL_MASK);
2020
}
2121
}
2222

packages/e2e-tests/src/features/AddNewWalletRestore.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Feature: Add new wallet - Restore wallet
145145
Examples:
146146
| page | action |
147147
| Mnemonic verification | I click "X" button on "Add new wallet" modal |
148-
# | Mnemonic verification | I click outside "Add new wallet" modal | BUG: LW-10975
148+
| Mnemonic verification | I click outside "Add new wallet" modal |
149149

150150
@LW-9246
151151
Scenario Outline: Extended-view - Multi-wallet - Restore - "<page>" page with any user input interaction - <action>
@@ -156,9 +156,9 @@ Feature: Add new wallet - Restore wallet
156156
Examples:
157157
| page | action |
158158
| Mnemonic verification | I click "X" button on "Add new wallet" modal |
159-
# | Mnemonic verification | I click outside "Add new wallet" modal | BUG: LW-10975
159+
| Mnemonic verification | I click outside "Add new wallet" modal |
160160
| Wallet setup | I click "X" button on "Add new wallet" modal |
161-
# | Wallet setup | I click outside "Add new wallet" modal | BUG: LW-10975
161+
| Wallet setup | I click outside "Add new wallet" modal |
162162

163163
@LW-9247
164164
Scenario Outline: Extended-view - Multi-wallet - Restore - "Add new wallet" - <page> - "Are you sure you want to cancel adding a new wallet?" dialog - go back

packages/e2e-tests/src/steps/AddNewWalletSteps.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ Then(
4949
);
5050

5151
When(/^I click outside "Add new wallet" modal$/, async () => {
52-
await AddNewWalletMainModal.areaOutsideModal.click({ x: 0, y: 0 }); // TODO: adjust when LW-10975 is resolved
52+
await AddNewWalletMainModal.modalMask.moveTo({ xOffset: 0, yOffset: 0 });
53+
await browser.action('pointer').down().perform();
5354
});
5455

5556
When(

packages/translation/src/lib/translations/core/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@
320320
"core.nftDetail.setAsAvatar": "Set as your wallet avatar",
321321
"core.nftDetail.title": "NFT detail",
322322
"core.nftDetail.tokenInformation": "Token Information",
323+
"core.nftDetail.policyId": "Policy ID",
324+
"core.nftDetail.assetId": "Asset ID",
325+
"core.nftDetail.mediaUrl": "Media URL",
323326
"core.outputSummaryList.deposit": "Deposit",
324327
"core.outputSummaryList.metaData": "Metadata",
325328
"core.outputSummaryList.output": "Bundle",

0 commit comments

Comments
 (0)