Assertions Flashcards

1
Q

CSS

A

cy.get(‘.completed’).should(‘have.css’, ‘text-decoration’, ‘line-through’) cy.get(‘#accordion’).should(‘not.have.css’, ‘display’, ‘none’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

State

A

cy.get(‘:radio’).should(‘be.checked’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Existence

A

cy.get(‘#loading’).should(‘not.exist’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Visibility

A

cy.get(‘button’).should(‘be.visible’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Text Content

A

cy.get(‘a’).parent(‘span.help’).should(‘not.contain’, ‘click me’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Value

A

cy.get(‘textarea’).should(‘have.value’, ‘foo bar baz’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Class

A

cy.get(‘form’).find(‘input’).should(‘not.have.class’, ‘disabled’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Length

A

cy.get(‘li.selected’).should(‘have.length’, 3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly