[ML] Functional tests - skip color assertions in cloud (#111695)

This PR skips color assertions during functional tests in cloud environments.
This commit is contained in:
Robert Oskamp 2021-09-09 17:58:58 +02:00 committed by GitHub
parent 930bc9c1e3
commit 7f441b49b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -241,6 +241,11 @@ export function MachineLearningCommonUIProvider({
channelTolerance = 10,
valueTolerance = 10
) {
if (process.env.TEST_CLOUD) {
log.warning('Not running color assertions in cloud');
return;
}
await retry.tryForTime(30 * 1000, async () => {
await testSubjects.existOrFail(dataTestSubj);

View file

@ -22,6 +22,7 @@ export type HistogramCharts = Array<{
export function TransformWizardProvider({ getService, getPageObjects }: FtrProviderContext) {
const aceEditor = getService('aceEditor');
const canvasElement = getService('canvasElement');
const log = getService('log');
const testSubjects = getService('testSubjects');
const comboBox = getService('comboBox');
const retry = getService('retry');
@ -241,6 +242,11 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
},
async assertIndexPreviewHistogramCharts(expectedHistogramCharts: HistogramCharts) {
if (process.env.TEST_CLOUD) {
log.warning('Not running color assertions in cloud');
return;
}
// For each chart, get the content of each header cell and assert
// the legend text and column id and if the chart should be present or not.
await retry.tryForTime(5000, async () => {