How to prevent going to the Specs folder when the page URL changes during the test #1449
Unanswered
DaniilKonarev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Colleagues, greetings.
I must say right away, I have never been a guru or an automator at all, but I use Cypress to automate routine checks.
In general, there is a problem that I cannot find a solution to.
There is a small test that checks the presence of the word "Electronic" on the page.
it.("Название", () => {
cy.visit("someUrl");
cy.getEl("field-login").type(v.operrtest);
cy.getEl("field-password").type(v.operrtestpass);
cy.getEl("button-save").click();
cy.getEl("field-name-docSeries").type(v.validPassSer);
cy.wait(500);
cy.getEl("field-name-docNumber").type(v.validPassNum);
cy.contains("Найти").click();
cy.get(".preloader-container").should("not.exist");
cy.wait(2000);
//---Переход на новый фронт---
cy.contains("Перейти на новую версию").click();
//---ввод реквизитов---
cy.getEl("overflow-menu-button-overflow-menu-button").click();
cy.contains("Выпустить дебетовую карту").click();
cy.contains("Запуск процесса").should("not.exist");
cy.pause();
cy.getEl("tariffPlan").type(v.tariffname).type("{enter}");
cy.getEl("cardTypepersonal").click();
cy.getEl("personalCardPaySystem")
.type(v.personalCardPaySystem)
.type("{enter}");
cy.getEl("personalCardCategory")
.type(v.personalCardCategory)
.type("{enter}");
cy.getEl("buttonComplete").click();
//---ЭФ корзины---
cy.contains("Единое заявление");
cy.getEl("button-goForward").click();
//---ЭФ печать---
cy.contains("Электронный");
});
The problem occurs after we get to the line
cy.contains("Запуск процесса").should("not.exist");
Here we are waiting for the preloader to load, after which we get to a new URL and a form opens with the inputs, which we fill out next.
But after the above line is processed, we are simply thrown into the Specs folder in the Cypress interface.
I have no idea how to fix this, maybe someone has encountered this problem, I ask for help.
Beta Was this translation helpful? Give feedback.
All reactions