File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -2154,7 +2154,7 @@ class Playwright extends Helper {
2154
2154
let chunked = chunkArray ( attrs , values . length ) ;
2155
2155
chunked = chunked . filter ( ( val ) => {
2156
2156
for ( let i = 0 ; i < val . length ; ++ i ) {
2157
- if ( val [ i ] !== values [ i ] ) return false ;
2157
+ if ( ! val [ i ] . includes ( values [ i ] ) ) return false ;
2158
2158
}
2159
2159
return true ;
2160
2160
} ) ;
Original file line number Diff line number Diff line change @@ -1817,9 +1817,9 @@ class Puppeteer extends Helper {
1817
1817
let chunked = chunkArray ( attrs , values . length ) ;
1818
1818
chunked = chunked . filter ( ( val ) => {
1819
1819
for ( let i = 0 ; i < val . length ; ++ i ) {
1820
- const _acutal = Number . isNaN ( val [ i ] ) || ( typeof values [ i ] ) === 'string' ? val [ i ] : Number . parseInt ( val [ i ] , 10 ) ;
1820
+ const _actual = Number . isNaN ( val [ i ] ) || ( typeof values [ i ] ) === 'string' ? val [ i ] : Number . parseInt ( values [ i ] , 10 ) ;
1821
1821
const _expected = Number . isNaN ( values [ i ] ) || ( typeof values [ i ] ) === 'string' ? values [ i ] : Number . parseInt ( values [ i ] , 10 ) ;
1822
- if ( _acutal !== _expected ) return false ;
1822
+ if ( ! _actual . includes ( _expected ) ) return false ;
1823
1823
}
1824
1824
return true ;
1825
1825
} ) ;
Original file line number Diff line number Diff line change @@ -1340,6 +1340,19 @@ module.exports.tests = function () {
1340
1340
}
1341
1341
} ) ;
1342
1342
1343
+ it ( 'should check href with slash' , async function ( ) {
1344
+ if ( isHelper ( 'TestCafe' ) || isHelper ( 'WebDriver' ) ) this . skip ( ) ;
1345
+
1346
+ try {
1347
+ await I . amOnPage ( 'https://github.com/codeceptjs/CodeceptJS/' ) ;
1348
+ await I . seeAttributesOnElements ( { css : 'a[href="/team"]' } , {
1349
+ href : '/team' ,
1350
+ } ) ;
1351
+ } catch ( e ) {
1352
+ e . message . should . include ( 'all elements (a[href="/team"]) to have attributes {"href":"/team"}' ) ;
1353
+ }
1354
+ } ) ;
1355
+
1343
1356
it ( 'should check attributes values for several elements' , async function ( ) {
1344
1357
if ( isHelper ( 'TestCafe' ) ) this . skip ( ) ;
1345
1358
You can’t perform that action at this time.
0 commit comments