Skip to content

Commit

Permalink
fix: [lw-11875] remove status info from reward activity details (#1577)
Browse files Browse the repository at this point in the history
  • Loading branch information
vetalcore authored Dec 6, 2024
1 parent 6f838b9 commit b3b1d06
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export const ActivityDetail = ({ price }: ActivityDetailProps): ReactElement =>
return (
<RewardsDetails
name={name}
status={activityInfo.status}
includedDate={activityInfo.activity.includedUtcDate}
includedTime={activityInfo.activity.includedUtcTime}
amountTransformer={amountTransformer}
Expand Down
11 changes: 0 additions & 11 deletions packages/core/src/ui/components/ActivityDetail/RewardsDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import cn from 'classnames';
import { Tooltip } from 'antd';
import styles from './TransactionDetails.module.scss';
import { ActivityStatus } from '../Transaction';
import { Ellipsis } from '@lace/common';
import { ActivityDetailHeader } from './ActivityDetailHeader';
import { useTranslation } from 'react-i18next';
Expand All @@ -21,7 +20,6 @@ export type RewardsInfo = {
export interface RewardsDetailsProps {
name: string;
headerDescription?: string;
status: ActivityStatus.SPENDABLE;
includedDate: string;
includedTime: string;
amountTransformer: (amount: string) => string;
Expand All @@ -32,7 +30,6 @@ export interface RewardsDetailsProps {
export const RewardsDetails = ({
name,
headerDescription,
status,
includedDate,
includedTime,
amountTransformer,
Expand Down Expand Up @@ -117,14 +114,6 @@ export const RewardsDetails = ({
</div>
)}

<div className={styles.details}>
<div className={styles.title} data-testid="rewards-status-title">
{t('core.activityDetails.status')}
</div>
<div data-testid="rewards-status" className={styles.detail}>{`${status
.charAt(0)
.toUpperCase()}${status.slice(1)}`}</div>
</div>
<div className={styles.details}>
<div className={styles.title} data-testid="rewards-epoch-title">
{t('core.activityDetails.epoch')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import * as React from 'react';
import { render } from '@testing-library/react';
import '@testing-library/jest-dom';
import { RewardsDetails, RewardsDetailsProps } from '../RewardsDetails';
import { ActivityStatus } from '../../Transaction';

describe('Testing ActivityDetailsBrowser component', () => {
const rewardsDetailsProps: RewardsDetailsProps = {
name: 'Name',
headerDescription: 'Header Description',
status: ActivityStatus.SPENDABLE,
includedDate: 'Date',
includedTime: 'Time',
amountTransformer: (amount) => `${amount} $`,
Expand Down
12 changes: 0 additions & 12 deletions packages/e2e-tests/src/assert/transactionDetailsAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,18 +431,6 @@ class TransactionsDetailsAssert {
await this.assertSeeRewardsStakePoolsSection();
await this.assertSeeRewardsSinglePool();

await TransactionDetailsPage.transactionDetailsRewardsStatusTitle.waitForDisplayed();
expect(await TransactionDetailsPage.transactionDetailsRewardsStatusTitle.getText()).to.equal(
await t('core.activityDetails.status')
);
await TransactionDetailsPage.transactionDetailsRewardsStatus.waitForDisplayed();
expect(await TransactionDetailsPage.transactionDetailsRewardsStatus.getText()).to.be.oneOf([
'Spendable',
'Success',
'Sending',
'Error'
]);

await TransactionDetailsPage.transactionDetailsRewardsEpochTitle.waitForDisplayed();
expect(await TransactionDetailsPage.transactionDetailsRewardsEpochTitle.getText()).to.equal(
await t('core.activityDetails.epoch')
Expand Down
10 changes: 0 additions & 10 deletions packages/e2e-tests/src/elements/transactionDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ class ActivityDetailsPage extends CommonDrawerElements {
private TRANSACTION_DETAILS_REWARDS_POOL_ID = '[data-testid="rewards-pool-id"]';
private TRANSACTION_DETAILS_REWARDS_SINGLE_POOL_ADA = '[data-testid="rewards-pool-reward-ada"]';
private TRANSACTION_DETAILS_REWARDS_SINGLE_POOL_FIAT = '[data-testid="rewards-pool-reward-fiat"]';
private TRANSACTION_DETAILS_REWARDS_STATUS_TITLE = '[data-testid="rewards-status-title"]';
private TRANSACTION_DETAILS_REWARDS_STATUS = '[data-testid="rewards-status"]';
private TRANSACTION_DETAILS_REWARDS_EPOCH_TITLE = '[data-testid="rewards-epoch-title"]';
private TRANSACTION_DETAILS_REWARDS_EPOCH = '[data-testid="rewards-epoch"]';
private TRANSACTION_DETAILS_REWARDS_TIMESTAMP_TITLE = '[data-testid="rewards-date-title"]';
Expand Down Expand Up @@ -305,14 +303,6 @@ class ActivityDetailsPage extends CommonDrawerElements {
return $$(this.TRANSACTION_DETAILS_REWARDS_SINGLE_POOL_FIAT);
}

get transactionDetailsRewardsStatusTitle(): ChainablePromiseElement<WebdriverIO.Element> {
return $(this.TRANSACTION_DETAILS_REWARDS_STATUS_TITLE);
}

get transactionDetailsRewardsStatus(): ChainablePromiseElement<WebdriverIO.Element> {
return $(this.TRANSACTION_DETAILS_REWARDS_STATUS);
}

get transactionDetailsRewardsEpochTitle(): ChainablePromiseElement<WebdriverIO.Element> {
return $(this.TRANSACTION_DETAILS_REWARDS_EPOCH_TITLE);
}
Expand Down

0 comments on commit b3b1d06

Please sign in to comment.