@scm-manager/ui-tests 3.7.5 → 3.8.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/.turbo/turbo-depcheck.log +1 -1
- package/.turbo/turbo-typecheck.log +1 -1
- package/enzyme-router.ts +2 -1
- package/i18n.ts +29 -13
- package/package.json +4 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@scm-manager/ui-tests:typecheck: cache hit, replaying output
|
|
1
|
+
@scm-manager/ui-tests:typecheck: cache hit, replaying output 0dabec53af9c6971
|
|
2
2
|
@scm-manager/ui-tests:typecheck: $ tsc
|
package/enzyme-router.ts
CHANGED
|
@@ -20,8 +20,9 @@ import { createMount, createShallow } from "enzyme-context";
|
|
|
20
20
|
import { routerContext } from "enzyme-context-react-router-4";
|
|
21
21
|
|
|
22
22
|
const plugins = {
|
|
23
|
-
history: routerContext()
|
|
23
|
+
history: routerContext(),
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
// TODO Enzyme is not going to be supported in React 19+.: https://testing-library.com/docs/react-testing-library/migrate-from-enzyme/
|
|
26
27
|
export const mount = createMount(plugins);
|
|
27
28
|
export const shallow = createShallow(plugins);
|
package/i18n.ts
CHANGED
|
@@ -14,16 +14,32 @@
|
|
|
14
14
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
import { initReactI18next } from "react-i18next";
|
|
18
|
+
import i18n from "i18next";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This provides a minimum i18next scaffold during initialization of a unit test.
|
|
22
|
+
*
|
|
23
|
+
* It does not connect to the i18next information used in production,
|
|
24
|
+
* but avoids warnings emerging due to i18next being uninitialized.
|
|
25
|
+
*
|
|
26
|
+
* More information: <a href="https://react.i18next.com/misc/testing">https://react.i18next.com/misc/testing</a>
|
|
27
|
+
*/
|
|
28
|
+
export function stubI18Next() {
|
|
29
|
+
// TODO should be changed to async/await
|
|
30
|
+
i18n.use(initReactI18next).init({
|
|
31
|
+
lng: "de",
|
|
32
|
+
fallbackLng: "en",
|
|
33
|
+
|
|
34
|
+
ns: ["translationsNS"],
|
|
35
|
+
defaultNS: "translationsNS",
|
|
36
|
+
|
|
37
|
+
debug: false,
|
|
38
|
+
|
|
39
|
+
interpolation: {
|
|
40
|
+
escapeValue: false,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
resources: { en: { translationsNS: {} } },
|
|
44
|
+
});
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-tests",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "UI-Tests helpers",
|
|
5
5
|
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"enzyme": "^3.11.0",
|
|
15
15
|
"enzyme-context": "^1.1.2",
|
|
16
16
|
"enzyme-context-react-router-4": "^2.0.0",
|
|
17
|
-
"
|
|
17
|
+
"i18next": "21",
|
|
18
|
+
"raf": "^3.4.1",
|
|
19
|
+
"react-i18next": "11"
|
|
18
20
|
},
|
|
19
21
|
"peerDependencies": {
|
|
20
22
|
"@scm-manager/tsconfig": "^2.13.0",
|