I have this test case:
before(()=>{
cy.fixture('example').then(function (data) {
this.data = data;
})
cy.visit("http://127.0.0.1:3000/");
cy.contains("Connect Wallet").click();
cy.contains("Metamask").click();
cy.wait(10000)
cy.contains("0x352e").click();
cy.contains("Profile").click();
cy.wait(10000); // waiting for the profile to completely load
})
it.only("Edit User Profile",()=>{
cy.contains("Edit Profile").click();
cy.get('[data-testid="name"]').click();
cy.get('[data-testid="name"]').type(this.data.name); // getting error on this line
})
I am getting error (void 0) is undefined . What am I doing wrong ? Do I need to import any module to use the fixture's data ?