Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,7 @@ class Playwright extends Helper {
let chunked = chunkArray(attrs, values.length);
chunked = chunked.filter((val) => {
for (let i = 0; i < val.length; ++i) {
if (val[i] !== values[i]) return false;
if (!val[i].includes(values[i])) return false;
}
return true;
});
Expand Down
2 changes: 1 addition & 1 deletion lib/helper/Puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ class Puppeteer extends Helper {
let chunked = chunkArray(attrs, values.length);
chunked = chunked.filter((val) => {
for (let i = 0; i < val.length; ++i) {
if (val[i] !== values[i]) return false;
if (!val[i].includes(values[i])) return false;
}
return true;
});
Expand Down
13 changes: 13 additions & 0 deletions test/helper/webapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,19 @@ module.exports.tests = function () {
}
});

it('should check href with splash', async function () {
if (isHelper('TestCafe') || isHelper('WebDriver')) this.skip();

try {
await I.amOnPage('https://github.com/codeceptjs/CodeceptJS/');
await I.seeAttributesOnElements({ css: 'a[href="/team"]' }, {
href: '/team',
});
} catch (e) {
e.message.should.include('all elements (a[href="/team"]) to have attributes {"href":"/team"}');
}
});

it('should check attributes values for several elements', async function () {
if (isHelper('TestCafe')) this.skip();

Expand Down