This commit is contained in:
parent
b77a10a57a
commit
fd09a6bfbe
|
@ -2,6 +2,9 @@ describe('WorkerCreate', () => {
|
||||||
const externalRadio = '.q-radio:nth-child(2)';
|
const externalRadio = '.q-radio:nth-child(2)';
|
||||||
const notification = '.q-notification__message';
|
const notification = '.q-notification__message';
|
||||||
const developerBossId = 120;
|
const developerBossId = 120;
|
||||||
|
const payMethodCross =
|
||||||
|
'.grid-create .full-width > :nth-child(9) .q-select .q-field__append:not(.q-anchor--skip)';
|
||||||
|
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
||||||
|
|
||||||
const internal = {
|
const internal = {
|
||||||
Fi: { val: '78457139E' },
|
Fi: { val: '78457139E' },
|
||||||
|
@ -36,7 +39,8 @@ describe('WorkerCreate', () => {
|
||||||
|
|
||||||
it('should throw an error if a pay method has not been selected', () => {
|
it('should throw an error if a pay method has not been selected', () => {
|
||||||
cy.fillInForm(internal);
|
cy.fillInForm(internal);
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get(payMethodCross).click();
|
||||||
|
cy.get(saveBtn).click();
|
||||||
cy.get(notification).should('contains.text', 'Payment method is required');
|
cy.get(notification).should('contains.text', 'Payment method is required');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -45,14 +49,14 @@ describe('WorkerCreate', () => {
|
||||||
...internal,
|
...internal,
|
||||||
'Pay method': { val: 'PayMethod one', type: 'select' },
|
'Pay method': { val: 'PayMethod one', type: 'select' },
|
||||||
});
|
});
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get(saveBtn).click();
|
||||||
cy.get(notification).should('contains.text', 'Data created');
|
cy.get(notification).should('contains.text', 'Data created');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create an external', () => {
|
it('should create an external', () => {
|
||||||
cy.get(externalRadio).click();
|
cy.get(externalRadio).click();
|
||||||
cy.fillInForm(external);
|
cy.fillInForm(external);
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get(saveBtn).click();
|
||||||
cy.get(notification).should('contains.text', 'Data created');
|
cy.get(notification).should('contains.text', 'Data created');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue