Complete the code to read a file and check its content includes 'Hello'.
cy.readFile('example.txt').should('[1]', 'Hello')
The should('include', 'Hello') assertion checks if the file content includes the text 'Hello'.
Complete the code to assert the file content equals exactly 'Test data'.
cy.readFile('data.txt').should('[1]', 'Test data')
The should('equal', 'Test data') assertion checks if the file content exactly matches 'Test data'.
Fix the error in the assertion to check the file content length is 10.
cy.readFile('log.txt').should('have.[1]', 10)
The correct assertion is should('have.length', 10) to check the string length.
Fill both blanks to assert the file content includes 'success' and has length 5.
cy.readFile('output.log').should('[1]', 'success').and('have.[2]', 5)
Use should('include', 'success') to check substring and and('have.length', 5) to check length.
Fill all three blanks to assert the file content equals 'Done', contains 'Done', and has length 4.
cy.readFile('status.txt').should('[1]', 'Done').and('[2]', 'Done').and('have.[3]', 4)
The first assertion checks exact equality, the second checks substring inclusion, and the third checks length.