fix: refs #8581 update fillInForm command to include delay and remove unused default case
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
25e60e549a
commit
94eebce445
|
@ -173,7 +173,7 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
|
||||||
const field = obj[key];
|
const field = obj[key];
|
||||||
if (!field) return;
|
if (!field) return;
|
||||||
if (typeof field == 'string')
|
if (typeof field == 'string')
|
||||||
return cy.wrap(el).type(`{selectall}{backspace}${field}`);
|
return cy.wrap(el).type(`{selectall}{backspace}${field}, {delay: 0}`);
|
||||||
|
|
||||||
const { type, val } = field;
|
const { type, val } = field;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -191,9 +191,6 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
|
||||||
cy.get('.q-time .q-time__clock').contains(val.m).click();
|
cy.get('.q-time .q-time__clock').contains(val.m).click();
|
||||||
cy.get('.q-time .q-time__link').contains(val.x).click();
|
cy.get('.q-time .q-time__link').contains(val.x).click();
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
cy.wrap(el).type(`{selectall}{backspace}${val}`);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue