-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add a cypress test for testing project basic operations: create, edit, delete #3881
Add a cypress test for testing project basic operations: create, edit, delete #3881
Conversation
You can access the deployment of this PR at https://ci-renku-3881.dev.renku.ch |
cy.getDataCy("project-visibility-public").click(); | ||
cy.getDataCy("project-description-input").type(projectDescription); | ||
cy.getDataCy("new-project-modal").contains( | ||
`The URL for this project will be renkulab.io/v2/projects/${username}/${projectPath}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my, oh my, oh my, this is actually hard-coded 🙈 Ouch! 🤕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove or comment this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am checking to ensure we are showing the correct expected URL.
What would be a reasonable alternative here? Perhaps just /${username}/${projectPath}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe test that for now and have a comment. Also, that URL WILL be different at the end of this build cycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, true. I made this more resilient to the URL changes and, following your other suggestion on dropping the matcher for new-project-modal
, I now match the URL element more precisely 2061f52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! 👏
Some comments below.
@leafty thank you for the review! |
const username = user.username; | ||
cy.getDataCy("navbar-new-entity").click(); | ||
cy.getDataCy("navbar-project-new").click(); | ||
cy.getDataCy("new-project-modal").should("exist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the data-cy
conversation, I think we should instead check against the presence of a new project form and not a modal. The fact that the form is presented inside a modal is not important and could change (a page, an off canvas, etc.) but there should always be a data-cy=new-project-form
element presented to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this makes sense! I dropped the use of new-project-modal
and match the form instead 2061f52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent 👌
aa689e2
to
cbe29dc
Compare
2061f52
to
ac463a6
Compare
See title
/deploy renku-ui=lorenzo/cypress-renku-2.0-data-cy
fix #3880