Skip to content

Commit aae00c4

Browse files
Merge pull request #712 from etmurasaki/etmura-ou-1134
OU-1134: edit perses dashboards automation testing
2 parents f508274 + 827041f commit aae00c4

28 files changed

Lines changed: 5381 additions & 89 deletions

web/cypress/e2e/coo/01.coo_bvt.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ describe('BVT: COO', { tags: ['@smoke', '@coo'] }, () => {
2828

2929
it('1. Admin perspective - Observe Menu', () => {
3030
cy.log('Admin perspective - Observe Menu and verify all submenus');
31+
cy.reload(true);
32+
cy.wait(10000);
3133
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
3234
commonPages.titleShouldHaveText('Alerting');
3335
nav.tabs.switchTab('Silences');
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { nav } from '../../views/nav';
2+
import { runCOOEditPersesTests1 } from '../../support/perses/02.coo_edit_perses_admin_1.cy';
3+
import { runCOOEditPersesTests } from '../../support/perses/02.coo_edit_perses_admin.cy';
4+
5+
// Set constants for the operators that need to be installed for tests.
6+
const MCP = {
7+
namespace: 'openshift-cluster-observability-operator',
8+
packageName: 'cluster-observability-operator',
9+
operatorName: 'Cluster Observability Operator',
10+
config: {
11+
kind: 'UIPlugin',
12+
name: 'monitoring',
13+
},
14+
};
15+
16+
const MP = {
17+
namespace: 'openshift-monitoring',
18+
operatorName: 'Cluster Monitoring Operator',
19+
};
20+
21+
//TODO: change tag to @dashboards when customizable-dashboards gets merged
22+
describe('COO - Dashboards (Perses) - Edit perses dashboard', { tags: ['@perses', '@dashboards-'] }, () => {
23+
24+
before(() => {
25+
cy.beforeBlockCOO(MCP, MP);
26+
});
27+
28+
beforeEach(() => {
29+
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
30+
cy.wait(5000);
31+
cy.changeNamespace('All Projects');
32+
});
33+
34+
runCOOEditPersesTests({
35+
name: 'Administrator',
36+
});
37+
38+
runCOOEditPersesTests1({
39+
name: 'Administrator',
40+
});
41+
42+
});
43+
44+
45+

web/cypress/fixtures/coo/openshift-cluster-sample-dashboard.yaml renamed to web/cypress/fixtures/coo/coo121_perses_dashboards/openshift-cluster-sample-dashboard.yaml

File renamed without changes.

web/cypress/fixtures/coo/perses-dashboard-sample.yaml renamed to web/cypress/fixtures/coo/coo121_perses_dashboards/perses-dashboard-sample.yaml

File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: perses.dev/v1alpha1
2+
kind: PersesDatasource
3+
metadata:
4+
name: perses-datasource-sample
5+
namespace: perses-dev
6+
spec:
7+
config:
8+
display:
9+
name: 'Default Datasource'
10+
default: true
11+
plugin:
12+
kind: 'PrometheusDatasource'
13+
spec:
14+
directUrl: 'https://prometheus.demo.prometheus.io'

web/cypress/fixtures/coo/prometheus-overview-variables.yaml renamed to web/cypress/fixtures/coo/coo121_perses_dashboards/prometheus-overview-variables.yaml

File renamed without changes.

web/cypress/fixtures/coo/thanos-compact-overview-1var.yaml renamed to web/cypress/fixtures/coo/coo121_perses_dashboards/thanos-compact-overview-1var.yaml

File renamed without changes.

web/cypress/fixtures/coo/thanos-querier-datasource.yaml renamed to web/cypress/fixtures/coo/coo121_perses_dashboards/thanos-querier-datasource.yaml

File renamed without changes.

0 commit comments

Comments
 (0)