2022-09-12 08:14:45 -05:00
|
|
|
var dashboardSettings = [
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
|
|
|
threshold: 0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=annotations',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
|
|
|
threshold: 0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=templating',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
|
|
|
threshold: 0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=links',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
|
|
|
threshold: 0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=versions',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
|
|
|
threshold: 0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=permissions',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
2023-10-26 11:21:50 -05:00
|
|
|
// TODO: improve the accessibility of the permission tab https://github.com/grafana/grafana/issues/77203
|
|
|
|
threshold: 11,
|
2022-09-12 08:14:45 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=dashboard_json',
|
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
|
|
|
threshold: 2,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2021-09-14 06:23:17 -05:00
|
|
|
var config = {
|
|
|
|
defaults: {
|
|
|
|
concurrency: 1,
|
|
|
|
runners: ['axe'],
|
2021-09-23 08:02:30 -05:00
|
|
|
useIncognitoBrowserContext: false,
|
2022-07-28 11:49:41 -05:00
|
|
|
standard: 'WCAG2AA',
|
2021-09-14 06:23:17 -05:00
|
|
|
chromeLaunchConfig: {
|
2023-11-29 11:12:23 -06:00
|
|
|
executablePath: '/usr/bin/google-chrome',
|
2021-09-14 06:23:17 -05:00
|
|
|
args: ['--no-sandbox'],
|
|
|
|
},
|
2021-11-26 09:38:48 -06:00
|
|
|
// see https://github.com/grafana/grafana/pull/41693#issuecomment-979921463 for context
|
|
|
|
// on why we're ignoring singleValue/react-select-*-placeholder elements
|
|
|
|
hideElements: '#updateVersion, [class*="-singleValue"], [id^="react-select-"][id$="-placeholder"]',
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
urls: [
|
|
|
|
{
|
|
|
|
url: '${HOST}/login',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 13,
|
2021-09-23 08:02:30 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/login',
|
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
actions: [
|
2021-09-23 08:02:30 -05:00
|
|
|
"wait for element input[name='user'] to be added",
|
2021-09-14 06:23:17 -05:00
|
|
|
"set field input[name='user'] to admin",
|
|
|
|
"set field input[name='password'] to admin",
|
2023-11-28 04:22:20 -06:00
|
|
|
"click element button[data-testid='data-testid Login button']",
|
|
|
|
"wait for element button[data-testid='data-testid Skip change password button'] to be visible",
|
2021-09-14 06:23:17 -05:00
|
|
|
],
|
2023-06-06 05:24:46 -05:00
|
|
|
threshold: 15,
|
2021-09-23 08:02:30 -05:00
|
|
|
rootElement: '.main-view',
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/?orgId=1',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2023-08-25 06:40:59 -05:00
|
|
|
threshold: 3,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
|
|
|
rootElement: '.main-view',
|
2021-11-17 07:45:45 -06:00
|
|
|
threshold: 0,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
2022-09-12 08:14:45 -05:00
|
|
|
...dashboardSettings,
|
2021-09-14 06:23:17 -05:00
|
|
|
{
|
|
|
|
url: '${HOST}/?orgId=1&search=open',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2023-08-25 06:40:59 -05:00
|
|
|
threshold: 3,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/alerting/list',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2021-11-17 12:23:30 -06:00
|
|
|
// the unified alerting promotion alert's content contrast is too low
|
|
|
|
// see https://github.com/grafana/grafana/pull/41829
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 6,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/datasources',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2023-03-22 02:25:35 -05:00
|
|
|
threshold: 3,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/org/users',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 1,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/org/teams',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 1,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/plugins',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2023-03-22 02:25:35 -05:00
|
|
|
threshold: 3,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/org',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 1,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/org/apikeys',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 4,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
url: '${HOST}/dashboards',
|
2021-09-23 08:02:30 -05:00
|
|
|
wait: 500,
|
2021-09-14 06:23:17 -05:00
|
|
|
rootElement: '.main-view',
|
2022-10-31 06:34:21 -05:00
|
|
|
threshold: 1,
|
2021-09-14 06:23:17 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
function myPa11yCiConfiguration(urls, defaults) {
|
|
|
|
const HOST_SERVER = process.env.HOST || 'localhost';
|
2021-09-23 08:02:30 -05:00
|
|
|
const PORT_SERVER = process.env.PORT || '3001';
|
2021-09-14 06:23:17 -05:00
|
|
|
for (var idx = 0; idx < urls.length; idx++) {
|
|
|
|
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
defaults: defaults,
|
|
|
|
urls: urls,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = myPa11yCiConfiguration(config.urls, config.defaults);
|