Created
December 25, 2017 09:51
-
-
Save conanak99/b72e6c030722030b90ba190d6b968e40 to your computer and use it in GitHub Desktop.
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
test('Search sexy underwear', async() => { | |
expect.assertions(1); | |
// Tìm khung search, gõ sexy underwear và bấm enter | |
const searchBox = await page.$('#q'); | |
await searchBox.type('sexy underwear'); | |
await searchBox.press('Enter'); | |
// Chờ trang load xong, tìm các phần tử item và đếm nếu đủ 40 | |
await page.waitForNavigation(); | |
const products = await page.$$('div[data-qa-locator=product-item]'); | |
expect(products.length).toBe(40); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment