feat: ahead of value prop designs, update text to prep translations (REV-2127)

Co-authored-by: Diane Kaplan <dkaplan@edx.org>
This commit is contained in:
Diane Kaplan
2021-04-01 10:35:19 -04:00
committed by GitHub
parent 353964e75c
commit 6abf8531bb
2 changed files with 30 additions and 13 deletions

View File

@@ -19,14 +19,6 @@ describe('Lock Paywall', () => {
mockData.courseId = courseware.courseId;
});
it('displays message along with lock icon', () => {
const { container } = render(<LockPaywall {...mockData} />);
const lockIcon = container.querySelector('svg');
expect(lockIcon).toHaveClass('fa-lock');
expect(lockIcon.parentElement).toHaveTextContent('Verified Track Access');
});
it('displays unlock link with price', () => {
const {
currencySymbol,
@@ -35,7 +27,7 @@ describe('Lock Paywall', () => {
} = store.getState().models.coursewareMeta[mockData.courseId].verifiedMode;
render(<LockPaywall {...mockData} />);
const upgradeLink = screen.getByRole('link', { name: `Upgrade to unlock (${currencySymbol}${price})` });
const upgradeLink = screen.getByRole('link', { name: `Upgrade for ${currencySymbol}${price}` });
expect(upgradeLink).toHaveAttribute('href', `${upgradeUrl}`);
});
@@ -48,7 +40,7 @@ describe('Lock Paywall', () => {
} = store.getState().models.coursewareMeta[mockData.courseId].verifiedMode;
render(<LockPaywall {...mockData} />);
const upgradeLink = screen.getByRole('link', { name: `Upgrade to unlock (${currencySymbol}${price})` });
const upgradeLink = screen.getByRole('link', { name: `Upgrade for ${currencySymbol}${price}` });
fireEvent.click(upgradeLink);
expect(sendTrackEvent).toHaveBeenCalledTimes(1);

View File

@@ -3,17 +3,17 @@ import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
'learn.lockPaywall.title': {
id: 'learn.lockPaywall.title',
defaultMessage: 'Verified Track Access',
defaultMessage: 'Graded assignments are locked',
description: 'Heading for message shown to indicate that a piece of content is unavailable to audit track users.',
},
'learn.lockPaywall.content': {
id: 'learn.lockPaywall.content',
defaultMessage: 'Graded assessments are available to Verified Track learners.',
defaultMessage: 'Upgrade to gain access to locked features like this one and get the most out of your course.',
description: 'Message shown to indicate that a piece of content is unavailable to audit track users.',
},
'learn.lockPaywall.upgrade.link': {
id: 'learn.lockPaywall.upgrade.link',
defaultMessage: 'Upgrade to unlock ({currencySymbol}{price})',
defaultMessage: 'Upgrade for {currencySymbol}{price}',
description: 'A link users can click that navigates their browser to the upgrade payment page.',
},
'learn.lockPaywall.example.alt': {
@@ -21,6 +21,31 @@ const messages = defineMessages({
defaultMessage: 'Example Certificate',
description: 'Alternate text displayed when the example certificate image cannot be displayed.',
},
'learn.lockPaywall.list.intro': {
id: 'learn.lockPaywall.list.intro',
defaultMessage: 'When you upgrade, you:',
description: 'Text displayed to introduce the list of benefits from upgrading.',
},
'learn.lockPaywall.list.bullet1.linktext': {
id: 'learn.lockPaywall.list.bullet1.linktext',
defaultMessage: 'verified certificate',
description: 'Link text for verified certificate info page.',
},
'learn.lockPaywall.list.bullet2.boldtext': {
id: 'learn.lockPaywall.list.bullet2.boldtext',
defaultMessage: 'graded assignments',
description: 'Bolded text for graded assignments.',
},
'learn.lockPaywall.list.bullet3.boldtext': {
id: 'learn.lockPaywall.list.bullet3.boldtext',
defaultMessage: 'Full access',
description: 'Bolded text for full access.',
},
'learn.lockPaywall.list.bullet4.boldtext': {
id: 'learn.lockPaywall.list.bullet4.boldtext',
defaultMessage: 'non-profit',
description: 'Bolded text to highlight our non-profit status.',
},
});
export default messages;