Skip to content

test(e2e): Fix disable cira issue in cypress test - #3646

Open
punam20 wants to merge 2 commits into
mainfrom
fix_disable_cira_issue
Open

punam20 wants to merge 2 commits into
mainfrom
fix_disable_cira_issue

Conversation

@punam20

@punam20 punam20 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Anything the reviewer should know when reviewing this PR?

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

@punam20
punam20 force-pushed the fix_disable_cira_issue branch 6 times, most recently from 6ce44f5 to 307d2da Compare October 16, 2026 04:22
@punam20
punam20 requested a balanced review from Copilot October 16, 2026 04:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Missing synchronization can cause profile-test failures and silently bypass the CIRA emptiness assertion.

3 open findings
What changed in this PR

Updates Cypress tests to accommodate Console deployments with CIRA disabled.

Changes:

  • Exposes DISABLE_CIRA to browser-side tests.
  • Skips CIRA-dependent profile cases and removes unconditional config waits.
  • Makes the CIRA empty-server check conditional on navigation visibility.
File Description
cypress/​support/​public-config.ts Exposes the CIRA disable flag.
cypress/​e2e/​integration/​profile/​delete.spec.ts Filters CIRA profile deletions.
cypress/​e2e/​integration/​profile/​create.spec.ts Filters CIRA profile creation cases.
cypress/​e2e/​integration/​profile/​create-error.spec.ts Skips the CIRA-dependent invalid-name test.
cypress/​e2e/​integration/​login/​ensureEmpty.spec.ts Conditionally checks for CIRA configs.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +24 to +31
cy.get('body').then(($body) => {
// Nav item is hidden entirely when the server reports CIRA disabled
// (APP_DISABLE_CIRA) - nothing to check against in that mode.
if ($body.find('a:contains("CIRA Configs")').length > 0) {
cy.goToPage('CIRA Configs')
cy.contains('No CIRA Configs').should('be.visible')
}
})
@@ -47,12 +49,13 @@ describe('Test Profile Page', () => {
cy.wait('@get-profiles5')

cy.get('button').contains('Add New').click()
@@ -50,27 +52,32 @@ describe('Test Profile Page', () => {
}).as('get-profiles2')

cy.get('button').contains('Add New').click()
@punam20
punam20 requested a review from lim-chris October 27, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants