@multiplatform.one/backoffice 7.29.0 → 7.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/backoffice",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.30.0",
|
|
4
4
|
"description": "Embeddable Frappe desk recreation (backoffice) for the multiplatform.one stack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backoffice",
|
|
@@ -71,21 +71,21 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@multiplatform.one/components": "7.
|
|
75
|
-
"@multiplatform.one/forms": "7.
|
|
76
|
-
"@multiplatform.one/frappe": "7.
|
|
77
|
-
"@multiplatform.one/frappe-ui": "7.
|
|
78
|
-
"@multiplatform.one/i18n": "7.
|
|
79
|
-
"@multiplatform.one/platform": "7.
|
|
80
|
-
"@multiplatform.one/store": "7.
|
|
81
|
-
"@multiplatform.one/table": "7.
|
|
82
|
-
"@multiplatform.one/theme": "7.
|
|
74
|
+
"@multiplatform.one/components": "7.30.0",
|
|
75
|
+
"@multiplatform.one/forms": "7.30.0",
|
|
76
|
+
"@multiplatform.one/frappe": "7.30.0",
|
|
77
|
+
"@multiplatform.one/frappe-ui": "7.30.0",
|
|
78
|
+
"@multiplatform.one/i18n": "7.30.0",
|
|
79
|
+
"@multiplatform.one/platform": "7.30.0",
|
|
80
|
+
"@multiplatform.one/store": "7.30.0",
|
|
81
|
+
"@multiplatform.one/table": "7.30.0",
|
|
82
|
+
"@multiplatform.one/theme": "7.30.0",
|
|
83
83
|
"@phosphor-icons/react": "^2.1.10",
|
|
84
84
|
"tamagui": "2.7.6"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@multiplatform.one/config": "7.
|
|
88
|
-
"@multiplatform.one/test-utils": "7.
|
|
87
|
+
"@multiplatform.one/config": "7.30.0",
|
|
88
|
+
"@multiplatform.one/test-utils": "7.30.0",
|
|
89
89
|
"@tamagui/build": "2.7.6",
|
|
90
90
|
"@testing-library/react": "^16.3.2",
|
|
91
91
|
"@types/react-dom": "^19.2.3",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { cleanup, screen } from "@testing-library/react";
|
|
3
|
+
import i18next from "i18next";
|
|
4
|
+
import { initReactI18next } from "react-i18next";
|
|
5
|
+
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { BACKOFFICE_I18N_NAMESPACE } from "../i18n";
|
|
7
|
+
import { en } from "../i18n/en";
|
|
8
|
+
import { HelpAboutDialog } from "./help-about-dialog";
|
|
9
|
+
import { HelpShortcutsDialog } from "./help-shortcuts-dialog";
|
|
10
|
+
|
|
11
|
+
// A host-registered Telugu bundle: the backoffice ships English only and lets
|
|
12
|
+
// the host's keys win (../i18n/index.ts).
|
|
13
|
+
const te = { help: { close: "మూసివేయి" } };
|
|
14
|
+
|
|
15
|
+
beforeAll(async () => {
|
|
16
|
+
await i18next.use(initReactI18next).init({
|
|
17
|
+
lng: "en",
|
|
18
|
+
fallbackLng: "en",
|
|
19
|
+
defaultNS: BACKOFFICE_I18N_NAMESPACE,
|
|
20
|
+
ns: [BACKOFFICE_I18N_NAMESPACE],
|
|
21
|
+
interpolation: { escapeValue: false },
|
|
22
|
+
resources: {
|
|
23
|
+
en: { [BACKOFFICE_I18N_NAMESPACE]: en },
|
|
24
|
+
te: { [BACKOFFICE_I18N_NAMESPACE]: te },
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
afterEach(async () => {
|
|
30
|
+
cleanup();
|
|
31
|
+
await i18next.changeLanguage("en");
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const dialogs = [
|
|
35
|
+
["HelpAboutDialog", HelpAboutDialog],
|
|
36
|
+
["HelpShortcutsDialog", HelpShortcutsDialog],
|
|
37
|
+
] as const;
|
|
38
|
+
|
|
39
|
+
describe("help dialogs name Close by its visible text (MPO-476)", () => {
|
|
40
|
+
for (const [name, HelpDialog] of dialogs) {
|
|
41
|
+
for (const [lng, label] of [
|
|
42
|
+
["en", "Close"],
|
|
43
|
+
["te", "మూసివేయి"],
|
|
44
|
+
] as const) {
|
|
45
|
+
it(`${name} in ${lng}`, async () => {
|
|
46
|
+
await i18next.changeLanguage(lng);
|
|
47
|
+
renderWithProviders(<HelpDialog open onOpenChange={vi.fn()} />);
|
|
48
|
+
const close = screen.getByRole("button", { name: label });
|
|
49
|
+
expect(close.textContent).toBe(label);
|
|
50
|
+
expect(screen.queryAllByRole("button", { name: "Dialog Close" })).toHaveLength(0);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|