Skip to content

Commit

Permalink
Added tests to change for correct number of cards, names, and images
Browse files Browse the repository at this point in the history
  • Loading branch information
arloduff committed Apr 19, 2019
1 parent 2d5b934 commit f065869
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
25 changes: 23 additions & 2 deletions test/e2e/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,26 @@ describe('Home', () => {
await browser.url('/')
const title = await browser.getTitle()
expect(title).toBe('Force Vue Awakens')
})
})
});

it('should list 10 people', async () => {
await browser.pause(4000);
const cards = await $$('a.card');
expect(cards.length).toBe(10);
});

it('should list a name for each person', async () => {
const names = await $$('.card .card-title');
expect(names.length).toBe(10);
});

it('should display an image for each person', async () => {
const images = await $$('.card img');
expect(images.length).toBe(10);

for(let img of images) {
const isDisplayed = await img.isDisplayed();
expect(isDisplayed).toBe(true);
}
});
});
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
dom-event-types "^1.0.0"
lodash "^4.17.4"

"@wdio/cli@^5.7.14":
"@wdio/cli@^5.7.13":
version "5.7.14"
resolved "https://registry.yarnpkg.com/@wdio/cli/-/cli-5.7.14.tgz#920f3ee5a767f0c9a41791942f9a9e0d2c1f7fb2"
integrity sha512-U2r4zT59mDecKQ3+GdyTDTXulmlV4gfW254OSohxLACQweZkSLFvLkTq11tfgjfqeHnDNpg9tn1TTfYPY/ByVA==
Expand Down Expand Up @@ -455,7 +455,7 @@
junit-report-builder "^1.3.0"
validator "^9.4.1"

"@wdio/local-runner@^5.7.14":
"@wdio/local-runner@^5.7.13":
version "5.7.14"
resolved "https://registry.yarnpkg.com/@wdio/local-runner/-/local-runner-5.7.14.tgz#49a8e37d8d9de415db25a97bc6f90306b781cfa6"
integrity sha512-SuxAxMbfHHT2uQBY0lapES5RX7Q7NrViPPscs6pGBMXnXmFIpS0ZaE7KpECU0sLhSlQ5iWCv20jRoqm1VpeZgw==
Expand Down Expand Up @@ -3140,10 +3140,10 @@ eslint-plugin-es@^1.3.1:
eslint-utils "^1.3.0"
regexpp "^2.0.1"

eslint-plugin-import@^2.17.2:
version "2.17.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.2.tgz#d227d5c6dc67eca71eb590d2bb62fb38d86e9fcb"
integrity sha512-m+cSVxM7oLsIpmwNn2WXTJoReOF9f/CtLMo7qOVmKd1KntBy0hEcuNZ3erTmWjx+DxRO0Zcrm5KwAvI9wHcV5g==
eslint-plugin-import@^2.17.1:
version "2.17.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.1.tgz#b888feb4d9b3ee155113c8dccdd4bec5db33bdf4"
integrity sha512-lzD9uvRvW4MsHzIOMJEDSb5MOV9LzgxRPBaovvOhJqzgxRHYfGy9QOrMuwHIh5ehKFJ7Z3DcrcGKDQ0IbP0EdQ==
dependencies:
array-includes "^3.0.3"
contains-path "^0.1.0"
Expand Down Expand Up @@ -8557,10 +8557,10 @@ vue-loader@^15.2.0:
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"

vue-router@^3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.6.tgz#2e4f0f9cbb0b96d0205ab2690cfe588935136ac3"
integrity sha512-Ox0ciFLswtSGRTHYhGvx2L44sVbTPNS+uD2kRISuo8B39Y79rOo0Kw0hzupTmiVtftQYCZl87mwldhh2L9Aquw==
vue-router@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.4.tgz#d6023e9db64d0b335771f0316c8bde8956f2d75d"
integrity sha512-wjirAFeMR53FFTRIM2ofLKH5BJte6Q9+MUiOj6fLzqhgerjVyQVeMmvgiQDslPJJHSqFfQ559EDvIi0lA1Lr6g==

vue-style-loader@^4.1.0:
version "4.1.2"
Expand Down

0 comments on commit f065869

Please sign in to comment.