Skip to content
This repository was archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
fix button text on review
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baxley committed Dec 5, 2016
1 parent 1d0db3b commit cea9bf7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion imports/blocks/give/__tests__/__snapshots__/Layout.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ exports[`test renders Confirm form 1`] = `
className="btn soft-half-top one-whole"
type="submit">
<span>
Give Now
Give
</span>
 
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ exports[`ScheduleLayout renders with props 1`] = `
className="btn one-whole push-top soft-sides"
type="submit">
<span>
Schedule Now using 6789
Schedule using 6789
</span>
 
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`TransactionLayout should render with props 1`] = `
className="btn soft-half-top one-whole"
type="submit">
<span>
Give Now using 6789
Give using 6789
</span>
 
<div
Expand Down
8 changes: 4 additions & 4 deletions imports/blocks/give/fieldsets/shared/ButtonText.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ const ButtonText = ({
paymentInfo.type = "ach";
}

let text = "Give Now";
let text = "Give";

if (Object.keys(schedules).length) text = "Schedule Now";
if (scheduleToRecover) text = "Transfer Now";
if (Object.keys(schedules).length) text = "Schedule";
if (scheduleToRecover) text = "Transfer";

if (paymentInfo.accountNumber || paymentInfo.cardNumber) {
const masked = paymentInfo.type === "ach" ? paymentInfo.accountNumber : paymentInfo.cardNumber;
text += ` using ${masked.slice(-4)}`;
text += ` using ${masked.replace(/-/g, "").slice(-4)}`;
}

return <span>{text}</span>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`test should render web action button 1`] = `
className="btn soft-half-top one-whole"
type="submit">
<span>
Give Now using 6789
Give using 6789
</span>
 
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
exports[`test should say \`Give Now using 4321\` if cardNumber 1`] = `
<span>
Give Now using 4321
Give using 4321
</span>
`;

exports[`test should say \`Give Now using 6789\` if accountNumber 1`] = `
<span>
Give Now using 6789
Give using 6789
</span>
`;

exports[`test should say \`Give Now\` with minimal props 1`] = `
<span>
Give Now
Give
</span>
`;

exports[`test should say \`Schedule Now using 4321\` if schedule and cardNumber 1`] = `
<span>
Schedule Now using 4321
Schedule using 4321
</span>
`;

exports[`test should say \`Schedule Now using 6789\` if schedule and accountNumber 1`] = `
<span>
Schedule Now using 6789
Schedule using 6789
</span>
`;

exports[`test should say \`Schedule Now\` if schedule present 1`] = `
<span>
Schedule Now
Schedule
</span>
`;

exports[`test should say \`Transfer Now using 4321\` if schedule and cardNumber 1`] = `
<span>
Transfer Now using 4321
Transfer using 4321
</span>
`;

exports[`test should say \`Transfer Now using 6789\` if recoverable schedule and accountNumber 1`] = `
<span>
Transfer Now using 6789
Transfer using 6789
</span>
`;

exports[`test should say \`Transfer Now\` if recoverable schedule 1`] = `
<span>
Transfer Now
Transfer
</span>
`;

0 comments on commit cea9bf7

Please sign in to comment.