-
Notifications
You must be signed in to change notification settings - Fork 17
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
Revise actions test #586
Revise actions test #586
Conversation
9c88326
to
0502525
Compare
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
0502525
to
0f5ad81
Compare
Regarding commit messages, not sure if there are any guidelines - but I fixed the commit message so it is a bit clearer. @hnformentin |
seed.plant().then(() => { | ||
const user = faker.random.arrayElement(seed.participants).user | ||
cy.visitEvaluation(seed.evaluationId, user) | ||
function checkActionsPresentOnProgression() { |
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.
It seems that Present
would be more specific if substituted by Exist
or AreVisible
, depending on what you decide for the comment below.
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 think either is fine. Exist, Present, are visible are all generally understood and the same thing in this context
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 thought there was a difference: exist meaning that the element exists in the DOM (even if not rendered), be.visible if the element is rendered. I did not find more than https://filiphric.com/cypress-basics-check-if-element-exists to explain, so fine until I find out 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.
From a user perspective they are the same. Is the action visible to the user, then it is also visible and exists (also in the dom). The e2e tests should always be written from a users perspective.
This comment has been minimized.
This comment has been minimized.
@hnformentin to your comment above, I organized the tests in different contexts: |
6b945e0
to
bf1917f
Compare
I like the newest organization better too :) |
|
bf1917f
to
347a6bb
Compare
All my comments have been addressed and the overall structure change seems good to me. The failing tests should be fixed before merge. |
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.
Make sure failing tests run before merging
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
@@ -174,16 +155,15 @@ describe('Actions', () => { | |||
} | |||
}) | |||
|
|||
cy.login(seed.participants[0].user) | |||
deleteAction() | |||
deleteAction(actionToDelete) |
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.
The current error is around here:
https://dashboard.cypress.io/projects/ry3x7y/runs/107/overview/b66bfcf0-1a29-43ae-af9e-938fdb19a09f/video
From the error message, the participant is not allowed to perform this operation...
https://dashboard.cypress.io/projects/ry3x7y/runs/107/overview/b66bfcf0-1a29-43ae-af9e-938fdb19a09f/screenshots
f82b74e
to
c65d2c5
Compare
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
a0c97f1
to
e5d8b47
Compare
d32f12c
to
aa8183f
Compare
Initial state in database is set in beforeEach for each test.
The the test data used in the test is retrieved or created in the test itself.