Skip to content

Commit

Permalink
Merge branch 'develop' into #76-assertion-docs-to-$el
Browse files Browse the repository at this point in the history
# Conflicts:
#	source/guides/references/assertions.md
  • Loading branch information
jennifer-shehane committed Sep 14, 2017
2 parents 6b0fcb4 + 8922f8a commit 954db58
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions source/guides/references/assertions.md
Expand Up @@ -139,6 +139,7 @@ You will commonly use these chainers after using DOM commands like: {% url `cy.g

| Chainers | Assertion |
| --- | --- |
<<<<<<< HEAD
| attr( *name*, *[value]*) | `expect($el).to.have.attr('foo', 'bar')` |
| prop( *name*, *[value]*) | `expect($el).to.have.prop('disabled', false)` |
| css( *name*, *[value]*) | `expect($el).to.have.css('background-color', 'rgb(0, 0, 0)')` |
Expand All @@ -159,6 +160,28 @@ You will commonly use these chainers after using DOM commands like: {% url `cy.g
| match( *selector* ) | `expect($emptyEl).to.match(':empty')` |
| contain( *text* ) | `expect($el).to.contain('text')` |
| descendents( *selector* ) | `expect($el).to.have.descendants('div')` |
=======
| attr( *name*, *[value]*) | `expect($('body')).to.have.attr('foo', 'bar')` |
| prop( *name*, *[value]*) | `expect($('body')).to.have.prop('disabled', false)` |
| css( *name*, *[value]*) | `expect($('body')).to.have.css('background-color', 'rgb(0, 0, 0)')` |
| data( *name*, *[value]*) | `expect($('body')).to.have.data('foo', 'bar')` |
| class( *className* ) | `expect($('body')).to.have.class('foo')` |
| id( *id* ) | `expect($('body')).to.have.id('foo')` |
| html( *html*) | `expect($('#title')).to.have.html('Chai Tea')` |
| text( *text* ) | `expect($('#title')).to.have.text('Chai Tea')` |
| value( *value* ) | `expect($('.year')).to.have.value('2012')` |
| visible | `expect($('.year')).to.be.visible` |
| hidden | `expect($('.year')).to.be.hidden` |
| selected | `expect($('option')).not.to.be.selected` |
| checked | `expect($('input')).not.to.be.checked` |
| enabled | `expect($('enabled')).to.be.enabled` |
| disabled | `expect($('input')).not.to.be.disabled` |
| empty | `expect($('body')).not.to.be.empty` |
| exist | `expect($('#nonexistent')).not.to.exist` |
| match( *selector* ) | `expect($('#empty')).to.match(':empty')` |
| contain( *text* ) | `expect($('#content')).to.contain('text')` |
| descendants( *selector* ) | `expect($('#content')).to.have.descendants('div')` |
>>>>>>> develop
# Sinon-Chai

Expand Down

0 comments on commit 954db58

Please sign in to comment.