This repository was archived by the owner on Oct 13, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,23 @@ describe('cypress-xpath', () => {
55 expect ( cy ) . property ( 'xpath' ) . to . be . a ( 'function' )
66 } )
77
8- it ( 'finds h1 ', ( ) => {
9- cy . visit ( 'cypress/integration/index.html' )
10- cy . xpath ( '//h1' ) . should ( 'have.length' , 1 )
11- } )
8+ context ( 'elements ', ( ) => {
9+ beforeEach ( ( ) => {
10+ cy . visit ( 'cypress/integration/index.html' )
11+ } )
1212
13- it ( 'returns jQuery wrapped elements' , ( ) => {
14- cy . visit ( 'cypress/integration/index.html' )
15- cy . xpath ( '//h1' ) . then ( ( el$ ) => {
16- expect ( el$ ) . to . have . property ( 'jquery' )
13+ it ( 'finds h1' , ( ) => {
14+ cy . xpath ( '//h1' ) . should ( 'have.length' , 1 )
1715 } )
18- } )
1916
20- it ( 'gets h1 text' , ( ) => {
21- cy . visit ( 'cypress/integration/index.html' )
22- cy . xpath ( '//h1/text()' ) . its ( '0.textContent' ) . should ( 'equal' , 'cypress-xpath' )
17+ it ( 'returns jQuery wrapped elements' , ( ) => {
18+ cy . xpath ( '//h1' ) . then ( ( el$ ) => {
19+ expect ( el$ ) . to . have . property ( 'jquery' )
20+ } )
21+ } )
22+
23+ it ( 'gets h1 text' , ( ) => {
24+ cy . xpath ( '//h1/text()' ) . its ( '0.textContent' ) . should ( 'equal' , 'cypress-xpath' )
25+ } )
2326 } )
2427} )
You can’t perform that action at this time.
0 commit comments