forked from verdnatura/salix-front
perf: test command fillInForm
This commit is contained in:
parent
408aa9d535
commit
b068515f55
|
@ -110,14 +110,14 @@ Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => {
|
|||
const { type, val } = field;
|
||||
switch (type) {
|
||||
case 'select':
|
||||
cy.wrap(el).type(val);
|
||||
cy.get(el).click();
|
||||
cy.get('.q-menu .q-item').contains(val).click();
|
||||
break;
|
||||
case 'date':
|
||||
cy.wrap(el).type(val.split('-').join(''));
|
||||
cy.get(el).type(val.split('-').join(''));
|
||||
break;
|
||||
case 'time':
|
||||
cy.wrap(el).click();
|
||||
cy.get(el).click();
|
||||
cy.get('.q-time .q-time__clock').contains(val.h).click();
|
||||
cy.get('.q-time .q-time__clock').contains(val.m).click();
|
||||
cy.get('.q-time .q-time__link').contains(val.x).click();
|
||||
|
|
Loading…
Reference in New Issue