Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: update all checkout snapshots

Abdullah Atta59a66a63c59e
diff --git a/apps/web/__e2e__/checkout.test.ts b/apps/web/__e2e__/checkout.test.ts
index 215ae854c..28a054d7d 100644
--- a/apps/web/__e2e__/checkout.test.ts
+++ b/apps/web/__e2e__/checkout.test.ts
@@ -46,10 +46,13 @@ test.afterEach(async () => {
function roundOffPrices(prices: PriceItem[]) {
return prices
.map((p) => {
- const price = p.value.replace(/(\d+).(\d+)/gm, (_, whole, decimal) => {
- const decimalDigits = "0".repeat(decimal.length);
- const wholeDigits = "0".repeat(whole.length - 1);
- return `${whole[0]}${wholeDigits}.${decimalDigits}`;
+ const price = p.value.replace(/(\d+)\.(\d+)/gm, (_, whole, decimal) => {
+ const stabalizePrice =
+ Math.max(
+ 0,
+ Math.ceil(Math.log10(parseFloat(`${whole}.${decimal}`)))
+ ) * 100;
+ return `${stabalizePrice}`;
});
return `${p.label}: ${price}`;
})
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-linux.txt
index 08746e7d8..fb80a9428 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: ₹300.00
-Sales tax: ₹60.00
-Discount: -₹200.00
-Total: ₹200.00
\ No newline at end of file
+Subtotal: ₹300
+Sales tax: ₹200
+Discount: -₹300
+Total: ₹300
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-win32.txt
new file mode 100644
index 000000000..fb80a9428
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: ₹300
+Sales tax: ₹200
+Discount: -₹300
+Total: ₹300
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Firefox-linux.txt
deleted file mode 100644
index 08746e7d8..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹300.00
-Sales tax: ₹60.00
-Discount: -₹200.00
-Total: ₹200.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-WebKit-linux.txt
deleted file mode 100644
index 08746e7d8..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-discounted-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹300.00
-Sales tax: ₹60.00
-Discount: -₹200.00
-Total: ₹200.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-linux.txt
index 7693f004e..e00d854bd 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: ₹300.00
-Sales tax: ₹60.00
-Discount: ₹0.00
-Total: ₹400.00/mo
\ No newline at end of file
+Subtotal: ₹300
+Sales tax: ₹200
+Discount: ₹0
+Total: ₹300/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-win32.txt
new file mode 100644
index 000000000..e00d854bd
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: ₹300
+Sales tax: ₹200
+Discount: ₹0
+Total: ₹300/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Firefox-linux.txt
deleted file mode 100644
index 7693f004e..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹300.00
-Sales tax: ₹60.00
-Discount: ₹0.00
-Total: ₹400.00/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-WebKit-linux.txt
deleted file mode 100644
index 7693f004e..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-IN-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹300.00
-Sales tax: ₹60.00
-Discount: ₹0.00
-Total: ₹400.00/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-linux.txt
index fb3a01927..dc7d77815 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: $4.00
-Sales tax: $0.00
-Discount: -$2.00
-Total: $2.00
\ No newline at end of file
+Subtotal: $100
+Sales tax: $0
+Discount: -$100
+Total: $100
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-win32.txt
new file mode 100644
index 000000000..dc7d77815
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: $100
+Sales tax: $0
+Discount: -$100
+Total: $100
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Firefox-linux.txt
deleted file mode 100644
index fb3a01927..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $4.00
-Sales tax: $0.00
-Discount: -$2.00
-Total: $2.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-WebKit-linux.txt
deleted file mode 100644
index fb3a01927..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-discounted-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $4.00
-Sales tax: $0.00
-Discount: -$2.00
-Total: $2.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-linux.txt
index 002868371..4e306caf8 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: $4.00
-Sales tax: $0.00
-Discount: $0.00
-Total: $4.00/mo
\ No newline at end of file
+Subtotal: $100
+Sales tax: $0
+Discount: $0
+Total: $100/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-win32.txt
new file mode 100644
index 000000000..4e306caf8
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: $100
+Sales tax: $0
+Discount: $0
+Total: $100/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Firefox-linux.txt
deleted file mode 100644
index 002868371..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $4.00
-Sales tax: $0.00
-Discount: $0.00
-Total: $4.00/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-WebKit-linux.txt
deleted file mode 100644
index 002868371..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-monthly-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $4.00
-Sales tax: $0.00
-Discount: $0.00
-Total: $4.00/mo
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-linux.txt
index 9a76fcb40..e06f69aad 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: ₹4000.00
-Sales tax: ₹700.00
-Discount: -₹2000.00
-Total: ₹2000.00
\ No newline at end of file
+Subtotal: ₹400
+Sales tax: ₹300
+Discount: -₹400
+Total: ₹400
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-win32.txt
new file mode 100644
index 000000000..e06f69aad
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: ₹400
+Sales tax: ₹300
+Discount: -₹400
+Total: ₹400
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Firefox-linux.txt
deleted file mode 100644
index 9a76fcb40..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹4000.00
-Sales tax: ₹700.00
-Discount: -₹2000.00
-Total: ₹2000.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-WebKit-linux.txt
deleted file mode 100644
index 9a76fcb40..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-discounted-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹4000.00
-Sales tax: ₹700.00
-Discount: -₹2000.00
-Total: ₹2000.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-linux.txt
index c1ca0e019..b7156a025 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: ₹4000.00
-Sales tax: ₹700.00
-Discount: ₹0.00
-Total: ₹4000.00/yr
\ No newline at end of file
+Subtotal: ₹400
+Sales tax: ₹300
+Discount: ₹0
+Total: ₹400/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-win32.txt
new file mode 100644
index 000000000..b7156a025
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: ₹400
+Sales tax: ₹300
+Discount: ₹0
+Total: ₹400/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Firefox-linux.txt
deleted file mode 100644
index c1ca0e019..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹4000.00
-Sales tax: ₹700.00
-Discount: ₹0.00
-Total: ₹4000.00/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-WebKit-linux.txt
deleted file mode 100644
index c1ca0e019..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-IN-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: ₹4000.00
-Sales tax: ₹700.00
-Discount: ₹0.00
-Total: ₹4000.00/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-linux.txt
index 0c793a1b3..fbbb62387 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: $40.00
-Sales tax: $0.00
-Discount: -$20.00
-Total: $20.00
\ No newline at end of file
+Subtotal: $200
+Sales tax: $0
+Discount: -$200
+Total: $200
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-win32.txt
new file mode 100644
index 000000000..fbbb62387
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: $200
+Sales tax: $0
+Discount: -$200
+Total: $200
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Firefox-linux.txt
deleted file mode 100644
index 0c793a1b3..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $40.00
-Sales tax: $0.00
-Discount: -$20.00
-Total: $20.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-WebKit-linux.txt
deleted file mode 100644
index 0c793a1b3..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-discounted-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $40.00
-Sales tax: $0.00
-Discount: -$20.00
-Total: $20.00
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-linux.txt
index 9053fe957..e68c773bf 100644
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-linux.txt
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-linux.txt
@@ -1,4 +1,4 @@
-Subtotal: $40.00
-Sales tax: $0.00
-Discount: $0.00
-Total: $40.00/yr
\ No newline at end of file
+Subtotal: $200
+Sales tax: $0
+Discount: $0
+Total: $200/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-win32.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-win32.txt
new file mode 100644
index 000000000..e68c773bf
--- /dev/null
+++ b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Chromium-win32.txt
@@ -0,0 +1,4 @@
+Subtotal: $200
+Sales tax: $0
+Discount: $0
+Total: $200/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Firefox-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Firefox-linux.txt
deleted file mode 100644
index 9053fe957..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-Firefox-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $40.00
-Sales tax: $0.00
-Discount: $0.00
-Total: $40.00/yr
\ No newline at end of file
diff --git a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-WebKit-linux.txt b/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-WebKit-linux.txt
deleted file mode 100644
index 9053fe957..000000000
--- a/apps/web/__e2e__/checkout.test.ts-snapshots/checkout-yearly-prices-WebKit-linux.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Subtotal: $40.00
-Sales tax: $0.00
-Discount: $0.00
-Total: $40.00/yr
\ No newline at end of file