Skip to content

Commit

Permalink
Merge branch 'main' into feat/LW-10289-use-handleprovider-from-SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
VanessaPC committed May 3, 2024
2 parents b2995d5 + eebf8f3 commit 1b2b200
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 29 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/e2e-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ env:
NETWORK: ${{ github.event.inputs.network || 'preprod' }}
RUN: ${{ github.run_number }}
DISPLAY: ':99.0'
NODE_OPTIONS: --max-old-space-size=16384

jobs:
tests:
Expand Down Expand Up @@ -73,7 +74,7 @@ jobs:
eval "$runCommand";
- name: Create allure properties
if: always()
working-directory: ./packages/e2e-tests/reports/allure/results
working-directory: './packages/e2e-tests/reports/allure/results'
run: |
echo "
env=${NETWORK}
Expand All @@ -82,19 +83,20 @@ jobs:
platform=Linux
" > environment.properties
- name: Publish allure report to S3
uses: andrcuns/allure-publish-action@v1.0.1
uses: andrcuns/allure-publish-action@v2.6.0
if: always()
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.E2E_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }}
with:
storageType: s3
resultsGlob: './packages/e2e-tests/reports/allure/results/*'
resultsGlob: './packages/e2e-tests/reports/allure/results'
bucket: lace-e2e-test-results
prefix: 'all/linux/${BROWSER}/${RUN}'
copyLatest: true
ignoreMissingResults: true
baseUrl: 'https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}'
- name: Publish artifacts (logs, reports, screenshots)
uses: actions/upload-artifact@v4
if: always()
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/e2e-tests-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,20 @@ jobs:
name: test-artifacts
path: ./packages/e2e-tests
- name: Publish allure report to S3
uses: andrcuns/allure-publish-action@v1.0.1
uses: andrcuns/allure-publish-action@v2.6.0
if: always()
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.E2E_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }}
with:
storageType: s3
resultsGlob: './packages/e2e-tests/reports/allure/results/*'
resultsGlob: './packages/e2e-tests/reports/allure/results'
bucket: lace-e2e-test-results
prefix: 'all/windows/${BROWSER}/${RUN}'
copyLatest: true
ignoreMissingResults: true
baseUrl: 'https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}'
- name: Add link to summary
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
platform=Linux
" > environment.properties
- name: Publish allure report to S3
uses: andrcuns/allure-publish-action@v2.4.0
uses: andrcuns/allure-publish-action@v2.6.0
if: always()
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import uniq from 'lodash/uniq';
import flatMap from 'lodash/flatMap';
import { Skeleton } from 'antd';
import { Wallet } from '@lace/cardano';
import type { ActivityType } from '@lace/core';
import {
AssetActivityListProps,
ActivityStatus,
TxOutputInput,
TxSummary,
AssetActivityListProps,
DelegationActivityType,
RewardsDetails,
TransactionActivityType,
DelegationActivityType
TxOutputInput,
TxSummary
} from '@lace/core';
import type { ActivityType } from '@lace/core';
import { PriceResult } from '@hooks';
import { useWalletStore } from '@stores';
import { ActivityDetail as ActivityDetailType } from '@src/types';
Expand Down Expand Up @@ -54,7 +54,8 @@ export const getTransactionData = ({
return outputData.map((output) => ({
...output,
// Show up to 5 addresses below multiple addresses (see LW-4040)
addr: addrs.slice(0, MAX_SUMMARY_ADDRESSES)
addr: addrs.slice(0, MAX_SUMMARY_ADDRESSES),
type: TransactionActivityType.incoming
}));
}

Expand All @@ -63,7 +64,8 @@ export const getTransactionData = ({
.filter((output) => !walletAddresses.includes(output.addr))
.map((output) => ({
...output,
...(!Array.isArray(output.addr) && { addr: [output.addr] })
...(!Array.isArray(output.addr) && { addr: [output.addr] }),
type: TransactionActivityType.outgoing
}));
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { TransactionActivityType } from '@ui/components/ActivityDetail/types';

export interface TransactionDetailAsset {
icon?: string;
title: string;
Expand All @@ -22,6 +24,7 @@ export interface TxOutputInput {

export interface TxSummary extends Omit<TxOutputInput, 'addr'> {
addr: string[];
type: TransactionActivityType;
}

interface TxMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
TxDetailsProposalProceduresTitles,
TxDetailsCertificateTitles,
TxDetails,
TxDetail
TxDetail,
TransactionActivityType
} from './types';
import { Collateral, CollateralStatus } from './Collateral';

Expand Down Expand Up @@ -345,7 +346,7 @@ export const TransactionDetails = ({
</div>
<div className={styles.details}>
<div className={styles.title}>
{t(`core.activityDetails.${name.toLowerCase() === 'sent' ? 'to' : 'from'}`)}
{t(`core.activityDetails.${summary.type === TransactionActivityType.outgoing ? 'to' : 'from'}`)}
</div>
<div>
{summary.addr.length > 1 && (
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/src/assert/drawerSendExtendedAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class DrawerSendExtendedAssert {
assertSeeSendDrawer = async (mode: 'extended' | 'popup') => {
await this.assertSeeDrawerTitle(mode === 'extended');
const addressInput = new AddressInput();
await addressInput.input.waitForStable();
await addressInput.input.waitForDisplayed();
await addressInput.label.waitForDisplayed();
expect(await addressInput.label.getText()).to.equal(await t('core.destinationAddressInput.recipientAddress'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class TransactionBundleAssert {
for (let i = 1; i <= expectedNumberOfBundles; i++) {
const bundle = new TransactionBundle(i);
if (expectedNumberOfBundles > 1) {
await bundle.bundleTitle.waitForStable();
await bundle.bundleTitle.waitForDisplayed();
expect(await bundle.bundleTitle.getText()).to.equal(`${await t('core.outputSummaryList.output')} ${i}`);
await bundle.bundleRemoveButton.waitForDisplayed();
Expand Down
4 changes: 4 additions & 0 deletions packages/e2e-tests/src/features/AdaHandleExtended.feature
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Feature: ADA handle - extended view
And Clipboard contains text: "$test_handle_3"

@LW-7427 @LW-7426
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the wallet address/NFTs/NFT details page
When I click "Receive" button on page header
Then I see ADA handle with custom image on the "Wallet Address" page
Expand All @@ -109,6 +110,7 @@ Feature: ADA handle - extended view
Then I see ADA handle NFT details page with custom image in extended mode

@LW-7430
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the send/coin selector page
When I click "Send" button on page header
And I click "Add token or NFT" button for bundle 1
Expand All @@ -119,6 +121,7 @@ Feature: ADA handle - extended view
Then the "$test_handle_1" asset is displayed in bundle 1

@LW-7429
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the NFT folder thumbnail/page
Given I navigate to NFTs extended page
And I click "Receive" button on page header
Expand All @@ -136,6 +139,7 @@ Feature: ADA handle - extended view
Then I see ADA handle NFT with custom image on the NFT folder page

@LW-7428
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the "Select NFT" (folder) screen
Given I navigate to NFTs extended page
And I click "Receive" button on page header
Expand Down
4 changes: 4 additions & 0 deletions packages/e2e-tests/src/features/AdaHandlePopup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Feature: ADA handle - popup view
And Clipboard contains text: "$test_handle_3"

@LW-7435 @LW-7436
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom ADA handle image on the wallet address/NFTs/NFT details page
And I click "Receive" button on Tokens page in popup mode
Then I see ADA handle with custom image on the "Wallet Address" page
Expand All @@ -108,6 +109,7 @@ Feature: ADA handle - popup view
Then I see ADA handle NFT details page with custom image in popup mode

@LW-7432
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom ADA handle image on the send/coin selector page
When I click "Send" button on Tokens page in popup mode
And I click "Add token or NFT" button for bundle 1
Expand All @@ -118,6 +120,7 @@ Feature: ADA handle - popup view
Then the "$test_hand..." asset is displayed in bundle 1

@LW-7434
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom ADA handle image on the NFT folder thumbnail/page
Given I click "Receive" button on Tokens page in popup mode
And I see handles listed on the "Receive" screen
Expand All @@ -134,6 +137,7 @@ Feature: ADA handle - popup view
Then I see ADA handle NFT with custom image on the NFT folder page

@LW-7433
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom image from a handle on the "Select NFT" (folder) screen
Given I click "Receive" button on Tokens page in popup mode
And I see handles listed on the "Receive" screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: ADA handle - extended view
And I use a wallet with ADA handle "$handletosend" NFT in extended mode

@LW-7073
@Pending @issue=LW-10445
Scenario: Extended view - Ada handle transfer e2e, review flow
Given I validate that handle: "$handletosend" is listed on the Receive screen
And I add address with name: "$handletosend" and address: "$handletosend" to address book in extended mode
Expand Down
2 changes: 2 additions & 0 deletions packages/e2e-tests/src/features/CollateralPopup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Feature: Collateral - popup view
When I click on "Collateral" setting
And I fill correct password and confirm collateral
Then I see collateral as: "Active" in settings
And I see a toast with text: "Collateral added"
And I close a toast message
And I navigate to Transactions popup page
And I can see transaction 1 with type "Self Transaction"
When I switch network to: "Preview" in popup mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Feature: Send - Extended Browser View (Advanced Tx)
And click on the coin selector for "tADA" asset in bundle 2
And click on an token with name: "LaceCoin"
And I enter a value of: 1 to the "LaceCoin1" asset in bundle 2
Then transaction fee is around 0.26 ADA and Ada allocation cost is around 1.07 ADA
Then transaction fee is around 0.20 ADA and Ada allocation cost is around 1.07 ADA

@LW-4505
Scenario: Extended-view - Cancel transaction with multiple bundles on Summary page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
Then I verify transaction costs amount is around 0.00 ADA
And I enter a valid "shelley" address in the bundle 1 recipient's address
When I enter a value of: 2 to the "tADA" asset
Then I verify transaction costs amount is around 0.25 ADA
Then I verify transaction costs amount is around 0.17 ADA

@LW-2370 @Testnet @Mainnet
Scenario: Extended-view - Tx summary page is displayed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ Feature: Send Transactions from Dapp - E2E
| -2 LaceCoin2 |
And I expand "From address" section in DApp transaction window
And I see DApp connector "Confirm transaction" page "From address" section with following data:
| Address WalletSendDappTransactionE2E |
| Tokens -2 item(s) |
| -1.38 tADA - FEE |
| -2 LaceCoin2 |
| Address WalletSendDappTransactionE2E own |
| Tokens -2 item(s) |
| -1.38 tADA - FEE |
| -2 LaceCoin2 |
And I expand "To address" section in DApp transaction window
And I see DApp connector "Confirm transaction" page "To address" section with following data:
| Address WalletReceiveDappTransactionE2E |
| Tokens 2 item(s) |
| 1.38 tADA |
| 2 LaceCoin2 |
| Address WalletReceiveDappTransactionE2E foreign |
| Tokens 2 item(s) |
| 1.38 tADA |
| 2 LaceCoin2 |
And I save fee value on DApp "Confirm transaction" page
And I click "Confirm" button on "Confirm transaction" page
And I see DApp connector "Sign transaction" page
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/src/steps/commonSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ Then(/^I (see|don't see) a toast with text: "([^"]*)"$/, async (shouldSee: strin
'Given name already exists': 'addressBook.errors.givenNameAlreadyExist',
'Switched network': 'browserView.settings.wallet.network.networkSwitched',
'Network Error': 'general.errors.networkError',
'Copied to clipboard': 'general.clipboard.copiedToClipboard'
'Copied to clipboard': 'general.clipboard.copiedToClipboard',
'Collateral added': 'browserView.settings.wallet.collateral.toast.add'
};

const translationKey = toastTextToTranslationKeyMap[toastText];
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/steps/dAppConnectorSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Then(

const defaultDAppTransactionData: ExpectedTransactionData = {
typeOfTransaction: 'Send',
assetsDetails: ['-3 tADA']
assetsDetails: ['-3 tADA - FEE']
};

switch (expectedPage) {
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/src/utils/dappConnectorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const subtractFeeFromCucumberListElement = async (entry: string) => {
};

const shortenAddressFromCucumberListElement = (wallet: string) => {
const [addressLabel, walletValue] = wallet.split(' ');
const [addressLabel, walletValue, source] = wallet.split(' ');
const fullAddress = String(getTestWallet(walletValue).address);
return `${addressLabel} ${fullAddress.slice(0, 8)}...${fullAddress.slice(-8)}`;
return `${addressLabel} ${fullAddress.slice(0, 8)}...${fullAddress.slice(-8)} ${source}`;
};

export const parseDappCucumberAssetList = async (assetsList: string[]): Promise<string[]> =>
Expand Down

0 comments on commit 1b2b200

Please sign in to comment.