Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
issackjohn committed Jul 7, 2023
1 parent 16516a9 commit 81ee6b3
Showing 1 changed file with 0 additions and 89 deletions.
89 changes: 0 additions & 89 deletions resources/tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,66 +78,6 @@ Suites.push({
],
});

Suites.push({
name: "TodoMVC-JavaScript-ES6",
url: "todomvc/vanilla-examples/javascript-es6/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-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-Complex-DOM",
url: "todomvc/vanilla-examples/javascript-es6-webpack/complex/dist/index.html",
Expand Down Expand Up @@ -470,35 +410,6 @@ Suites.push({
],
});

Suites.push({
name: "TodoMVC-jQuery-Complex-DOM",
url: "todomvc/architecture-examples/jquery-complex/dist/index.html",
tags: ["todomvc"],
async prepare(page) {
await page.waitForElement("#appIsReady");
const newTodo = page.getElementById("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.enter("keyup");
}
}),
new BenchmarkTestStep("CompletingAllItems", (page) => {
const checkboxes = page.querySelectorAll(".toggle");
for (let i = 0; i < numberOfItemsToAdd; i++)
checkboxes[i].click();
}),
new BenchmarkTestStep("DeletingAllItems", (page) => {
for (let i = numberOfItemsToAdd - 1; i >= 0; i--)
page.querySelector(".destroy").click();
}),
],
});

Suites.push({
name: "TodoMVC-Preact-Complex-DOM",
url: "todomvc/architecture-examples/preact-complex/dist/index.html#/home",
Expand Down

0 comments on commit 81ee6b3

Please sign in to comment.