fix: simplify waitForElement command and ensure selector exists before scrolling
gitea/salix-front/pipeline/pr-master This commit is unstable
Details
gitea/salix-front/pipeline/pr-master This commit is unstable
Details
This commit is contained in:
parent
a55c03f945
commit
c4c6758a6c
|
@ -72,11 +72,7 @@ Cypress.Commands.overwrite('visit', (originalFn, url, options, waitRequest = tru
|
|||
});
|
||||
|
||||
Cypress.Commands.add('waitForElement', (element) => {
|
||||
cy.get(element)
|
||||
.should('exist')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.and('not.be.disabled');
|
||||
cy.get(element).should('be.visible').and('not.be.disabled');
|
||||
});
|
||||
|
||||
Cypress.Commands.add('getValue', (selector) => {
|
||||
|
@ -114,6 +110,7 @@ Cypress.Commands.add('waitSpinner', () => {
|
|||
|
||||
// Fill Inputs
|
||||
Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
|
||||
cy.get(selector).should('exist').scrollIntoView();
|
||||
cy.waitForElement(selector, timeout);
|
||||
|
||||
cy.get(selector, { timeout })
|
||||
|
|
Loading…
Reference in New Issue