Skip to content

Commit

Permalink
chore(extension): update multi-staking faq (#711)
Browse files Browse the repository at this point in the history
* chore(extension): update multi-staking faq

* test(extension): fix LW-8465

---------

Co-authored-by: wklos-iohk <[email protected]>
  • Loading branch information
mchappell and wklos-iohk committed Nov 7, 2023
1 parent 0720689 commit 5ead84f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 36 deletions.
6 changes: 3 additions & 3 deletions apps/browser-extension-wallet/src/lib/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -973,9 +973,9 @@
"enterNFTGallery": "Enter the NFT gallery with Lace",
"buyAnNft": "How to buy an NFT?",
"stakingAndDelegation": "What are staking & delegation?",
"choosingAStakePool": "Which stake pool should I choose?",
"activeStake": "What is an active stake?",
"stakingMadeEasy": "Staking made easy with Lace"
"howManyPools": "How many stake pools can I delegate stake to, using the multi-staking or multi-delegation feature?",
"ledgerSupport": "Do Ledger hardware wallets support multi-staking?",
"stakeDistribution": "Does stake distribution remain the same?"
}
},
"migrations": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { stakingInfoSelector } from '@stores/selectors/staking-selectors';
import { EducationalList, SectionLayout } from '@src/views/browser-view/components';
import { useWalletStore } from '@stores';
import { useFetchCoinPrice, useBalances } from '@src/hooks';
import Book from '@assets/icons/book.svg';
import LightBulb from '@src/assets/icons/light.svg';
import Video from '@assets/icons/video.svg';

// eslint-disable-next-line @typescript-eslint/ban-types
export const StakingSkeleton = ({ children }: PropsWithChildren<object>): React.ReactElement => {
Expand Down Expand Up @@ -53,21 +51,21 @@ export const StakingSkeleton = ({ children }: PropsWithChildren<object>): React.
},
{
title: titles.faq,
subtitle: t('educationalBanners.subtitle.choosingAStakePool'),
subtitle: t('educationalBanners.subtitle.howManyPools'),
src: LightBulb,
link: `${process.env.WEBSITE_URL}/faq?question=which-stake-pool-should-i-choose`
link: `${process.env.WEBSITE_URL}/faq?question=how-many-stake-pools-can-i-delegate-stake-to-using-the-multi-staking-or-multi-delegation-feature`
},
{
title: titles.glossary,
subtitle: t('educationalBanners.subtitle.activeStake'),
src: Book,
link: `${process.env.WEBSITE_URL}/glossary?term=active-stake`
title: titles.faq,
subtitle: t('educationalBanners.subtitle.ledgerSupport'),
src: LightBulb,
link: `${process.env.WEBSITE_URL}/faq?question=do-ledger-hardware-wallets-support-multi-staking`
},
{
title: titles.video,
subtitle: t('educationalBanners.subtitle.stakingMadeEasy'),
src: Video,
link: `${process.env.WEBSITE_URL}/learn?video=staking-with-lace-let-your-digital-assets-work-for-you`
title: titles.faq,
subtitle: t('educationalBanners.subtitle.stakeDistribution'),
src: LightBulb,
link: `${process.env.WEBSITE_URL}/faq?question=does-stake-distribution-remain-the-same`
}
];

Expand Down
10 changes: 4 additions & 6 deletions packages/e2e-tests/src/assert/educationalListAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,13 @@ class EducationalListAssert {

async assertSeeStakingWidget() {
const faqTranslation = await t(this.faqTranslationPath);
const glossaryTranslation = await t(this.glossaryTranslationPath);
const videoTranslation = await t(this.videoTranslationPath);
const expectedTitle = await t('browserView.sidePanel.aboutStaking');
const expectedTitles = [faqTranslation, faqTranslation, glossaryTranslation, videoTranslation];
const expectedTitles = [faqTranslation, faqTranslation, faqTranslation, faqTranslation];
const expectedSubtitles = [
await t('educationalBanners.subtitle.stakingAndDelegation'),
await t('educationalBanners.subtitle.choosingAStakePool'),
await t('educationalBanners.subtitle.activeStake'),
await t('educationalBanners.subtitle.stakingMadeEasy')
await t('educationalBanners.subtitle.howManyPools'),
await t('educationalBanners.subtitle.ledgerSupport'),
await t('educationalBanners.subtitle.stakeDistribution')
];
await this.assertSeeWidget(expectedTitle, expectedTitles, expectedSubtitles);
}
Expand Down
22 changes: 11 additions & 11 deletions packages/e2e-tests/src/data/EducationalArticles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const faqArticles: Record<string, Record<string, string>> = {
'Which stake pool should I choose?': {
question: 'which-stake-pool-should-i-choose',
title: 'Which stake pool should I choose?'
'How many stake pools can I delegate stake to, using the multi-staking or multi-delegation feature?': {
question: 'how-many-stake-pools-can-i-delegate-stake-to-using-the-multi-staking-or-multi-delegation-feature',
title: 'How many stake pools can I delegate stake to, using the multi-staking or multi-delegation feature?'
},
'How do I send and receive funds?': {
question: 'how-do-i-send-and-receive-digital-assets',
Expand All @@ -22,6 +22,14 @@ export const faqArticles: Record<string, Record<string, string>> = {
'What is my recovery phrase?': {
question: 'what-is-my-recovery-phrase',
title: 'What is my recovery phrase?'
},
'Do Ledger hardware wallets support multi-staking?': {
question: 'do-ledger-hardware-wallets-support-multi-staking',
title: 'Do Ledger hardware wallets support multi-staking?'
},
'Does stake distribution remain the same?': {
question: 'does-stake-distribution-remain-the-same',
title: 'Does stake distribution remain the same?'
}
};

Expand Down Expand Up @@ -49,10 +57,6 @@ export const glossaryArticles: Record<string, Record<string, string>> = {
'What is an unconfirmed transaction?': {
term: 'unconfirmed-transaction',
title: 'Unconfirmed (transaction)'
},
'What is an active stake?': {
term: 'active-stake',
title: 'Active stake'
}
};

Expand All @@ -72,9 +76,5 @@ export const videoArticles: Record<string, Record<string, string>> = {
'Transaction bundles': {
video: 'lace-introduces-transaction-bundles',
title: 'Lace introduces transaction bundles'
},
'Staking made easy with Lace': {
video: 'staking-with-lace-let-your-digital-assets-work-for-you',
title: 'Staking with Lace - Let your digital assets work for you'
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ Feature: Staking Page - Extended View
When I click on a widget item with subtitle: "<subtitle>"
Then I see a "<type>" article with title "<subtitle>"
Examples:
| type | subtitle |
| type | subtitle |
| FAQ | What are staking & delegation? |
| FAQ | Which stake pool should I choose? |
| Glossary | What is an active stake? |
| Video | Staking made easy with Lace |
| FAQ | How many stake pools can I delegate stake to, using the multi-staking or multi-delegation feature? |
| FAQ | Do Ledger hardware wallets support multi-staking? |
| FAQ | Does stake distribution remain the same? |

@LW-8469 @Testnet @Mainnet
Scenario: Extended View - Network info component is present with expected content
Expand Down

0 comments on commit 5ead84f

Please sign in to comment.