test: find the course image label and attach course image to its sibling input
This commit is contained in:
@@ -19,12 +19,23 @@ describe("Course Creation", () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
cy.fixture("profile.png", "base64").then((fileContent) => {
|
cy.fixture("profile.png", "base64").then((fileContent) => {
|
||||||
cy.get('input[type="file"]').should("be.hidden").attachFile({
|
/* cy.get('input[type="file"]').should("be.hidden").attachFile({
|
||||||
fileContent,
|
fileContent,
|
||||||
fileName: "profile.png",
|
fileName: "profile.png",
|
||||||
mimeType: "image/png",
|
mimeType: "image/png",
|
||||||
encoding: "base64",
|
encoding: "base64",
|
||||||
});
|
}); */
|
||||||
|
|
||||||
|
cy.get("div")
|
||||||
|
.contains("Course Image")
|
||||||
|
.siblings("div")
|
||||||
|
.children('input[type="file"]')
|
||||||
|
.attachFile({
|
||||||
|
fileContent,
|
||||||
|
fileName: "profile.png",
|
||||||
|
mimeType: "image/png",
|
||||||
|
encoding: "base64",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get("label")
|
cy.get("label")
|
||||||
|
|||||||
Reference in New Issue
Block a user