Skip to content

Commit

Permalink
[ML] Functional tests - stabilize and re-enable export jobs tests (#1…
Browse files Browse the repository at this point in the history
…52334)

This PR re-enables the export job tests and the reporting download tests
after the underlying issues has been fixed by switching to the new
headless browser mode.

(cherry picked from commit a90f4c2)
  • Loading branch information
pheyos committed May 3, 2023
1 parent e86a6e1 commit 889d1ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.existOrFail('csvDownloadStarted'); // validate toast panel
};

// Failing: See https://github.com/elastic/kibana/issues/150561
// Failing: See https://github.com/elastic/kibana/issues/150562
// Failing: See https://github.com/elastic/kibana/issues/148314
// Failing: See https://github.com/elastic/kibana/issues/150563
// Failing: See https://github.com/elastic/kibana/issues/150561
describe.skip('Download CSV', () => {
describe('Download CSV', () => {
before('initialize tests', async () => {
log.debug('ReportingPage:initTests');
await browser.setWindowSize(1600, 850);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');

// Failing: See https://github.com/elastic/kibana/issues/150557
describe.skip('export jobs', function () {
describe('export jobs', function () {
this.tags(['ml']);

before(async () => {
await ml.api.cleanMlIndices();
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote');
Expand Down Expand Up @@ -282,6 +282,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.navigation.navigateToStackManagement();
await ml.navigation.navigateToStackManagementJobsListPage();
});

after(async () => {
await ml.api.cleanMlIndices();
ml.stackManagementJobs.deleteExportedFiles([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function MachineLearningStackManagementJobsProvider({

async getDownload(filePath: string) {
return retry.tryForTime(5000, async () => {
expect(fs.existsSync(filePath)).to.be(true);
expect(fs.existsSync(filePath)).to.eql(true, `File path ${filePath} should exist`);
return fs.readFileSync(filePath).toString();
});
},
Expand Down

0 comments on commit 889d1ba

Please sign in to comment.