Complete the code to load a fixture file named 'user.json' using Cypress.
cy.[1]('user.json').then((data) => { expect(data).to.have.property('name') })
The cy.fixture() command loads a fixed set of data from a file. Here, it loads 'user.json'.
Complete the code to assert that the loaded fixture data has an 'email' property.
cy.fixture('user.json').then((data) => { expect(data).to.[1]('email') })
The assertion have.property checks if the object has a specific property.
Fix the error in the code to correctly load the fixture and check the username.
cy.fixture('user.json').then((data) => { expect(data.[1]).to.equal('testuser') })
The fixture file has a property named 'username' to check against.
Fill both blanks to load 'config.json' fixture and assert the 'timeout' value is 5000.
cy.[1]('config.json').then((config) => { expect(config.[2]).to.equal(5000) })
Use cy.fixture to load the file and check the 'timeout' property value.
Fill all three blanks to load 'settings.json', check 'theme' is 'dark', and 'version' is '1.2.3'.
cy.[1]('settings.json').then((settings) => { expect(settings.[2]).to.equal('dark') expect(settings.[3]).to.equal('1.2.3') })
Load the fixture with cy.fixture, then check the 'theme' and 'version' properties.