Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect redirect and crush test #28673

Open
buddazbs opened this issue Jan 10, 2024 · 3 comments
Open

Incorrect redirect and crush test #28673

buddazbs opened this issue Jan 10, 2024 · 3 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period

Comments

@buddazbs
Copy link

buddazbs commented Jan 10, 2024

Current behavior

Hi!
We work with payment systems such as Neteller, PayPal and many others, and check the integration with them.

Neteller. In the request to the PS, we give the links to redirect back to us. As you can see, this API, when accessed, is redirected to a regular successful link. But for some reason, if when launching autotests, there is a redirection to the path /__/, which is opened in the browser itself, and not in the test frame.

links:
  completed:
    web: "https://xxxxxxx/neteller/success/web"
    mobile_web: "https://xxxxxxx/neteller/success/mobile_web"
    mobile_ios: "https://xxxxxxx/neteller/success/mobile_ios"
    mobile_android: "https://xxxxxxx/neteller/success/mobile_android"
  failed:
    web: "https://xxxxxxx/neteller/fail/web"
    mobile_web: "https://xxxxxxx/neteller/fail/mobile_web"
    mobile_ios: "https://xxxxxxx/neteller/fail/mobile_ios"
    mobile_android: "https://xxxxxxx/neteller/fail/mobile_android"
  default:
    web: "https://xxxxxxx/neteller/fail/web"
    mobile_web: "https://xxxxxxx/neteller/fail/mobile_web"
    mobile_ios: "https://xxxxxxx/neteller/fail/mobile_ios"
    mobile_android: "https://xxxxxxx/neteller/fail/mobile_android"
41103
2024-01-10.1.13.45.PM.mov

PayPal. The problem is similar. The link does not open in the built-in test browser, but in the browser itself.
Or it just freezes like in the video and that's it, after that you can't open other tests or run them again. And only restarting Cypress helps to just open other tests.

Desired behavior

No response

Test code to reproduce

The code itself, but I can't provide test accesses for security reasons.

const cyUrlAuthDeposit = Cypress.env("cyUrlAuthDeposit");
const cyUrlDeposit = Cypress.env("cyUrlDeposit");
const person = Cypress.env("person");

const captionMain = "Deposits and withdrawals";
const payNetellerUrl = "https://pay.neteller.com/";

describe("Collection of positive cases for Neteller", () => {
  before("Log in", () => {
    cy.visit(cyUrlAuthDeposit);
    cy.get('input[type="text"]').type(person.login);
    cy.get('input[type="password"]').type(person.password);
    cy.get(".btn--4aZKBB").click();
    cy.url().should("eq", cyUrlDeposit);
    cy.contains(captionMain).scrollIntoView().should("be.visible");
  });
  //Positive Case: Case 1: make valid deposit for Neteller
  it("Case 1: make valid deposit for Neteller", () => {
    cy.wait(4000).get('[title="NETELLER"]').click();
    cy.get(".feeAndLimits--7daIg4")
      .getMinimalLimit()
      .then((minimalLimit) => {
        cy.get(
          ":nth-child(1) > .InputZone__Box--3ZZT7f > .Input__fieldBox--7K9hX4",
        )
          .click()
          .type(minimalLimit);
      });
    cy.get(".button__content--74SDm6").click();

    cy.wait(2000).url().should("include", `${payNetellerUrl}`);
    cy.wait(6000).get("#onetrust-accept-btn-handler").click();
    cy.get('[data-cy="email-field"]').then((input) => {
      if (input.is(":enabled")) {
        cy.get('[data-cy="email-field"]').type(person.netellerLogin);
      }
    });
    cy.get('[data-cy="password-field"]').type(person.netellerPassword);
    cy.get(".ps-button-wrapper > .ng-star-inserted").click();
    cy.wait(1000).get(".pay-with-balance-button__pay").click();
    cy.wait(1000).get(".payment-confirmation-dialog__button").click();
    cy.wait(1000).get(".return-button").click();
  });
  //Positive Case: Valid transaction
  it("Case 2: Checking valid deposit in BackOffice", () => {
    cy.loginBO().then((fsidResult) => {
      const requestId = null;
      return cy
        .wait(2000)
        .getTable(fsidResult, person.loginBO, person.scopeId, requestId)
        .then((responseGetTable) => {
          const type = responseGetTable.response[0].type;
          const status = responseGetTable.response[0].status;
          const paySysId = responseGetTable.response[0].paySysId;

          expect(type).to.eql("deposit");
          expect(status).to.eql("SUCCESS");
          expect(paySysId).to.eql("cy_neteller");
        });
    });
  });
});

Cypress Version

13.6.2

Node version

18.15.0

Operating System

Sonoma 14.2.1 (23C71)

Debug Logs

No response

Other

No response

@buddazbs
Copy link
Author

@JJ @eventualbuddha @cbfrance @eagleflo
Hi !
Guys, can you tell me about the question?

@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label Feb 26, 2024
@buddazbs
Copy link
Author

buddazbs commented Apr 5, 2024

@JJ @eventualbuddha @cbfrance @eagleflo
HI !
Guys, please tell me, what is the approximate time to focus on viewing the task?

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

3 participants