Commit 7d800e73 by Hugo Häggmark Committed by GitHub

e2e: adds verify release (#24568)

parent bffa0fa4
......@@ -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
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');
},
};
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
#!/bin/bash
. e2e/variables
SUITE=verify ./e2e/run-suite
import { e2e } from '@grafana/e2e';
import { smokeTestScenario } from '../../shared/smokeTestScenario';
e2e.scenario(smokeTestScenario);
{
"compilerOptions": {
"types": ["cypress"]
},
"extends": "../../tsconfig.json",
"include": ["**/*.ts", "../../packages/grafana-e2e/cypress/support/index.d.ts"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment