Skip to content

Commit

Permalink
preetier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-qa007 committed Feb 17, 2025
1 parent 7fde87e commit 0701248
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ describe("Slug URLs", { tags: ["@tag.AppUrl"] }, () => {
it("4. Checks redirect url", () => {
cy.url().then((url) => {
const redirectUrl = `${url}?embed=true&a=b`;
cy.stub(agHelper, 'VisitNAssert').as('visitStub');
cy.stub(agHelper, "VisitNAssert").as("visitStub");

// Call your function that handles redirection
agHelper.VisitNAssert(redirectUrl);

// Assert that the stubbed function was called with the correct redirectUrl
cy.get('@visitStub').should('have.been.calledWith', redirectUrl);
cy.get("@visitStub").should("have.been.calledWith", redirectUrl);
cy.wrap(redirectUrl).then((redirectUrl) => {
const encodedRedirectUrl = `?redirectUrl=${encodeURIComponent(redirectUrl)}`;
cy.log(encodedRedirectUrl);
Expand Down

0 comments on commit 0701248

Please sign in to comment.