IO-2327 updated test cases for intake checklist
This commit is contained in:
@@ -3,7 +3,7 @@ import job from "../../fixtures/jobs/job-3.json";
|
||||
describe(
|
||||
"Adding job to checklist",
|
||||
{
|
||||
defaultCommandTimeout: 5000,
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
@@ -43,8 +43,36 @@ describe(
|
||||
// intakechecklist
|
||||
const checklists = bodyshop.intakechecklist.form;
|
||||
|
||||
//console.log(checklists);
|
||||
cy.get(".ant-slider-dot:eq(1)").click({ force: true });
|
||||
checklists.forEach((item, index) => {
|
||||
if (item.type === "text") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:text")
|
||||
.type("Random Word");
|
||||
} else if (item.type === "textarea") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("textarea")
|
||||
.type("Random Word");
|
||||
} else if (item.type === "checkbox") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:checkbox")
|
||||
.check();
|
||||
} else if (item.type === "slider") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-slider-dot:eq(1)")
|
||||
.click({ force: true });
|
||||
} else if (item.type === "rate") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-rate > li")
|
||||
.eq(Math.floor(Math.random() * 4))
|
||||
.find("div[role='radio']")
|
||||
.click({ force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user