test: find the course image label and attach course image to its sibling input

This commit is contained in:
Jannat Patel
2025-04-21 17:10:33 +05:30
parent 7ed5dfdb8f
commit 89fdbf5660

View File

@@ -19,12 +19,16 @@ describe("Course Creation", () => {
); );
cy.fixture("profile.png", "base64").then((fileContent) => { cy.fixture("profile.png", "base64").then((fileContent) => {
cy.get('input[type="file"]').attachFile({ cy.get("div")
fileContent, .contains("Course Image")
fileName: "profile.png", .siblings("div")
mimeType: "image/png", .children('input[type="file"]')
encoding: "base64", .attachFile({
}); fileContent,
fileName: "profile.png",
mimeType: "image/png",
encoding: "base64",
});
}); });
cy.get("label") cy.get("label")