Complete the code to check that the element does NOT contain the text 'Error'.
cy.get('.message').should('not.[1]', 'Error')
The contain assertion checks if the element contains the given text. Using not.contain asserts the element does NOT contain that text.
Complete the code to assert that the button is NOT disabled.
cy.get('button.submit').should('not.[1]')
The assertion be.disabled checks if the button is disabled. Using not.be.disabled asserts it is not disabled.
Fix the error in the code to assert the input field does NOT have the value 'admin'.
cy.get('#username').should('not.[1]', 'admin')
To negate an assertion in Cypress, use 'not.' before the assertion name. So not.have.value checks the input does NOT have the given value.
Fill both blanks to assert the element with class 'alert' is NOT visible and does NOT exist in the DOM.
cy.get('.alert').should('[1].be.visible').and('[2].exist')
Both assertions are negated using 'not.' to check the element is not visible and does not exist.
Fill all three blanks to assert that the checkbox with id 'agree' is NOT checked, NOT disabled, and NOT visible.
cy.get('#agree').should('[1].be.checked').and('[2].be.disabled').and('[3].be.visible')
Each assertion is negated with 'not.' to check the checkbox is not checked, not disabled, and not visible.