Skip to content

[-]:feat/checkout little improves#1963

Merged
jaaaaavier merged 6 commits into
masterfrom
feat/fix-checkout
May 29, 2026
Merged

[-]:feat/checkout little improves#1963
jaaaaavier merged 6 commits into
masterfrom
feat/fix-checkout

Conversation

@jaaaaavier
Copy link
Copy Markdown
Contributor

@jaaaaavier jaaaaavier commented May 20, 2026

Description

This PR aims to update pair of things on the checkout:

  • Premium plans were showing .98 and this is an error, we changed
  • The renewalLabel showed in two lines, we reduced the size, and changed the order currency/price in english

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Checked on local that the checkout now shows as expected

Additional Notes

Captura de pantalla 2026-05-20 a las 12 38 16 Captura de pantalla 2026-05-20 a las 12 39 13

@jaaaaavier jaaaaavier marked this pull request as ready for review May 20, 2026 12:10
@jaaaaavier jaaaaavier self-assigned this May 20, 2026
@jaaaaavier jaaaaavier added the enhancement New feature or request label May 20, 2026
"apply": "Apply",
"taxes": "Taxes",
"annualBillingTemplate": "Annual plan, billed monthly at {{price}}{{currency}}/month for 12 months"
"annualBillingTemplate": "Annual plan, billed at {{currency}}{{priceNow}} for the first month, then renews at {{currency}}{{price}}/month"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the text for all languages.

expect(formatPrice(10.0000001)).toBe('10');
});

it('Handles floating point precision error (19.99 * 100 = 1998.999... in JS)', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use when..., then...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and change it from "it" to "test".

the "it" tests are like: it('should do .... when doing ....')
the "test" tests are like: test('When doing .... then it does .....')

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 22, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86ef365
Status: ✅  Deploy successful!
Preview URL: https://b84d18d4.drive-web.pages.dev
Branch Preview URL: https://feat-fix-checkout.drive-web.pages.dev

View logs

@jaaaaavier jaaaaavier requested a review from xabg2 May 22, 2026 08:31
describe('The price has more than 2 decimals', () => {
it('When the price has more than 2 decimals, then the function returns the price with 2 decimals (truncated with high precision, 10.456 -> 10.45 - 10.001 -> 10 - 1.999 -> 1.99)', () => {
expect(formatPrice(10.456)).toBe('10.45');
it('When the price has more than 2 decimals, then the function returns the price rounded to 2 decimals (10.456 -> 10.46 - 10.001 -> 10 - 1.999 -> 2)', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use test instead.

@jaaaaavier jaaaaavier requested a review from xabg2 May 29, 2026 07:28
@xabg2 xabg2 requested a review from larryrider May 29, 2026 07:30
it('When the user has a price with 1 decimal, the function returns 2 decimals (100.5 -> 100.50)', () => {
expect(formatPrice(100.5)).toBe('100.50');
});
it('When the user has a price with 1 decimal, the function returns 2 decimals (100.5 -> 100.50)', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use test

it('When the user has a price with 2 decimals, the function returns 2 decimals (99.99 -> 99.99)', () => {
expect(formatPrice(99.99)).toBe('99.99');
});
it('When the user has a price with 2 decimals, the function returns 2 decimals (99.99 -> 99.99)', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use test

@sonarqubecloud
Copy link
Copy Markdown

@jaaaaavier jaaaaavier requested a review from xabg2 May 29, 2026 14:51
@jaaaaavier jaaaaavier merged commit bbb3520 into master May 29, 2026
10 of 11 checks passed
@jaaaaavier jaaaaavier deleted the feat/fix-checkout branch May 29, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants