Skip to content

Commit 59880e4

Browse files
Merge pull request #8 from Fishbowler/patch-1
Return element to make it chainable downstream
2 parents 12bd517 + b1e22d1 commit 59880e4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

spec/cypress/integration/example.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,10 @@ describe('testing example page', () => {
7676
'Some other textContent Editable'
7777
)
7878
})
79+
80+
it('should be chainable to future child commands', () => {
81+
cy.get('#simple-text-area').fill('Some text').clear()
82+
83+
cy.get('#simple-text-area').should('have.value', '')
84+
})
7985
})

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,7 @@ Cypress.Commands.add(
7474
}
7575
}
7676
})
77+
78+
cy.wrap(element)
7779
}
7880
)

0 commit comments

Comments
 (0)