Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-12736-tests-1755708307206.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Fix for flakey test in alerts-listing-page.spec.ts ([#12736](https://github.com/linode/manager/pull/12736))
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,27 @@
});

it('should validate UI elements and alert details', () => {
// Validate navigation links and buttons
cy.findByText('Alerts').should('be.visible');
// filter to main content area to avoid confusion w/ 'Alerts' nav link in left sidebar
cy.get('main').within(() => {
// Validate breadcrumb and buttons
cy.findByText('Alerts', { exact: false }).should('be.visible');

cy.findByText('Definitions')
.should('be.visible')
.and('have.attr', 'href', alertDefinitionsUrl);
ui.buttonGroup.findButtonByTitle('Create Alert').should('be.visible');
cy.findByText('Definitions')
.should('be.visible')
.and('have.attr', 'href', alertDefinitionsUrl);
ui.buttonGroup.findButtonByTitle('Create Alert').should('be.visible');

Check warning on line 271 in packages/manager/cypress/e2e/core/cloudpulse/alerts-listing-page.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint Review (manager)

[eslint] reported by reviewdog 🐢 Define a constant instead of duplicating this literal 7 times. Raw Output: {"ruleId":"sonarjs/no-duplicate-string","severity":1,"message":"Define a constant instead of duplicating this literal 7 times.","line":271,"column":40,"nodeType":"Literal","endLine":271,"endColumn":54}

// Validate table headers
cy.get('[data-qa="alert-table"]').within(() => {
expectedHeaders.forEach((header) => {
cy.findByText(header).should('have.text', header);
// Validate table headers
cy.get('[data-qa="alert-table"]').within(() => {
expectedHeaders.forEach((header) => {

Check warning on line 275 in packages/manager/cypress/e2e/core/cloudpulse/alerts-listing-page.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint Review (manager)

[eslint] reported by reviewdog 🐢 Refactor this code to not nest functions more than 4 levels deep. Raw Output: {"ruleId":"sonarjs/no-nested-functions","severity":1,"message":"Refactor this code to not nest functions more than 4 levels deep.","line":275,"column":42,"nodeType":null,"endLine":275,"endColumn":44}
cy.findByText(header).should('have.text', header);
});
});
});

// Validate alert details
mockAlerts.forEach((alert) => {
validateAlertDetails(alert);
// Validate alert details
mockAlerts.forEach((alert) => {
validateAlertDetails(alert);
});
});
});

Expand Down