IO-2327 timetickets test cases

This commit is contained in:
swtmply
2023-08-30 12:11:31 +08:00
parent 7fc9bd5b35
commit 692f5c0167
3 changed files with 40 additions and 4 deletions

View File

@@ -216,8 +216,6 @@ describe(
.and("not.be.disabled")
.click();
// TODO check if labors are calculated correctly
cy.wait("@bodyshop").then(({ request }) => {
const token = request.headers.authorization;
@@ -280,6 +278,41 @@ describe(
cy.get('[data-cy="tech-employee-id"]').type("a");
cy.get('[data-cy="tech-employee-password"]').type("a{enter}");
cy.contains("Logged in as");
// go to clock in
cy.get('[data-cy="sider-joblock"]').click({ force: true });
// find the job ro
cy.get('[data-cy="clock-ro-select"]').type("273");
cy.get('[data-cy="clock-ro-select"] .ant-select-selection-search input')
.invoke("attr", "id")
.then((selElm) => {
const dropDownSelector = `#${selElm}_list`;
cy.get(dropDownSelector)
.next()
.find(".ant-select-item-option-content")
.first()
.click({ force: true });
});
// select cost center
cy.get('[data-cy="clock-cost-center-select"]').click();
cy.get(
'[data-cy="clock-cost-center-select"] .ant-select-selection-search input'
)
.invoke("attr", "id")
.then((selElm) => {
const dropDownSelector = `#${selElm}_list`;
cy.get(dropDownSelector)
.next()
.find(".ant-select-item-option-content")
.contains("Body")
.first()
.click({ force: true });
});
// clock in and out of the job
});
}
);