IO-2327 timetickets test cases
This commit is contained in:
@@ -216,8 +216,6 @@ describe(
|
|||||||
.and("not.be.disabled")
|
.and("not.be.disabled")
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
// TODO check if labors are calculated correctly
|
|
||||||
|
|
||||||
cy.wait("@bodyshop").then(({ request }) => {
|
cy.wait("@bodyshop").then(({ request }) => {
|
||||||
const token = request.headers.authorization;
|
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-id"]').type("a");
|
||||||
cy.get('[data-cy="tech-employee-password"]').type("a{enter}");
|
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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export function TechClockInComponent({ form, bodyshop, technician }) {
|
|||||||
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
|
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
notInvoiced={!bodyshop.tt_allow_post_to_invoiced}
|
notInvoiced={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
|
data-cy="clock-ro-select"
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ export function TechClockInComponent({ form, bodyshop, technician }) {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Select>
|
<Select data-cy="clock-cost-center-select">
|
||||||
{emps &&
|
{emps &&
|
||||||
emps.rates.map((item) => (
|
emps.rates.map((item) => (
|
||||||
<Select.Option key={item.cost_center} value={item.cost_center}>
|
<Select.Option key={item.cost_center} value={item.cost_center}>
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ export function TechSider({ technician, techLogout }) {
|
|||||||
disabled={!!!technician}
|
disabled={!!!technician}
|
||||||
icon={<Icon component={FaBusinessTime} />}
|
icon={<Icon component={FaBusinessTime} />}
|
||||||
>
|
>
|
||||||
<Link to={`/tech/jobclock`}>{t("menus.tech.jobclockin")}</Link>
|
<Link data-cy="sider-joblock" to={`/tech/jobclock`}>
|
||||||
|
{t("menus.tech.jobclockin")}
|
||||||
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
key="4"
|
key="4"
|
||||||
|
|||||||
Reference in New Issue
Block a user