Skip to content

test: [M3-9595] - Firewall create page for restricted users #12237

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dmcintyr-akamai
Copy link
Contributor

Description 📝

Add test for firewall create page for restricted users on packages/manager/cypress/e2e/core/firewalls/create-firewall.spec.ts.

Changes 🔄

Verify that 'Create Firewall' button is disabled on landing page (/firewalls) and drawer (/firewalls/create). Inputs within drawer should all be disabled as well.

How to test 🧪

pnpm run cy:run -s cypress/e2e/core/firewalls/create-firewall.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


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@dmcintyr-akamai dmcintyr-akamai marked this pull request as ready for review May 16, 2025 13:45
@dmcintyr-akamai dmcintyr-akamai requested review from a team as code owners May 16, 2025 13:45
@dmcintyr-akamai dmcintyr-akamai requested review from jdamore-linode, hana-akamai and coliu-akamai and removed request for a team May 16, 2025 13:45
@bnussman-akamai bnussman-akamai changed the title test [M3-9595]: test for firewall create page for restricted users test: [M3-9595] - Firewall create page for restricted users May 16, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 595 passing tests on test run #2 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing595 Passing4 Skipped111m 10s

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

thanks @dmcintyr-akamai! approving pending Linode Interfaces banner issue is addressed

Comment on lines +184 to +187
ui.buttonGroup
.findButtonByTitle('Create Firewall')
.should('be.visible')
.should('be.disabled');
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm seeing that when Linode interfaces is enabled, the button group may be hidden depending on screensize, making the test fail:

image

We could either

  • add scrollIntoView() - ui.buttonGroup.findButtonByTitle('Create Firewall').scrollIntoView()
  • mock the Linode interfaces feature flag to be false (to hide the info banner)

/*
* - Verifies that restricted user cannot create firewall on landing page
*/
it('create firewall is disabled on landing page', () => {
Copy link
Contributor

@coliu-akamai coliu-akamai May 16, 2025

Choose a reason for hiding this comment

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

Suggested change
it('create firewall is disabled on landing page', () => {
it('confirms the create button is disabled on the FirewallLanding page', () => {

/*
* - Verifies that restricted user cannot create firewall in drawer
*/
it('create firewall drawer is disabled', () => {
Copy link
Contributor

@coliu-akamai coliu-akamai May 16, 2025

Choose a reason for hiding this comment

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

Suggested change
it('create firewall drawer is disabled', () => {
it('confirms the Create Firewall drawer is disabled', () => {

@coliu-akamai coliu-akamai added the Add'tl Approval Needed Waiting on another approval! label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add'tl Approval Needed Waiting on another approval!
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

3 participants