fix: refs #8583 workerTimeControl
This commit is contained in:
parent
75a2c3660e
commit
c18dce46e0
|
@ -53,7 +53,7 @@ const title = computed(() => (isEditMode.value ? t('Edit entry') : t('Add time')
|
|||
const urlCreate = computed(() =>
|
||||
isEditMode.value
|
||||
? `WorkerTimeControls/${$props.entryId}/updateTimeEntry`
|
||||
: `WorkerTimeControls/${route.params.id}/addTimeEntry`
|
||||
: `WorkerTimeControls/${route.params.id}/addTimeEntry`,
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
|
@ -83,6 +83,7 @@ onBeforeMount(() => {
|
|||
autofocus
|
||||
:required="true"
|
||||
:is-clearable="false"
|
||||
data-cy="entryHour"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('Type')"
|
||||
|
@ -91,6 +92,7 @@ onBeforeMount(() => {
|
|||
option-value="code"
|
||||
option-label="description"
|
||||
hide-selected
|
||||
data-cy="entryType"
|
||||
/>
|
||||
</template>
|
||||
</FormModelPopup>
|
||||
|
|
|
@ -4,6 +4,10 @@ describe('WorkerTimeControl', () => {
|
|||
'[aria-label="Monday, December 4, 2000"][style="min-width: 32.2857px; max-width: 32.2857px; width: 32.2857px;"] > .q-calendar-month__day--label__wrapper > .q-calendar-month__day--label';
|
||||
const addTime4December =
|
||||
':nth-child(2) > :nth-child(1) > .column > .q-btn > .q-btn__content > .q-icon';
|
||||
const entryType = 'data-cy="entryType"';
|
||||
const entryIn = 'in';
|
||||
const entryMiddle = 'middle';
|
||||
const entryOut = 'out';
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
|
@ -14,6 +18,8 @@ describe('WorkerTimeControl', () => {
|
|||
cy.get(pastMonth).click();
|
||||
cy.get(pastDay).click();
|
||||
cy.get(addTime4December).click();
|
||||
cy.get(entryType).type(entryIn);
|
||||
cy.saveCard();
|
||||
});
|
||||
|
||||
// it('should try descriptors', () => {
|
||||
|
|
Loading…
Reference in New Issue