Skip to content

Commit

Permalink
test: [DI-20585] - Add ACLP Cypress Test Coverage for Linode Dashboar…
Browse files Browse the repository at this point in the history
…d Widgets (#10891)

* upcoming:[DI-20585]- added aclp e2e test cases

* upcoming:[DI-20585]- added aclp e2e test cases

* upcoming:[DI-20585]- added missing message constants file

* upcoming:[DI-20585]- added cloudpulse tsx file under ui/util files

* upcoming:[DI-20585]- added findByPlaceholderCustom for selectServiceName

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming: [DI-20585] - Fix validation for feature flag test case

* upcoming: [DI-20585] - Enable services call through mock

* upcoming: [DI-20585] - Flow update for widget tests

* upcoming:[DI-20585]- Added code review comments and fixing few mocking issues

* upcoming:[DI-20585]- Added code review comments and fixing few mocking issues

* upcoming:[DI-20585]- Added code review comments and fixing few mocking issues

* upcoming:[DI-20585]- Added code factories to mock the data

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- renaming intercept methods to mocks

* upcoming:[DI-20585]- renaming intercept methods to mocks

* upcoming:[DI-20585]- renaming intercept methods to mocks

* upcoming:[DI-20585]- renaming intercept methods to mocks

* upcoming:[DI-20585]- fixing zoom-in/out canvas issue

* upcoming:[DI-20585]- fixing code review coments

* upcoming:[DI-20585]- fixing code review coments

* upcoming:[DI-20585]- Added code review comments and  adding placeholder values in CloudPulseCustomSelect.tsx

* DI-20360: Added change set

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- fixing  conflict

* upcoming:[DI-20585]- fixing place holder values

* tests: [DI-20585] - Use Icon button with aria label for svg icons and remove ui.cloudpulse

* upcoming:[DI-20585]- Added code review comments

* tests: [DI-20585] - Factories implementation instead of functions

* upcoming: [DI-20800] - cypress changes

* tests: [DI-20585] - Enabling auto highlight for selections

* tests: [DI-20585] - Revert not needed changes

* tests: [DI-20585] - Selection update for custom select component

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review commennts

* tests: [DI-20585] - PR comments for aria label

* upcoming:[DI-20585]- Added code review commennts

* upcoming:[DI-20585]- Added code review commennts

* tests: [DI-20585] - Code clean ups and refactoring

* upcoming:[DI-20585]- Added code review commennts

* tests: [DI-20585] - CamelCase for variables

* tests: [DI-20585] - Title validations

* upcoming:[DI-20585]- Added code review commennts

* upcoming:[DI-20585]- Added code review commennts

* tests: [DI-20585] - Code clean up and refactoring work

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* tests: [DI-20585] - Removed widget header title

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* yarn file reverting

* Syncing file processesLanding.tsx with develop

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

* upcoming:[DI-20585]- Added code review comments

---------

Co-authored-by: vmangalr <vmangalr@akamai.com>
Co-authored-by: venkatmano-akamai <chk-Venkatesh@outlook.com>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent 048d4df commit f49d104
Show file tree
Hide file tree
Showing 21 changed files with 1,353 additions and 13 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10891-tests-1726565438335.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Add cypress e2e test cases for cloudpulse ([#10891](https://github.com/linode/manager/pull/10891))
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* @file Integration tests for CloudPulse navigation.
*/

import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
import { mockGetAccount } from 'support/intercepts/account';
import { accountFactory } from 'src/factories';
import { ui } from 'support/ui';

const mockAccount = accountFactory.build();

describe('CloudPulse navigation', () => {
beforeEach(() => {
mockGetAccount(mockAccount).as('getAccount');
});

/*
* - Confirms that Cloudpulse navigation item is shown when feature flag is enabled.
* - Confirms that clicking Cloudpulse navigation item directs user to Cloudpulse landing page.
*/
it('can navigate to Cloudpulse landing page', () => {
mockAppendFeatureFlags({
aclp: {
beta: true,
enabled: true,
},
}).as('getFeatureFlags');

cy.visitWithLogin('/linodes');
cy.wait('@getFeatureFlags');

ui.nav.findItemByTitle('Monitor').should('be.visible').click();
cy.url().should('endWith', '/cloudpulse');
});

/*
* - Confirms that Cloudpulse navigation item is not shown when feature flag is disabled.
*/
it('does not show Cloudpulse navigation item when feature is disabled', () => {
mockAppendFeatureFlags({
aclp: {
beta: true,
enabled: false,
},
}).as('getFeatureFlags');

cy.visitWithLogin('/linodes');
cy.wait('@getFeatureFlags');

ui.nav.find().within(() => {
cy.findByText('Monitor').should('not.exist');
});
});

/*
* - Confirms that manual navigation to Cloudpulse landing page with feature is disabled displays Not Found to user.
*/
it('displays Not Found when manually navigating to /cloudpulse with feature flag disabled', () => {
mockAppendFeatureFlags({
aclp: {
beta: true,
enabled: false,
},
}).as('getFeatureFlags');

cy.visitWithLogin('monitor/cloudpulse');
cy.wait('@getFeatureFlags');

cy.findByText('Not Found').should('be.visible');
});
});
Loading

0 comments on commit f49d104

Please sign in to comment.