fix: refs #8581 streamline form filling command by removing unnecessary backspace
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
749b157fcf
commit
7bd6c92aed
|
@ -173,7 +173,7 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
|
|||
const field = obj[key];
|
||||
if (!field) return;
|
||||
if (typeof field == 'string')
|
||||
return cy.wrap(el).type(`{selectall}{backspace}${field}, {delay: 0}`);
|
||||
return cy.wrap(el).type(`{selectall}${field}`, { delay: 0 });
|
||||
|
||||
const { type, val } = field;
|
||||
switch (type) {
|
||||
|
@ -181,9 +181,7 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
|
|||
cy.selectOption(el, val);
|
||||
break;
|
||||
case 'date':
|
||||
cy.get(el).type(
|
||||
`{selectall}{backspace}${val.split('-').join('')}`,
|
||||
);
|
||||
cy.get(el).type(`{selectall}${val.split('-').join('')}`);
|
||||
break;
|
||||
case 'time':
|
||||
cy.get(el).click();
|
||||
|
|
Loading…
Reference in New Issue