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

test(dashboard): Add regression test for loading unneeded data #50179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jan 14, 2025

Summary

  • Fails before the PR of @st3iny
  • Succeeds afterwards ✔️

Checklist

Prevent a regression of #48403

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added 3. to review Waiting for reviews tests Related to tests labels Jan 14, 2025
@susnux susnux added this to the Nextcloud 31 milestone Jan 14, 2025
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

Very nice, thanks!

Does it indeed fail when reverting 0bb7be2.

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

If you say this works :)

})

it('Only load needed widgets', () => {
cy.intercept('**/dashboard/api/v2/widget-items?widgets%5B%5D=user_status').as('loadedWidgets')
Copy link
Member

Choose a reason for hiding this comment

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

how risky are we to API changes :P

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would also work with

Suggested change
cy.intercept('**/dashboard/api/v2/widget-items?widgets%5B%5D=user_status').as('loadedWidgets')
cy.intercept('**/dashboard/api/v2/widget-items').as('loadedWidgets')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews tests Related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants