assert.strictEqual(current_url.searchParams.get('q'), 'Paris');
});
- it('should atleast one result', async function () {
+ it('should have at least one result', async function () {
let results_count = await page.$$eval('#searchresults .result', elements => elements.length);
assert.ok(results_count > 1);
});
it('should have show more results button', async function () {
- let [search_more_btn] = await page.$x("//a[contains(text(), 'Search for more results')]");
+ let [search_more_btn] = await page.$$(
+ "xpath/.//a[contains(text(), 'Search for more results')]"
+ );
assert.ok(search_more_btn);
});