Skip to content
Open
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
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/99.coo_rbac_perses_user1.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('RBAC User1: COO - Dashboards (Perses) - Administrator perspective', {
});

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
});

Expand Down
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/99.coo_rbac_perses_user2.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('RBAC User2: COO - Dashboards (Perses) - Administrator perspective', {
});

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why we need to click on legacy dashboards to test perses. Is it some reset step missing?

nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.changeNamespace('All Projects');
});
Expand Down
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/99.coo_rbac_perses_user3.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('RBAC User3: COO - Dashboards (Perses) - Administrator perspective', {
});

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
});

Expand Down
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/99.coo_rbac_perses_user4.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('RBAC User4: COO - Dashboards (Perses) - Administrator perspective', {
});

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
});

Expand Down
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/99.coo_rbac_perses_user5.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('RBAC User5: COO - Dashboards (Perses) - Administrator perspective', {
});

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
});

Expand Down
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/99.coo_rbac_perses_user6.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('RBAC User6: COO - Dashboards (Perses) - Administrator perspective', {
});

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@
"schemaVersion": 30,
"style": "dark",
"tags": [
"ACM",
"KubeVirt",
"OpenShift",
"Virtualization"
"acm",
"kubevirt",
"openshift",
"virtualization"
],
"templating": {
"list": [
Expand Down
11 changes: 6 additions & 5 deletions web/cypress/fixtures/perses/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ export const persesDashboardsAddPanelAddQueryType ={
}

export const persesCreateDashboard = {
DIALOG_MAX_LENGTH_VALIDATION: 'Danger alert:bad request: code=400, message=cannot contain more than 75 characters, internal=cannot contain more than 75 characters',
DIALOG_MAX_LENGTH_VALIDATION: 'Must be 75 or fewer characters long: error status;',
DIALOG_DUPLICATED_NAME_PF_VALIDATION_PREFIX: 'Dashboard name ',
DIALOG_DUPLICATED_NAME_PF_VALIDATION_SUFFIX: ' already exists in this project: error status;',
DIALOG_DUPLICATED_NAME_BKD_VALIDATION: 'Danger alert:document already exists',
DIALOG_DUPLICATED_NAME_PF_VALIDATION_SUFFIX: ' already exists in ',
DIALOG_DUPLICATED_NAME_PF_VALIDATION_SUFFIX_PROJECT: ' project!: error status;',
DIALOG_DUPLICATED_NAME_BKD_VALIDATION: 'Danger alert:Could not create dashboard. e: document already exists',
}

export const persesDashboardsEmptyDashboard = {
Expand Down Expand Up @@ -170,6 +171,6 @@ export const persesDashboardsImportDashboard = {
DIALOG_UNABLE_TO_DETECT_DASHBOARD_FORMAT: 'Unable to detect dashboard format. Please provide a valid Perses or Grafana dashboard.',
DIALOG_GRAFANA_DASHBOARD_DETECTED: 'Grafana dashboard detected. It will be automatically migrated to Perses format. Note: migration may be partial as not all Grafana features are supported.',
DIALOG_PERSES_DASHBOARD_DETECTED: 'Perses dashboard detected.',
DIALOG_FAILED_TO_MIGRATE_GRAFANA_DASHBOARD: 'Danger alert:Failed to migrate dashboard: internal server error',
DIALOG_DUPLICATED_DASHBOARD_ERROR: 'Danger alert:document already exists',
DIALOG_FAILED_TO_MIGRATE_GRAFANA_DASHBOARD: 'Danger alert:Error migrating dashboard: Failed to migrate dashboard: internal server error',
DIALOG_DUPLICATED_DASHBOARD_ERROR: 'Danger alert:Error importing dashboard: document already exists',
}
2 changes: 1 addition & 1 deletion web/cypress/support/perses/00.coo_bvt_perses_admin_1.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function testBVTCOOPerses1(perspective: PerspectiveConfig) {

cy.log(`5.5. Click on the Kebab icon - Delete`);
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);s
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the testing files being excluded from typescript and lint checks? This should have been caught by the ts compiler.

listPersesDashboardsPage.filter.byName(persesDashboardsDashboardDropdownPersesDev.PERSES_DASHBOARD_SAMPLE[0] + ' - Renamed');
listPersesDashboardsPage.countDashboards('1');

Expand Down
14 changes: 6 additions & 8 deletions web/cypress/support/perses/99.coo_rbac_perses_user1.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ export function testCOORBACPersesTestsDevUser1(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.createDashboardDialogCancelButton();

cy.log(`4.4 change namespace to openshift-cluster-observability-operator`);
Expand Down Expand Up @@ -436,12 +436,12 @@ export function testCOORBACPersesTestsDevUser1(perspective: PerspectiveConfig) {
listPersesDashboardsPage.clickDuplicateOption();

cy.log(`8.5. Assert project dropdown options`);
listPersesDashboardsPage.assertDuplicateProjectDropdownExists('openshift-cluster-observability-operator');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('observ-test');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('perses-dev');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('empty-namespace3');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('empty-namespace4');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('openshift-monitoring');
listPersesDashboardsPage.assertDuplicateProjectDropdownExists('openshift-cluster-observability-operator');

cy.log(`8.6. Enter new dashboard name`);
listPersesDashboardsPage.duplicateDashboardEnterName(dashboardName);
Expand All @@ -459,7 +459,6 @@ export function testCOORBACPersesTestsDevUser1(perspective: PerspectiveConfig) {
listPersesDashboardsPage.clickKebabIcon();
listPersesDashboardsPage.clickDeleteOption();
listPersesDashboardsPage.deleteDashboardDeleteButton();
persesDashboardsPage.closeSuccessAlert();
listPersesDashboardsPage.emptyState();
listPersesDashboardsPage.countDashboards('0');
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
Expand All @@ -477,21 +476,20 @@ export function testCOORBACPersesTestsDevUser1(perspective: PerspectiveConfig) {
cy.log(`9.1. use sidebar nav to go to Observe > Dashboards (Perses)`);
listPersesDashboardsPage.shouldBeLoaded();

cy.log(`9.3. Filter by Name`);
cy.log(`9.2. Filter by Name`);
listPersesDashboardsPage.filter.byName('Testing Dashboard - UP');
listPersesDashboardsPage.countDashboards('1');

cy.log(`9.4. Click on the Kebab icon - Delete`);
cy.log(`9.3. Click on the Kebab icon - Delete`);
listPersesDashboardsPage.clickKebabIcon();
listPersesDashboardsPage.clickDeleteOption();
listPersesDashboardsPage.deleteDashboardDeleteButton();
persesDashboardsPage.closeSuccessAlert();
listPersesDashboardsPage.emptyState();
listPersesDashboardsPage.countDashboards('0');
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);

cy.log(`9.5. Filter by Name`);
cy.log(`9.4. Filter by Name`);
listPersesDashboardsPage.filter.byName('Testing Dashboard - UP');
listPersesDashboardsPage.countDashboards('0');
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
Expand All @@ -514,12 +512,12 @@ export function testCOORBACPersesTestsDevUser1(perspective: PerspectiveConfig) {
persesImportDashboardsPage.assertPersesDashboardDetected();

cy.log(`10.4. Verify project dropdown options`);
persesImportDashboardsPage.assertProjectDropdown('openshift-cluster-observability-operator');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace3');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesImportDashboardsPage.assertProjectDropdown('openshift-cluster-observability-operator');
persesImportDashboardsPage.clickCancelButton();

cy.log(`10.5 change namespace to openshift-cluster-observability-operator`);
Expand Down
13 changes: 7 additions & 6 deletions web/cypress/support/perses/99.coo_rbac_perses_user3.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export function testCOORBACPersesTestsDevUser3(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.createDashboardDialogCancelButton();

cy.log(`1.3. empty-namespace3 validation - Dashboard search - empty state`);
Expand All @@ -62,12 +62,13 @@ export function testCOORBACPersesTestsDevUser3(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');

persesCreateDashboardsPage.createDashboardDialogCancelButton();

cy.log(`1.4. openshift-monitoring validation - Dashboard search - empty state`);
Expand All @@ -76,12 +77,12 @@ export function testCOORBACPersesTestsDevUser3(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.createDashboardDialogCancelButton();

});
Expand All @@ -101,11 +102,11 @@ export function testCOORBACPersesTestsDevUser3(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('empty-namespace3');
persesCreateDashboardsPage.createDashboardDialogCancelButton();

cy.log(`2.4 change namespace to openshift-monitoring`);
Expand Down Expand Up @@ -317,12 +318,12 @@ export function testCOORBACPersesTestsDevUser3(perspective: PerspectiveConfig) {
listPersesDashboardsPage.clickDuplicateOption();

cy.log(`6.5. Assert project dropdown options`);
listPersesDashboardsPage.assertDuplicateProjectDropdownExists('empty-namespace3');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('openshift-cluster-observability-operator');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('openshift-monitoring');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('observ-test');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('perses-dev');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('empty-namespace4');
listPersesDashboardsPage.assertDuplicateProjectDropdownExists('empty-namespace3');

cy.log(`6.6. Enter new dashboard name`);
listPersesDashboardsPage.duplicateDashboardEnterName(duplicatedDashboardName);
Expand Down Expand Up @@ -393,12 +394,12 @@ export function testCOORBACPersesTestsDevUser3(perspective: PerspectiveConfig) {
persesImportDashboardsPage.assertPersesDashboardDetected();

cy.log(`8.4. Verify project dropdown options`);
persesImportDashboardsPage.assertProjectDropdown('empty-namespace3');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('openshift-monitoring');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesImportDashboardsPage.assertProjectDropdown('empty-namespace3');
persesImportDashboardsPage.clickCancelButton();

cy.log(`8.5 change namespace to openshift-monitoring`);
Expand Down
8 changes: 4 additions & 4 deletions web/cypress/support/perses/99.coo_rbac_perses_user5.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export function testCOORBACPersesTestsDevUser5(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('openshift-monitoring');
persesCreateDashboardsPage.createDashboardDialogCancelButton();

cy.log(`1.3. openshift-monitoring validation - Dashboard search - empty state`);
Expand All @@ -60,12 +60,12 @@ export function testCOORBACPersesTestsDevUser5(perspective: PerspectiveConfig) {
listPersesDashboardsPage.assertCreateButtonIsEnabled();
listPersesDashboardsPage.clickCreateButton();
persesCreateDashboardsPage.createDashboardShouldBeLoaded();
persesCreateDashboardsPage.assertProjectDropdown('openshift-monitoring');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace3');
persesCreateDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesCreateDashboardsPage.assertProjectDropdown('openshift-monitoring');
persesCreateDashboardsPage.createDashboardDialogCancelButton();

});
Expand Down Expand Up @@ -267,12 +267,12 @@ export function testCOORBACPersesTestsDevUser5(perspective: PerspectiveConfig) {
listPersesDashboardsPage.clickDuplicateOption();

cy.log(`5.5. Assert project dropdown options`);
listPersesDashboardsPage.assertDuplicateProjectDropdownExists('openshift-monitoring');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('openshift-cluster-observability-operator');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('empty-namespace3');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('observ-test');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('perses-dev');
listPersesDashboardsPage.assertDuplicateProjectDropdownNotExists('empty-namespace4');
listPersesDashboardsPage.assertDuplicateProjectDropdownExists('openshift-monitoring');

cy.log(`5.6. Enter new dashboard name`);
listPersesDashboardsPage.duplicateDashboardEnterName(duplicatedDashboardName);
Expand Down Expand Up @@ -342,12 +342,12 @@ export function testCOORBACPersesTestsDevUser5(perspective: PerspectiveConfig) {
persesImportDashboardsPage.assertPersesDashboardDetected();

cy.log(`7.4. Verify project dropdown options`);
persesImportDashboardsPage.assertProjectDropdown('openshift-monitoring');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('openshift-cluster-observability-operator');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace3');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('observ-test');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('perses-dev');
persesImportDashboardsPage.assertProjectNotExistsInDropdown('empty-namespace4');
persesImportDashboardsPage.assertProjectDropdown('openshift-monitoring');
persesImportDashboardsPage.clickCancelButton();

cy.log(`7.5. Change namespace to All Projects`);
Expand Down
Loading