updating the saved objects test to include more saved object types (#100828)

This commit is contained in:
Bhavya RM 2021-05-28 13:04:59 -04:00 committed by GitHub
parent 5dbec05289
commit 4989ec266b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 77 additions and 39 deletions

File diff suppressed because one or more lines are too long

View file

@ -5,8 +5,8 @@
* 2.0.
*/
/* This test is importing saved objects from 7.12.0 to 8.0 and the backported version
* will import from 6.8.x to 8.0.0
/* This test is importing saved objects from 7.13.0 to 8.0 and the backported version
* will import from 6.8.x to 7.x.x
*/
import expect from '@kbn/expect';
@ -35,20 +35,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await esArchiver.load('empty_kibana');
});
it('should be able to import 7.12 saved objects into 8.0.0', async function () {
it('should be able to import 7.13 saved objects into 8.0.0', async function () {
await retry.tryForTime(10000, async () => {
const existingSavedObjects = await testSubjects.getVisibleText('exportAllObjects');
// Kibana always has 1 advanced setting as a saved object
await expect(existingSavedObjects).to.be('Export 1 object');
});
await PageObjects.savedObjects.importFile(
path.join(__dirname, 'exports', '_7.12_import_saved_objects.ndjson')
path.join(__dirname, 'exports', '_7.13_import_saved_objects.ndjson')
);
await PageObjects.savedObjects.checkImportSucceeded();
await PageObjects.savedObjects.clickImportDone();
const importedSavedObjects = await testSubjects.getVisibleText('exportAllObjects');
// verifying the count of saved objects after importing .ndjson
await expect(importedSavedObjects).to.be('Export 34 objects');
await expect(importedSavedObjects).to.be('Export 72 objects');
});
});
}