Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/LW-10194-unify-m…
Browse files Browse the repository at this point in the history
…ultiwallet-and-onboarding-codebases
  • Loading branch information
szymonmaslowski committed May 14, 2024
2 parents 0e565eb + d2438f8 commit 786b901
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
8 changes: 4 additions & 4 deletions packages/common/src/ui/lib/add-ellipsis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export const truncate = (text: string, partOneLength: number, partTwoLength: num
return `${text.slice(0, partOneLength)}${text.slice(text.length - partTwoLength)}`;
};

export const addEllipsis = (text: string, partOnelength: number, partTwoLength: number): string => {
const textMinLenght = partOnelength + partTwoLength + addedLength;
if (text.length <= textMinLenght) return text;
export const addEllipsis = (text: string, partOneLength: number, partTwoLength: number): string => {
const textMinLength = partOneLength + partTwoLength + addedLength;
if (text.length <= textMinLength) return text;

return `${text.slice(0, partOnelength)}...${text.slice(text.length - partTwoLength)}`;
return `${text.slice(0, partOneLength)}...${text.slice(text.length - partTwoLength)}`;
};

const getCssStyle = (element: HTMLElement, prop: string) => window.getComputedStyle(element).getPropertyValue(prop);
Expand Down
10 changes: 7 additions & 3 deletions packages/core/src/ui/components/Nft/NftDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InlineInfoList, LabeledInfo } from '@lace/common';
import { Ellipsis, InlineInfoList, LabeledInfo } from '@lace/common';
import React, { ReactNode } from 'react';
import styles from './NftDetail.module.scss';
import { NftImage } from './NftImage';
Expand Down Expand Up @@ -74,13 +74,17 @@ export const NftDetail = ({
<FolderOutlined />
<span>Root</span>
</Breadcrumb.Item>
{folder && <Breadcrumb.Item>{folder}</Breadcrumb.Item>}
{folder && (
<Breadcrumb.Item>
<Ellipsis text={folder} beforeEllipsis={5} afterEllipsis={5} />
</Breadcrumb.Item>
)}
</Breadcrumb>
) : (
<Flex justifyContent="space-between" gap="$1">
<Box>Root</Box>
{folder && <Box px="$8">{'>'}</Box>}
{folder && <Box>{folder}</Box>}
{folder && <Ellipsis text={folder} beforeEllipsis={5} afterEllipsis={5} />}
</Flex>
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/ui/lib/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@
"core.walletSetupSelectAccountsStep.walletName": "Wallet name",
"core.walletSetupStep.allDone": "All done",
"core.walletSetupStep.back": "Back",
"core.walletSetupStep.connectWallet": "Connect wallet",
"core.walletSetupStep.connectWallet": "Connect device",
"core.walletSetupStep.enterWallet": "Enter wallet",
"core.walletSetupStep.legalAndAnalytics": "Legal & analytics",
"core.walletSetupStep.nameWallet": "Name wallet",
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/src/assert/transactionDetailsAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class TransactionsDetailsAssert {
const actualIds: string[] = await TransactionDetailsPage.getTransactionDetailsStakepoolIds();
const actualNames: string[] = await TransactionDetailsPage.getTransactionDetailsStakepoolNames();
const actualTickers: string[] = await TransactionDetailsPage.getTransactionDetailsStakepoolTickers();
if (actualIds[0].endsWith(expectedTickers[0].split('...')[1])) expectedTickers[0] = '-';

expect(actualIds).to.have.all.members(expectedIds);
expect(actualNames).to.have.all.members(expectedNames);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class MultidelegationPage {
private STAKE_POOLS_LIST_CONTAINER = '[data-testid="stake-pools-list-container"]';
private STAKE_POOL_LIST_ROW_SKELETON = '[data-testid="stake-pool-list-row-skeleton"]';
private STAKE_POOL_CARD_SKELETON = '[data-testid="stake-pool-card-skeleton"]';
private SELCECTED_STAKE_POOLS_IN_GRID_VIEW = '[data-testid="selected-pools-list"] [data-testid="stake-pool-card"]';
private SELCECTED_STAKE_POOLS_IN_LIST_VIEW = '[data-testid="selected-pools-list"] [data-testid="stake-pool-item"]';
private SELECTED_STAKE_POOLS_IN_GRID_VIEW = '[data-testid="selected-pools-list"] [data-testid="stake-pool-card"]';
private SELECTED_STAKE_POOLS_IN_LIST_VIEW = '[data-testid="selected-pools-list"] [data-testid="stake-pool-item"]';
private POOLS_COUNTER = '[data-testid="pools-counter"]';

get title() {
Expand Down Expand Up @@ -294,11 +294,11 @@ class MultidelegationPage {
}

get selectedPoolsInGridView() {
return $$(this.SELCECTED_STAKE_POOLS_IN_GRID_VIEW);
return $$(this.SELECTED_STAKE_POOLS_IN_GRID_VIEW);
}

get selectedPoolsInListView() {
return $$(this.SELCECTED_STAKE_POOLS_IN_LIST_VIEW);
return $$(this.SELECTED_STAKE_POOLS_IN_LIST_VIEW);
}

get moreOptionsComponent(): typeof MoreOptionsComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ Feature: Staking Page - Switching pools - Extended Browser View - E2E
And I enter correct wallet password and confirm staking
Then Switching staking success drawer is displayed
When I click "Close" button on staking success drawer
And I navigate to Transactions extended page
Then I can see transaction 1 with type "Delegation"
And I navigate to Staking extended page
And I open Overview tab
And I wait until "-" pool is on "Your pools" list
And I save identifiers of stake pools currently in use
And I navigate to Transactions extended page
Then I can see transaction 1 with type "Delegation"
When I click on a transaction: 1
Then The Tx details are displayed for Staking without metadata

0 comments on commit 786b901

Please sign in to comment.