Skip to content

Commit

Permalink
Merge branch 'master' into drilldowns-temp
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 30, 2021
2 parents b0ab6df + cd703c0 commit 011555f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
1 change: 0 additions & 1 deletion .ci/Jenkinsfile_baseline_capture
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ kibanaPipeline(timeoutMinutes: 210) {
) {
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
withEnv([
'BUILD_TS_REFS_DISABLE=false', // disabled in root config so we need to override that here
'BUILD_TS_REFS_CACHE_ENABLE=true',
'BUILD_TS_REFS_CACHE_CAPTURE=true',
'DISABLE_BOOTSTRAP_VALIDATION=true',
Expand Down
3 changes: 0 additions & 3 deletions test/scripts/checks/type_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Build TS Refs" \
node scripts/build_ts_refs --ignore-type-failures --force

checks-reporter-with-killswitch "Check Types" \
node scripts/type_check
1 change: 0 additions & 1 deletion vars/workers.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def base(Map params, Closure closure) {
"TEST_BROWSER_HEADLESS=1",
"GIT_BRANCH=${checkoutInfo.branch}",
"TMPDIR=${env.WORKSPACE}/tmp", // For Chrome and anything else that respects it
"BUILD_TS_REFS_DISABLE=true", // no need to build ts refs in bootstrap
]) {
withCredentials([
string(credentialsId: 'vault-addr', variable: 'VAULT_ADDR'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ export default function ({ getService }: FtrProviderContext) {
x: sampleCell.x + cellSize,
y: sampleCell.y + cellSize,
});
await ml.swimLane.waitForSwimLanesToLoad();

// TODO extend cell data with X and Y values, and cell width
await ml.swimLane.assertSelection(overallSwimLaneTestSubj, {
x: [1454846400000, 1454860800000],
Expand All @@ -215,6 +217,8 @@ export default function ({ getService }: FtrProviderContext) {

await ml.testExecution.logTestStep('clears the selection');
await ml.anomalyExplorer.clearSwimLaneSelection();
await ml.swimLane.waitForSwimLanesToLoad();

await ml.navigation.assertCurrentURLNotContain(
'selectedLanes%3A!(Overall)%2CselectedTimes%3A!(1454846400%2C1454860800)%2CselectedType%3Aoverall%2CshowTopFieldValues%3A!t%2CviewByFieldName%3Aairline%2CviewByFromPage%3A1%2CviewByPerPage%3A10'
);
Expand Down Expand Up @@ -255,6 +259,7 @@ export default function ({ getService }: FtrProviderContext) {
x: sampleCell.x + cellSize,
y: sampleCell.y + cellSize,
});
await ml.swimLane.waitForSwimLanesToLoad();

await ml.testExecution.logTestStep('check page content');
await ml.swimLane.assertSelection(viewBySwimLaneTestSubj, {
Expand All @@ -274,6 +279,8 @@ export default function ({ getService }: FtrProviderContext) {

await ml.testExecution.logTestStep('clears the selection');
await ml.anomalyExplorer.clearSwimLaneSelection();
await ml.swimLane.waitForSwimLanesToLoad();

await ml.anomaliesTable.assertTableRowsCount(25);
await ml.anomalyExplorer.assertInfluencerFieldListLength('airline', 10);
await ml.anomalyExplorer.assertAnomalyExplorerChartsCount(0);
Expand All @@ -299,6 +306,7 @@ export default function ({ getService }: FtrProviderContext) {
x2: sampleCell2!.x + cellSize,
y2: sampleCell2!.y + cellSize,
});
await ml.swimLane.waitForSwimLanesToLoad();

await ml.swimLane.assertSelection(viewBySwimLaneTestSubj, {
x: [1454817600000, 1454846400000],
Expand All @@ -311,6 +319,8 @@ export default function ({ getService }: FtrProviderContext) {

await ml.testExecution.logTestStep('clears the selection');
await ml.anomalyExplorer.clearSwimLaneSelection();
await ml.swimLane.waitForSwimLanesToLoad();

await ml.anomaliesTable.assertTableRowsCount(25);
await ml.anomalyExplorer.assertInfluencerFieldListLength('airline', 10);
await ml.anomalyExplorer.assertAnomalyExplorerChartsCount(0);
Expand Down
3 changes: 2 additions & 1 deletion x-pack/test/functional/services/ml/anomaly_explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export function MachineLearningAnomalyExplorerProvider({ getService }: FtrProvid
true
);
await testSubjects.clickWhenNotDisabled('mlAddAndEditDashboardButton');
const embeddable = await testSubjects.find('mlAnomalySwimlaneEmbeddableWrapper');
// changing to the dashboard app might take sime time
const embeddable = await testSubjects.find('mlAnomalySwimlaneEmbeddableWrapper', 30 * 1000);
const swimlane = await embeddable.findByClassName('mlSwimLaneContainer');
expect(await swimlane.isDisplayed()).to.eql(
true,
Expand Down
11 changes: 11 additions & 0 deletions x-pack/test/functional/services/ml/swim_lane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,16 @@ export function SwimLaneProvider({ getService }: FtrProviderContext) {
await testSubjects.click(`mlSwimLanePageSizePanel > ${rowsCount} rows`);
await this.assertPageSize(testSubj, rowsCount);
},

async waitForSwimLanesToLoad() {
// when updating the swim lanes, the old lanes might still be displayed
// for some time, before the loading indicator is displayed

// wait for loading indicator to be displayed, but don't fail in case it's already gone
if (await testSubjects.exists('mlSwimLaneLoadingIndicator', { timeout: 10 * 1000 })) {
// only wait for loading indicator to disappear if it was actually displayed
await testSubjects.missingOrFail('mlSwimLaneLoadingIndicator', { timeout: 10 * 1000 });
}
},
};
}

0 comments on commit 011555f

Please sign in to comment.