-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [a11y] add initial accessibility functional tests * add accessibility jobs * fix config path * remove percy setup from scripts * disable color-contrast rule * apply changes from @myasonik * define aria-controls/owns props even when suggestions aren't visible * [ftr/a11y] only throw error when there are errors * adding tests for management page * add a11y test for management page * adding ignore rules' to a11y * accessibility test for kibana home * 7 passing tests, 0 failures * jest snapshot update * support a11y test in pipeline job * update a11y test script for pipelines * use oss compatible ci setup * fix exclude syntax * add default exclusion syntax
- Loading branch information
Spencer
authored
Nov 20, 2019
1 parent
1d3c0fd
commit 9a6724c
Showing
28 changed files
with
695 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
const FROM_TIME = '2015-09-19 06:31:44.000'; | ||
const TO_TIME = '2015-09-23 18:31:44.000'; | ||
|
||
export default function({ getService, getPageObjects }: FtrProviderContext) { | ||
const PageObjects = getPageObjects(['common', 'timePicker']); | ||
const a11y = getService('a11y'); | ||
const esArchiver = getService('esArchiver'); | ||
const kibanaServer = getService('kibanaServer'); | ||
|
||
describe('Discover', () => { | ||
before(async () => { | ||
await esArchiver.load('discover'); | ||
await esArchiver.loadIfNeeded('logstash_functional'); | ||
await kibanaServer.uiSettings.update({ | ||
defaultIndex: 'logstash-*', | ||
}); | ||
await PageObjects.common.navigateToApp('discover'); | ||
await PageObjects.timePicker.setAbsoluteRange(FROM_TIME, TO_TIME); | ||
}); | ||
|
||
it('main view', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export default function({ getService, getPageObjects }: FtrProviderContext) { | ||
const PageObjects = getPageObjects(['common']); | ||
const a11y = getService('a11y'); | ||
|
||
describe('Kibana Home', () => { | ||
before(async () => { | ||
await PageObjects.common.navigateToApp('home'); | ||
}); | ||
|
||
it('Kibana Home view', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export default function({ getService, getPageObjects }: FtrProviderContext) { | ||
const PageObjects = getPageObjects(['common', 'settings']); | ||
const a11y = getService('a11y'); | ||
|
||
describe('Management', () => { | ||
before(async () => { | ||
await PageObjects.common.navigateToApp('settings'); | ||
}); | ||
|
||
it('main view', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('index pattern page', async () => { | ||
await PageObjects.settings.clickKibanaIndexPatterns(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Single indexpattern view', async () => { | ||
await PageObjects.settings.clickIndexPatternLogstash(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Saved objects view', async () => { | ||
await PageObjects.settings.clickKibanaSavedObjects(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Advanced settings', async () => { | ||
await PageObjects.settings.clickKibanaSettings(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; | ||
import { services } from './services'; | ||
import { pageObjects } from './page_objects'; | ||
|
||
export default async function({ readConfigFile }: FtrConfigProviderContext) { | ||
const functionalConfig = await readConfigFile(require.resolve('../functional/config')); | ||
|
||
return { | ||
...functionalConfig.getAll(), | ||
|
||
testFiles: [ | ||
require.resolve('./apps/discover'), | ||
require.resolve('./apps/management'), | ||
require.resolve('./apps/home'), | ||
], | ||
pageObjects, | ||
services, | ||
|
||
junit: { | ||
reportName: 'Accessibility Tests', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { GenericFtrProviderContext } from '@kbn/test/types/ftr'; | ||
|
||
import { pageObjects } from './page_objects'; | ||
import { services } from './services'; | ||
|
||
export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export { pageObjects } from '../functional/page_objects'; |
Oops, something went wrong.