Skip to content

Commit

Permalink
[ML] Edits following review
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson committed Nov 11, 2021
1 parent ae935aa commit b67a413
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ export async function cloneJob(jobId) {
values: { jobId, dataViewTitle },
}
);
getToastNotifications().addDanger({
title: warningText,
getToastNotificationService().displayDangerToast(warningText, {
'data-test-subj': 'mlCloneJobNoDataViewExistsWarningToast',
});
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default function ({ getService }: FtrProviderContext) {
await browser.refresh();

await ml.testExecution.logTestStep(
'job cloning clicks the clone action and loads the single metric wizard'
'job cloning clicks the clone action and displays an error toast'
);
await ml.jobTable.clickCloneJobActionWhenNoDataViewExists(jobId);
});
Expand Down
5 changes: 1 addition & 4 deletions x-pack/test/functional/services/ml/job_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,7 @@ export function MachineLearningJobTableProvider(
}

public async assertNoDataViewForCloneJobWarningToastExist() {
await retry.tryForTime(5000, async () => {
const toast = await testSubjects.find('mlCloneJobNoDataViewExistsWarningToast');
expect(toast).not.to.be(undefined);
});
await testSubjects.existOrFail('mlCloneJobNoDataViewExistsWarningToast', { timeout: 5000 });
}

public async clickEditJobAction(jobId: string) {
Expand Down

0 comments on commit b67a413

Please sign in to comment.