-
Notifications
You must be signed in to change notification settings - Fork 389
test [M3-9597]: Cypress test for Longview create page for restricted users #12230
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
Merged
dmcintyr-akamai
merged 5 commits into
linode:develop
from
dmcintyr-akamai:M3-9597_longview_restricted
May 20, 2025
Merged
test [M3-9597]: Cypress test for Longview create page for restricted users #12230
dmcintyr-akamai
merged 5 commits into
linode:develop
from
dmcintyr-akamai:M3-9597_longview_restricted
May 20, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dwiley-akamai
approved these changes
May 16, 2025
Contributor
dwiley-akamai
left a comment
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 got timeouts when I tried running it locally, but it passes in CI ✅
packages/manager/cypress/e2e/core/longview/longview-plan.spec.ts
Outdated
Show resolved
Hide resolved
…stricted' of github.com:dmcintyr-akamai/manager into M3-9597_longview_restricted
Collaborator
Cloud Manager UI test results🔺 3 failing tests on test run #4 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/kubernetes/lke-create.spec.ts,cypress/e2e/core/linodes/clone-linode.spec.ts" |
|||||||||||||||||||||||
jdamore-linode
approved these changes
May 19, 2025
Contributor
jdamore-linode
left a comment
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 @dmcintyr-akamai!
This was referenced May 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description 📝
Add test for Longview create page for restricted users. There is already a test for a user w/ restricted permissions in packages/manager/cypress/e2e/core/account/restricted-user-details-pages.spec.ts but the user in this test has "read only" permissions and isn't fully restricted. In restricted-user-details-pages.spec.ts, the user is able to view Longview plans but not create them. In this test that i added, the user cannot create or view any plans.
Changes 🔄
Add test for user that is restricted and has add_longview and longview_subscription set to false. Verify that user cannot see the "Add Client" button or the table that would display the plan data.
Also had to mock result from longview/plan to return a 403 error to simulate api response for restricted user.
How to test 🧪
pnpm run cy:run -s cypress/e2e/core/longview/longview-plan.spec.ts
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅
Commit message and pull request title format standards
<commit type>: [JIRA-ticket-number] - <description>Commit Types:
feat: New feature for the user (not a part of the code, or ci, ...).fix: Bugfix for the user (not a fix to build something, ...).change: Modifying an existing visual UI instance. Such as a component or a feature.refactor: Restructuring existing code without changing its external behavior or visual UI. Typically to improve readability, maintainability, and performance.test: New tests or changes to existing tests. Does not change the production code.upcoming: A new feature that is in progress, not visible to users yet, and usually behind a feature flag.Example:
feat: [M3-1234] - Allow user to view their login history