-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef3d6a4
commit 016ddcd
Showing
2 changed files
with
96 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
import { browser, $, $$, expect } from '@wdio/globals' | ||
import { browser, $, $$, expect } from "@wdio/globals"; | ||
|
||
describe('My Vue.js Example Application', () => { | ||
it('should be able to complete ToDos', async () => { | ||
await browser.url('http://todomvc.com/examples/vue/dist/') | ||
describe("My Vue.js Example Application", () => { | ||
it("should be able to complete ToDos", async () => { | ||
await browser.url("http://todomvc.com/examples/vue/dist/"); | ||
|
||
const newTodoInput = await $('.new-todo') | ||
const newTodoInput = await $(".new-todo"); | ||
|
||
await newTodoInput.setValue('ToDo #1') | ||
await browser.keys('Enter') | ||
await newTodoInput.setValue("ToDo #1"); | ||
await browser.keys("Enter"); | ||
|
||
await newTodoInput.setValue('ToDo #2') | ||
await browser.keys('Enter') | ||
await newTodoInput.setValue("ToDo #2"); | ||
await browser.keys("Enter"); | ||
|
||
await newTodoInput.setValue('ToDo #3') | ||
await browser.keys('Enter') | ||
await newTodoInput.setValue("ToDo #3"); | ||
await browser.keys("Enter"); | ||
|
||
// to see that all ToDos were entered | ||
await browser.pause(2000) | ||
await browser.pause(2000); | ||
|
||
const allTodos = await $$('.todo-list li') | ||
await allTodos[1].$('.toggle').click() | ||
const allTodos = await $$(".todo-list li"); | ||
await expect(allTodos).toBeElementsArrayOfSize(3); | ||
await allTodos[1].$(".toggle").click(); | ||
|
||
// to see that ToDo was completed | ||
await browser.pause(2000) | ||
await browser.pause(2000); | ||
|
||
const todoCount = await $('.todo-count') | ||
await expect(todoCount).toHaveText('2 items left') | ||
}) | ||
}) | ||
const todoCount = await $(".todo-count"); | ||
await expect(todoCount).toHaveText("2 items left"); | ||
}); | ||
}); |