Skip to content

Commit

Permalink
feat: ahead of value prop designs, update text to prep translations (…
Browse files Browse the repository at this point in the history
…REV-2127)

Co-authored-by: Diane Kaplan <dkaplan@edx.org>
  • Loading branch information
dianekaplan and Diane Kaplan authored Apr 1, 2021
1 parent 353964e commit 6abf853
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
12 changes: 2 additions & 10 deletions src/courseware/course/sequence/lock-paywall/LockPaywall.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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}`);
});

Expand All @@ -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);
Expand Down
31 changes: 28 additions & 3 deletions src/courseware/course/sequence/lock-paywall/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,49 @@ 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': {
id: 'learn.lockPaywall.example.alt',
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;

0 comments on commit 6abf853

Please sign in to comment.