feat: refs #6897 update FormModelPopup button logic and add entryList tests
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
65e48f6194
commit
8539e93389
|
@ -76,6 +76,19 @@ defineExpose({
|
|||
}
|
||||
"
|
||||
/>
|
||||
<QBtn
|
||||
:flat="showSaveAndContinueBtn"
|
||||
:label="t('globals.save')"
|
||||
:title="t('globals.save')"
|
||||
type="submit"
|
||||
color="primary"
|
||||
class="q-ml-sm"
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
data-cy="FormModelPopup_save"
|
||||
z-max
|
||||
@click="() => (isSaveAndContinue = false)"
|
||||
/>
|
||||
<QBtn
|
||||
v-if="showSaveAndContinueBtn"
|
||||
:label="t('globals.isSaveAndContinue')"
|
||||
|
@ -89,19 +102,6 @@ defineExpose({
|
|||
z-max
|
||||
@click="() => (isSaveAndContinue = true)"
|
||||
/>
|
||||
<QBtn
|
||||
v-else
|
||||
:label="t('globals.save')"
|
||||
:title="t('globals.save')"
|
||||
type="submit"
|
||||
color="primary"
|
||||
class="q-ml-sm"
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
data-cy="FormModelPopup_save"
|
||||
z-max
|
||||
@click="() => (isSaveAndContinue = false)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -124,12 +124,12 @@ describe('Entry', () => {
|
|||
|
||||
clickAndType('stickers', '1');
|
||||
checkText('quantity', '11');
|
||||
checkText('amount', '550');
|
||||
checkText('amount', '550.00');
|
||||
clickAndType('packing', '2');
|
||||
checkText('packing', '12close');
|
||||
checkText('weight', '12');
|
||||
checkText('weight', '12.0');
|
||||
checkText('quantity', '132');
|
||||
checkText('amount', '6600');
|
||||
checkText('amount', '6600.00');
|
||||
checkColor('packing', COLORS.enabled);
|
||||
|
||||
selectCell('groupingMode').click().click().click();
|
||||
|
@ -137,7 +137,7 @@ describe('Entry', () => {
|
|||
checkColor('grouping', COLORS.enabled);
|
||||
|
||||
selectCell('buyingValue').click().clear().type('{backspace}{backspace}1');
|
||||
checkText('amount', '132');
|
||||
checkText('amount', '132.00');
|
||||
checkColor('minPrice', COLORS.disable);
|
||||
|
||||
selectCell('hasMinPrice').click().click();
|
|
@ -4,9 +4,6 @@ describe('Route', () => {
|
|||
cy.login('developer');
|
||||
cy.visit(`/#/route/extended-list`);
|
||||
});
|
||||
const getVnSelect =
|
||||
'> :nth-child(1) > .column > .q-field > .q-field__inner > .q-field__control > .q-field__control-container';
|
||||
const getRowColumn = (row, column) => `:nth-child(${row}) > :nth-child(${column})`;
|
||||
|
||||
it('Route list create route', () => {
|
||||
cy.addBtnClick();
|
||||
|
@ -16,18 +13,25 @@ describe('Route', () => {
|
|||
});
|
||||
|
||||
it('Route list search and edit', () => {
|
||||
cy.get('#searchbar input').type('{enter}'); /*
|
||||
cy.get('td[data-col-field="description"]').click(); */
|
||||
cy.get('input[name="description"]').type('routeTestOne{enter}');
|
||||
/* cy.get('.q-table tr')
|
||||
cy.get('#searchbar input').type('{enter}');
|
||||
cy.get('[data-col-field="description"][data-row-index="0"]')
|
||||
.click()
|
||||
.type('routeTestOne{enter}');
|
||||
cy.get('.q-table tr')
|
||||
.its('length')
|
||||
.then((rowCount) => {
|
||||
expect(rowCount).to.be.greaterThan(0);
|
||||
});
|
||||
cy.get(getRowColumn(1, 3) + getVnSelect).type('{downArrow}{enter}');
|
||||
cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}');
|
||||
cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}');
|
||||
cy.get('[data-col-field="workerFk"][data-row-index="0"]')
|
||||
.click()
|
||||
.type('{downArrow}{enter}');
|
||||
cy.get('[data-col-field="agencyModeFk"][data-row-index="0"]')
|
||||
.click()
|
||||
.type('{downArrow}{enter}');
|
||||
cy.get('[data-col-field="vehicleFk"][data-row-index="0"]')
|
||||
.click()
|
||||
.type('{downArrow}{enter}');
|
||||
cy.get('button[title="Save"]').click();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved'); */
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue