mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
* fix(pricing): clarify disabled automatic sync status * fix(i18n): add pricing auto-sync labels * fix(pricing): clarify disabled automatic sync status + sync new i18n keys to all locales (#7955) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
21 lines
819 B
TypeScript
21 lines
819 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
const root = join(import.meta.dirname, "../..");
|
|
const pricingTab = readFileSync(
|
|
join(root, "src/app/(dashboard)/dashboard/settings/components/PricingTab.tsx"),
|
|
"utf8"
|
|
);
|
|
const en = JSON.parse(readFileSync(join(root, "src/i18n/messages/en.json"), "utf8")) as {
|
|
settings: Record<string, string>;
|
|
};
|
|
|
|
test("pricing status labels distinguish automatic sync from manual sync", () => {
|
|
assert.match(pricingTab, /t\("pricingAutoSyncEnabled"\)/);
|
|
assert.match(pricingTab, /t\("pricingAutoSyncDisabled"\)/);
|
|
assert.equal(en.settings.pricingAutoSyncEnabled, "Automatic Sync Enabled");
|
|
assert.equal(en.settings.pricingAutoSyncDisabled, "Automatic Sync Disabled");
|
|
});
|