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

fix: update URL syntax in cypress.config.ts #249

Merged

Conversation

farhin23
Copy link
Contributor

What this PR changes/adds

  • The consumer and provider URLs in cypress.config.ts file have been updated with right syntax.

  • In spec.cy.js file, the test - cy.get('[href="/my-assets"]').as('assets-menu-item').click();
    has been replaced with, cy.get('[href="/my-assets"]').first().as('assets-menu-item').click();

Why it does that

  • In spec.cy.js file the cypress tests aims to visit two URLs - consumerUrl and providerUrl. These two URLs are configured in cypress.config.ts file as consumerUrl: 'http//localhost:18080', and providerUrl: 'http//localhost:28080', which do not follow the generic URL syntax and ends up showing unexpected behavior. Therefore, these two URLs has been updated with right syntax.

  • In the introduction page of the DataDashboard there are two links with the tag href="/my-assets". The test cy.get('[href="/my-assets"]').as('assets-menu-item').click(); can not get executed successfully as cypress finds multiple elements of such kind.
    In this PR, cy.get('[href="/my-assets"]') has been chained with the first() command so it gets the first element of such type within the set of elements.

Linked Issue(s)

Closes #248

@farhin23 farhin23 added the bug Something isn't working label May 21, 2024
@farhin23 farhin23 changed the title fix: update URL syntax in cypress.config.ts bug: update URL syntax in cypress.config.ts May 21, 2024
@farhin23 farhin23 changed the title bug: update URL syntax in cypress.config.ts fix: update URL syntax in cypress.config.ts May 21, 2024
@ndr-brt ndr-brt self-requested a review May 21, 2024 12:06
Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ndr-brt ndr-brt merged commit 2df4187 into eclipse-edc:main May 21, 2024
6 of 10 checks passed
@farhin23 farhin23 deleted the fix/cypress_visit_url_syntax branch May 23, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress tests do not visit intended URL because of wrong URL syntax
2 participants