mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 11:08:12 +00:00
changes
This commit is contained in:
@@ -147,17 +147,16 @@ function fillNth(label: RegExp, index: number, value: string) {
|
||||
});
|
||||
}
|
||||
|
||||
/** Open the Shipment day picker and choose the train's departure day. */
|
||||
/**
|
||||
* Choose the train's departure day on the Schedule card's INLINE calendar
|
||||
* (cargo-aware: days only unlock once the cargo details above are valid).
|
||||
*/
|
||||
function pickShipmentDay() {
|
||||
cy.contains("label", /^Shipment day/)
|
||||
.invoke("attr", "for")
|
||||
.then((id) => {
|
||||
cy.get(`[id="${id}"]`).click({ force: true });
|
||||
});
|
||||
cy.contains(/available day/, { timeout: 30000 }).should("exist");
|
||||
// Day cells are plain buttons in a div grid; only bookable days are enabled
|
||||
// (out-of-month duplicates stay disabled).
|
||||
const day = String(SHIPMENT_DAY.getDate());
|
||||
cy.get(".mantine-Popover-dropdown button:not([data-disabled]):not([disabled])", {
|
||||
timeout: 15000,
|
||||
})
|
||||
cy.get("button:not(:disabled)", { timeout: 15000 })
|
||||
.contains(new RegExp(`^${day}$`))
|
||||
.click({ force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user