Use-Case:
- I would like to set the candidate profile image, and then login as an employer, and view it.
- I would like to separate the tests of setting the profile image as a candidate, and viewing it as an employer. Thus, I would like to access
cy.wrap()
components.
Code Example:
describe("Testing Candidate Profile Images", () => {
it("Uploading Images", () => cy.get("img[alt='Profile Image']").then(($img) => cy.wrap($img.attr("src")).as("imageSrc")));
it("Employer Seeing Image", () => cy.get($imageSrc);
});
Is it possible to store these as variables in the describe block, to use in subsequent cypress tests? I believe this example now does not work.