Skip to content
Draft
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/00.coo_bvt_perses_admin.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe(

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

//TODO: rename after customizable-dashboards gets merged
Expand Down
1 change: 1 addition & 0 deletions web/cypress/e2e/perses/04.coo_import_perses_admin.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe(

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
cy.wait(2000);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.wait(5000);
cy.changeNamespace('All Projects');
Expand Down
3 changes: 3 additions & 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 @@ -32,6 +32,7 @@ describe(

// Step 2: Setup COO and Perses dashboards (requires admin privileges)
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
cy.cleanupPersesTestDashboardsBeforeTests();
cy.setupPersesRBACandExtraDashboards();

//TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user
Expand Down Expand Up @@ -68,7 +69,9 @@ describe(

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
cy.wait(2000);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.changeNamespace('All Projects');
});

after(() => {
Expand Down
2 changes: 2 additions & 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 @@ -32,6 +32,7 @@ describe(

// Step 2: Setup COO and Perses dashboards (requires admin privileges)
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
cy.cleanupPersesTestDashboardsBeforeTests();
cy.setupPersesRBACandExtraDashboards();

//TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user
Expand Down Expand Up @@ -68,6 +69,7 @@ describe(

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
cy.wait(2000);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.changeNamespace('All Projects');
});
Expand Down
3 changes: 3 additions & 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 @@ -32,6 +32,7 @@ describe(

// Step 2: Setup COO and Perses dashboards (requires admin privileges)
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
cy.cleanupPersesTestDashboardsBeforeTests();
cy.setupPersesRBACandExtraDashboards();

//TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user
Expand Down Expand Up @@ -68,7 +69,9 @@ describe(

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
cy.wait(2000);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.changeNamespace('All Projects');
});

after(() => {
Expand Down
3 changes: 3 additions & 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 @@ -32,6 +32,7 @@ describe(

// Step 2: Setup COO and Perses dashboards (requires admin privileges)
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
cy.cleanupPersesTestDashboardsBeforeTests();
cy.setupPersesRBACandExtraDashboards();

//TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user
Expand Down Expand Up @@ -68,7 +69,9 @@ describe(

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
cy.wait(2000);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.changeNamespace('All Projects');
});

after(() => {
Expand Down
3 changes: 3 additions & 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 @@ -32,6 +32,7 @@ describe(

// Step 2: Setup COO and Perses dashboards (requires admin privileges)
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
cy.cleanupPersesTestDashboardsBeforeTests();
cy.setupPersesRBACandExtraDashboards();

//TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user
Expand Down Expand Up @@ -68,7 +69,9 @@ describe(

beforeEach(() => {
nav.sidenav.clickNavLink(['Observe', 'Dashboards']);
cy.wait(2000);
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
cy.changeNamespace('All Projects');
});

after(() => {
Expand Down
2 changes: 2 additions & 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 @@ -32,6 +32,7 @@ describe(

// Step 2: Setup COO and Perses dashboards (requires admin privileges)
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
cy.cleanupPersesTestDashboardsBeforeTests();
cy.setupPersesRBACandExtraDashboards();

//TODO: https://issues.redhat.com/browse/OCPBUGS-58468 - when it gets fixed, installation can be don using non-admin user
Expand Down Expand Up @@ -68,6 +69,7 @@ describe(

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,31 +231,6 @@
}
]
}
},
"c03e17f849d341bcb1139c65e68dad1d": {
"kind": "Panel",
"spec": {
"display": {
"name": "status history"
},
"plugin": {
"kind": "StatusHistoryChart",
"spec": {}
},
"queries": [
{
"kind": "TimeSeriesQuery",
"spec": {
"plugin": {
"kind": "PrometheusTimeSeriesQuery",
"spec": {
"query": "vector(1)"
}
}
}
}
]
}
}
},
"layouts": [
Expand Down Expand Up @@ -317,16 +292,7 @@
{
"x": 0,
"y": 15,
"width": 12,
"height": 6,
"content": {
"$ref": "#/spec/panels/c03e17f849d341bcb1139c65e68dad1d"
}
},
{
"x": 12,
"y": 15,
"width": 12,
"width": 24,
"height": 6,
"content": {
"$ref": "#/spec/panels/31b8374866184a26beddf46ec30df0b5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,6 @@ spec:
kind: PrometheusTimeSeriesQuery
spec:
query: up
c03e17f849d341bcb1139c65e68dad1d:
kind: Panel
spec:
display:
name: status history
plugin:
kind: StatusHistoryChart
spec: {}
queries:
- kind: TimeSeriesQuery
spec:
plugin:
kind: PrometheusTimeSeriesQuery
spec:
query: vector(1)
layouts:
- kind: Grid
spec:
Expand Down Expand Up @@ -198,13 +183,7 @@ spec:
$ref: "#/spec/panels/57ce686052c9464fa9486ff49d3757cd"
- x: 0
"y": 15
width: 12
height: 6
content:
$ref: "#/spec/panels/c03e17f849d341bcb1139c65e68dad1d"
- x: 12
"y": 15
width: 12
width: 24
height: 6
content:
$ref: "#/spec/panels/31b8374866184a26beddf46ec30df0b5"
Expand Down
15 changes: 8 additions & 7 deletions web/cypress/fixtures/perses/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ export const persesDashboardsAddPanelAddQueryType = {
};

export const persesCreateDashboard = {
DIALOG_MAX_LENGTH_VALIDATION: 'Must be 75 or fewer characters long: error status;',
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_DUPLICATED_NAME_PF_VALIDATION_PREFIX: 'Dashboard name ',
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',
DIALOG_CREATE_NAME_BKD_VALIDATION: 'Danger alert:document already exists',
};

export const persesDashboardsEmptyDashboard = {
Expand All @@ -167,7 +167,9 @@ export const persesDashboardsRenameDashboard = {
};

export const persesDashboardsDuplicateDashboard = {
DIALOG_DUPLICATED_NAME_VALIDATION: 'already exists', //use contains
DIALOG_DUPLICATED_NAME_VALIDATION: 'Could not duplicate dashboard. e: document already exists', //use contains
DIALOG_DUPLICATED_NAME_FED_VALIDATION_1: 'Dashboard name "',
DIALOG_DUPLICATED_NAME_FED_VALIDATION_2: '" already exists in this project: error status;',
};

export const persesDashboardsImportDashboard = {
Expand All @@ -180,7 +182,6 @@ export const persesDashboardsImportDashboard = {
'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:Error migrating dashboard: Failed to migrate dashboard: internal server error',
DIALOG_DUPLICATED_DASHBOARD_ERROR:
'Danger alert:Error importing dashboard: document already exists',
'Danger alert:Failed to migrate dashboard: internal server error',
DIALOG_DUPLICATED_DASHBOARD_ERROR: 'Danger alert:document already exists',
};
4 changes: 2 additions & 2 deletions web/cypress/support/commands/auth-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const operatorAuthUtils = {
}
cy.exec(
`oc get oauthclient openshift-browser-client -o go-template ` +
`--template="{{index .redirectURIs 0}}" --kubeconfig ${Cypress.env('KUBECONFIG_PATH')}`,
`--template="{{index .redirectURIs 0}}" --kubeconfig "${Cypress.env('KUBECONFIG_PATH')}"`,
).then((result) => {
if (result.stderr === '') {
const oauth = result.stdout;
Expand Down Expand Up @@ -325,7 +325,7 @@ Cypress.Commands.add('relogin', (provider: string, username: string, password: s
// Get the OAuth URL from the cluster (same as performLoginAndAuth does)
cy.exec(
`oc get oauthclient openshift-browser-client -o go-template ` +
`--template="{{index .redirectURIs 0}}" --kubeconfig ${Cypress.env('KUBECONFIG_PATH')}`,
`--template="{{index .redirectURIs 0}}" --kubeconfig "${Cypress.env('KUBECONFIG_PATH')}"`,
).then((result) => {
if (result.stderr !== '') {
throw new Error(`Failed to get OAuth URL: ${result.stderr}`);
Expand Down
Loading