mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
e2e: adds verify release (#24568)
This commit is contained in:
parent
bffa0fa4f6
commit
7d800e7318
6
.gitignore
vendored
6
.gitignore
vendored
@ -111,9 +111,9 @@ compilation-stats.json
|
||||
/packages/grafana-e2e/cypress/videos
|
||||
/packages/grafana-e2e/cypress/logs
|
||||
/e2e/server.log
|
||||
/e2e/suite1/screenshots
|
||||
!/e2e/suite1/screenshots/expeced/*
|
||||
/e2e/suite1/videos/*
|
||||
/e2e/**/screenshots
|
||||
!/e2e/**/screenshots/expeced/*
|
||||
/e2e/**/videos/*
|
||||
|
||||
# report dumping the whole system env
|
||||
/report.*.json
|
||||
|
@ -8,6 +8,7 @@ CMD="start"
|
||||
PARAMS=""
|
||||
SLOWMO=0
|
||||
URL=${BASE_URL:-"http://$DEFAULT_HOST:$DEFAULT_PORT"}
|
||||
SUITE=${SUITE:-$DEFAULT_SUITE}
|
||||
|
||||
if [ "$1" == "debug" ]; then
|
||||
echo -e "Debug mode"
|
||||
@ -23,5 +24,5 @@ fi
|
||||
cd packages/grafana-e2e
|
||||
|
||||
yarn $CMD --env BASE_URL=$URL,CIRCLE_SHA1=$CIRCLE_SHA1,SLOWMO=$SLOWMO \
|
||||
--config integrationFolder=../../e2e/suite1/specs,screenshotsFolder=../../e2e/suite1/screenshots,videosFolder=../../e2e/suite1/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false \
|
||||
--config integrationFolder=../../e2e/$SUITE/specs,screenshotsFolder=../../e2e/$SUITE/screenshots,videosFolder=../../e2e/$SUITE/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false \
|
||||
$PARAMS
|
||||
|
29
e2e/shared/smokeTestScenario.ts
Normal file
29
e2e/shared/smokeTestScenario.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { e2e } from '@grafana/e2e';
|
||||
|
||||
export const smokeTestScenario = {
|
||||
describeName: 'Smoke tests',
|
||||
itName: 'Login scenario, create test data source, dashboard, panel, and export scenario',
|
||||
addScenarioDataSource: true,
|
||||
addScenarioDashBoard: true,
|
||||
skipScenario: false,
|
||||
scenario: () => {
|
||||
e2e.getScenarioContext().then(({ lastAddedDashboardUid }: any) => {
|
||||
e2e.flows.openDashboard(lastAddedDashboardUid);
|
||||
});
|
||||
e2e.pages.Dashboard.Toolbar.toolbarItems('Add panel').click();
|
||||
e2e.pages.AddDashboard.addNewPanel().click();
|
||||
|
||||
e2e.components.DataSource.TestData.QueryTab.scenarioSelect().select('CSV Metric Values');
|
||||
|
||||
// Make sure the graph renders via checking legend
|
||||
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('be.visible');
|
||||
|
||||
// Expand options section
|
||||
e2e.components.Panels.Visualization.Graph.VisualizationTab.legendSection().click();
|
||||
|
||||
// Disable legend
|
||||
e2e.components.Panels.Visualization.Graph.Legend.showLegendSwitch().click();
|
||||
|
||||
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('not.exist');
|
||||
},
|
||||
};
|
@ -1,29 +1,4 @@
|
||||
import { e2e } from '@grafana/e2e';
|
||||
import { smokeTestScenario } from '../../shared/smokeTestScenario';
|
||||
|
||||
e2e.scenario({
|
||||
describeName: 'Smoke tests',
|
||||
itName: 'Login scenario, create test data source, dashboard, panel, and export scenario',
|
||||
addScenarioDataSource: true,
|
||||
addScenarioDashBoard: true,
|
||||
skipScenario: false,
|
||||
scenario: () => {
|
||||
e2e.getScenarioContext().then(({ lastAddedDashboardUid }: any) => {
|
||||
e2e.flows.openDashboard(lastAddedDashboardUid);
|
||||
});
|
||||
e2e.pages.Dashboard.Toolbar.toolbarItems('Add panel').click();
|
||||
e2e.pages.AddDashboard.addNewPanel().click();
|
||||
|
||||
e2e.components.DataSource.TestData.QueryTab.scenarioSelect().select('CSV Metric Values');
|
||||
|
||||
// Make sure the graph renders via checking legend
|
||||
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('be.visible');
|
||||
|
||||
// Expand options section
|
||||
e2e.components.Panels.Visualization.Graph.VisualizationTab.legendSection().click();
|
||||
|
||||
// Disable legend
|
||||
e2e.components.Panels.Visualization.Graph.Legend.showLegendSwitch().click();
|
||||
|
||||
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('not.exist');
|
||||
},
|
||||
});
|
||||
e2e.scenario(smokeTestScenario);
|
||||
|
@ -6,3 +6,4 @@ PACKAGE_FILE=dist/grafana-*linux-amd64.tar.gz
|
||||
PROV_DIR=$RUNDIR/conf/provisioning
|
||||
DEFAULT_HOST=localhost
|
||||
DEFAULT_PORT=3001
|
||||
DEFAULT_SUITE=suite1
|
||||
|
5
e2e/verify-release
Executable file
5
e2e/verify-release
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
. e2e/variables
|
||||
|
||||
SUITE=verify ./e2e/run-suite
|
4
e2e/verify/specs/smoketests.spec.ts
Normal file
4
e2e/verify/specs/smoketests.spec.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { e2e } from '@grafana/e2e';
|
||||
import { smokeTestScenario } from '../../shared/smokeTestScenario';
|
||||
|
||||
e2e.scenario(smokeTestScenario);
|
7
e2e/verify/tsconfig.json
Normal file
7
e2e/verify/tsconfig.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"types": ["cypress"]
|
||||
},
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["**/*.ts", "../../packages/grafana-e2e/cypress/support/index.d.ts"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user