From 16516a990423e5b1ba0e9ce83ec55aec6c72b55d Mon Sep 17 00:00:00 2001 From: issack john Date: Wed, 5 Jul 2023 11:34:43 -0700 Subject: [PATCH] sync tests to description. --- resources/tests.mjs | 195 ++------------------------------------------ 1 file changed, 9 insertions(+), 186 deletions(-) diff --git a/resources/tests.mjs b/resources/tests.mjs index f0a42f1d3..699d758a0 100644 --- a/resources/tests.mjs +++ b/resources/tests.mjs @@ -51,36 +51,7 @@ Suites.enable = function (names, tags) { Suites.push({ name: "TodoMVC-JavaScript-ES5", - url: "todomvc/vanilla-examples/javascript-es5/dist/index.html", - tags: ["todomvc"], - async prepare(page) { - (await page.waitForElement(".new-todo")).focus(); - }, - tests: [ - new BenchmarkTestStep(`Adding${numberOfItemsToAdd}Items`, (page) => { - const newTodo = page.querySelector(".new-todo"); - for (let i = 0; i < numberOfItemsToAdd; i++) { - newTodo.setValue(todos.en[i] ?? `${defaultTodoText.en} ${i}`); - newTodo.dispatchEvent("change"); - newTodo.enter("keypress"); - } - }), - new BenchmarkTestStep("CompletingAllItems", (page) => { - const checkboxes = page.querySelectorAll(".toggle"); - for (let i = 0; i < numberOfItemsToAdd; i++) - checkboxes[i].click(); - }), - new BenchmarkTestStep("DeletingAllItems", (page) => { - const deleteButtons = page.querySelectorAll(".destroy"); - for (let i = numberOfItemsToAdd - 1; i >= 0; i--) - deleteButtons[i].click(); - }), - ], -}); - -Suites.push({ - name: "TodoMVC-JavaScript-ES5-Complex-DOM", - url: "todomvc/vanilla-examples/javascript-es5/complex/dist/index.html", + url: "todomvc/vanilla-examples/javascript-es5/standalone/dist/index.html", tags: ["todomvc"], async prepare(page) { (await page.waitForElement(".new-todo")).focus(); @@ -139,37 +110,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-JavaScript-ES6-Complex-DOM", - url: "todomvc/vanilla-examples/javascript-es6/complex/dist/index.html", - tags: ["todomvc"], - async prepare(page) { - const element = await page.waitForElement(".new-todo"); - element.focus(); - }, - tests: [ - new BenchmarkTestStep(`Adding${numberOfItemsToAdd}Items`, (page) => { - const newTodo = page.querySelector(".new-todo"); - for (let i = 0; i < numberOfItemsToAdd; i++) { - newTodo.setValue(todos.en[i] ?? `${defaultTodoText.en} ${i}`); - newTodo.dispatchEvent("change"); - newTodo.enter("keypress"); - } - }), - new BenchmarkTestStep("CompletingAllItems", (page) => { - const checkboxes = page.querySelectorAll(".toggle"); - for (let i = 0; i < numberOfItemsToAdd; i++) - checkboxes[i].click(); - }), - new BenchmarkTestStep("DeletingAllItems", (page) => { - const deleteButtons = page.querySelectorAll(".destroy"); - for (let i = numberOfItemsToAdd - 1; i >= 0; i--) - deleteButtons[i].click(); - }), - ], -}); - -Suites.push({ - name: "TodoMVC-JavaScript-ES6-Webpack", - url: "todomvc/vanilla-examples/javascript-es6-webpack/dist/index.html", + url: "todomvc/vanilla-examples/javascript-es6-complex/dist/index.html", tags: ["todomvc"], async prepare(page) { const element = await page.waitForElement(".new-todo"); @@ -322,36 +263,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-React-Redux", - url: "todomvc/architecture-examples/react-redux/dist/index.html", - tags: ["todomvc"], - async prepare(page) { - const element = await page.waitForElement(".new-todo"); - element.focus(); - }, - tests: [ - new BenchmarkTestStep(`Adding${numberOfItemsToAdd}Items`, (page) => { - const newTodo = page.querySelector(".new-todo"); - for (let i = 0; i < numberOfItemsToAdd; i++) { - newTodo.setValue(todos.en[i] ?? `${defaultTodoText.en} ${i}`); - newTodo.enter("keydown"); - } - }), - new BenchmarkTestStep("CompletingAllItems", (page) => { - const checkboxes = page.querySelectorAll(".toggle"); - for (let i = 0; i < numberOfItemsToAdd; i++) - checkboxes[i].click(); - }), - new BenchmarkTestStep("DeletingAllItems", (page) => { - const deleteButtons = page.querySelectorAll(".destroy"); - for (let i = numberOfItemsToAdd - 1; i >= 0; i--) - deleteButtons[i].click(); - }), - ], -}); - -Suites.push({ - name: "TodoMVC-React-Redux-Complex-DOM", - url: "todomvc/architecture-examples/react-redux/complex/dist/index.html", + url: "todomvc/architecture-examples/react-redux/standalone/dist/index.html", tags: ["todomvc"], async prepare(page) { const element = await page.waitForElement(".new-todo"); @@ -380,38 +292,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-Backbone", - url: "todomvc/architecture-examples/backbone/dist/index.html", - tags: ["todomvc"], - async prepare(page) { - await page.waitForElement("#appIsReady"); - const newTodo = page.querySelector(".new-todo"); - newTodo.focus(); - }, - tests: [ - new BenchmarkTestStep(`Adding${numberOfItemsToAdd}Items`, (page) => { - const newTodo = page.querySelector(".new-todo"); - for (let i = 0; i < numberOfItemsToAdd; i++) { - newTodo.setValue(todos.en[i] ?? `${defaultTodoText.en} ${i}`); - newTodo.dispatchEvent("change"); - newTodo.enter("keypress"); - } - }), - new BenchmarkTestStep("CompletingAllItems", (page) => { - const checkboxes = page.querySelectorAll(".toggle"); - for (let i = 0; i < numberOfItemsToAdd; i++) - checkboxes[i].click(); - }), - new BenchmarkTestStep("DeletingAllItems", (page) => { - const deleteButtons = page.querySelectorAll(".destroy"); - for (let i = numberOfItemsToAdd - 1; i >= 0; i--) - deleteButtons[i].click(); - }), - ], -}); - -Suites.push({ - name: "TodoMVC-Backbone-Complex-DOM", - url: "todomvc/architecture-examples/backbone/complex/dist/index.html", + url: "todomvc/architecture-examples/backbone/standalone/dist/index.html", tags: ["todomvc"], async prepare(page) { await page.waitForElement("#appIsReady"); @@ -472,7 +353,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-Angular-Complex-DOM", - url: "todomvc/architecture-examples/angular/projects/complex/dist/index.html", + url: "todomvc/architecture-examples/angular-complex/dist/index.html", tags: ["todomvc"], async prepare(page) { const element = await page.waitForElement(".new-todo"); @@ -532,7 +413,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-Vue-Complex-DOM", - url: "todomvc/architecture-examples/vue/complex/dist/index.html", + url: "todomvc/architecture-examples/vue-complex/dist/index.html", tags: ["todomvc"], async prepare(page) { const element = await page.waitForElement(".new-todo"); @@ -591,7 +472,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-jQuery-Complex-DOM", - url: "todomvc/architecture-examples/jquery/complex/dist/index.html", + url: "todomvc/architecture-examples/jquery-complex/dist/index.html", tags: ["todomvc"], async prepare(page) { await page.waitForElement("#appIsReady"); @@ -618,67 +499,9 @@ Suites.push({ ], }); -Suites.push({ - name: "TodoMVC-Preact", - url: "todomvc/architecture-examples/preact/dist/index.html#/home", - tags: ["todomvc"], - async prepare(page) { - const element = await page.waitForElement(".new-todo"); - element.focus(); - }, - tests: [ - new BenchmarkTestStep(`Adding${numberOfItemsToAdd}Items`, (page) => { - const newTodo = page.querySelector(".new-todo"); - for (let i = 0; i < numberOfItemsToAdd; i++) { - newTodo.setValue(todos.en[i] ?? `${defaultTodoText.en} ${i}`); - newTodo.enter("keydown"); - } - }), - new BenchmarkTestStep("CompletingAllItems", (page) => { - const checkboxes = page.querySelectorAll(".toggle"); - for (let i = 0; i < numberOfItemsToAdd; i++) - checkboxes[i].click(); - }), - new BenchmarkTestStep("DeletingAllItems", (page) => { - const deleteButtons = page.querySelectorAll(".destroy"); - for (let i = numberOfItemsToAdd - 1; i >= 0; i--) - deleteButtons[i].click(); - }), - ], -}); - Suites.push({ name: "TodoMVC-Preact-Complex-DOM", - url: "todomvc/architecture-examples/preact/complex/dist/index.html#/home", - tags: ["todomvc"], - async prepare(page) { - const element = await page.waitForElement(".new-todo"); - element.focus(); - }, - tests: [ - new BenchmarkTestStep(`Adding${numberOfItemsToAdd}Items`, (page) => { - const newTodo = page.querySelector(".new-todo"); - for (let i = 0; i < numberOfItemsToAdd; i++) { - newTodo.setValue(todos.en[i] ?? `${defaultTodoText.en} ${i}`); - newTodo.enter("keydown"); - } - }), - new BenchmarkTestStep("CompletingAllItems", (page) => { - const checkboxes = page.querySelectorAll(".toggle"); - for (let i = 0; i < numberOfItemsToAdd; i++) - checkboxes[i].click(); - }), - new BenchmarkTestStep("DeletingAllItems", (page) => { - const deleteButtons = page.querySelectorAll(".destroy"); - for (let i = numberOfItemsToAdd - 1; i >= 0; i--) - deleteButtons[i].click(); - }), - ], -}); - -Suites.push({ - name: "TodoMVC-Svelte", - url: "todomvc/architecture-examples/svelte/dist/index.html", + url: "todomvc/architecture-examples/preact-complex/dist/index.html#/home", tags: ["todomvc"], async prepare(page) { const element = await page.waitForElement(".new-todo"); @@ -707,7 +530,7 @@ Suites.push({ Suites.push({ name: "TodoMVC-Svelte-Complex-DOM", - url: "todomvc/architecture-examples/svelte/complex/dist/index.html", + url: "todomvc/architecture-examples/svelte-complex/dist/index.html", tags: ["todomvc"], async prepare(page) { const element = await page.waitForElement(".new-todo");