diff --git a/resources/shared/todomvc-utils.mjs b/resources/shared/todomvc-utils.mjs new file mode 100644 index 000000000..dca451575 --- /dev/null +++ b/resources/shared/todomvc-utils.mjs @@ -0,0 +1 @@ +export const numberOfItemsToAdd = 100; diff --git a/resources/translations.mjs b/resources/shared/translations.mjs similarity index 99% rename from resources/translations.mjs rename to resources/shared/translations.mjs index 3de1264e2..a8ce5ddbe 100644 --- a/resources/translations.mjs +++ b/resources/shared/translations.mjs @@ -724,3 +724,11 @@ export const defaultTodoText = { ru: "Кое-что сделать", emoji: "Something to do 😊", }; + +export const defaultLanguage = "en"; + +export function getTodoText(lang = "en", index) { + const todosSelection = todos[lang]; + const currentIndex = index % todosSelection.length; + return todosSelection[currentIndex]; +} diff --git a/resources/tests.mjs b/resources/tests.mjs index d7cf6794a..ba50acfc9 100644 --- a/resources/tests.mjs +++ b/resources/tests.mjs @@ -1,14 +1,6 @@ import { BenchmarkTestStep } from "./benchmark-runner.mjs"; -import { todos } from "./translations.mjs"; - -const numberOfItemsToAdd = 100; -const defaultLanguage = "en"; - -function getTodoText(lang, index) { - const todosSelection = todos[lang] ?? todos[defaultLanguage]; - const currentIndex = index % todosSelection.length; - return todosSelection[currentIndex]; -} +import { getTodoText, defaultLanguage } from "./shared/translations.mjs"; +import { numberOfItemsToAdd } from "./shared/todomvc-utils.mjs"; export const Suites = []; @@ -274,6 +266,18 @@ Suites.push({ ], }); +Suites.push({ + name: "TodoMVC-WebComponents-PostMessage", + url: "resources/todomvc/vanilla-examples/javascript-web-components/dist/index.html", + tags: ["experimental", "todomvc", "webcomponents"], + disabled: true, + async prepare() {}, + type: "remote", + /* config: { + name: "default", // optional param to target non-default tests locally + }, */ +}); + Suites.push({ name: "TodoMVC-WebComponents-Complex-DOM", url: "resources/todomvc/vanilla-examples/javascript-web-components-complex/dist/index.html", diff --git a/resources/todomvc/vanilla-examples/javascript-web-components/dist/index.html b/resources/todomvc/vanilla-examples/javascript-web-components/dist/index.html index a8fec9787..2a38dbaac 100644 --- a/resources/todomvc/vanilla-examples/javascript-web-components/dist/index.html +++ b/resources/todomvc/vanilla-examples/javascript-web-components/dist/index.html @@ -9,10 +9,10 @@ - - - - + + + +
@@ -26,5 +26,6 @@ +