mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* [watcher] add missing await * run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job * Fix failing watcher test * Revert "run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job" This reverts commitc5d891d44d
. * Clean up watches via api * fix linting errors * don't swallow errors, wait for completion * strip trailing numbers in suite tags * run x-pack-firefoxSmoke group 40 times * Revert "run x-pack-firefoxSmoke group 40 times" This reverts commitcc4eb6ce54
. * run x-pack-firefoxSmoke group 40 times # Conflicts: # .ci/jobs.yml * run tests 80 times * Revert "run tests 80 times" This reverts commit4320c9488a
. * Revert "run x-pack-firefoxSmoke group 40 times" This reverts commitcf0d4056d7
.
This commit is contained in:
parent
b9e95f2540
commit
e7bcb3568f
2 changed files with 19 additions and 8 deletions
|
@ -57,8 +57,8 @@ export async function setupMocha(lifecycle, log, config, providers) {
|
|||
filterSuitesByTags({
|
||||
log,
|
||||
mocha,
|
||||
include: config.get('suiteTags.include'),
|
||||
exclude: config.get('suiteTags.exclude'),
|
||||
include: config.get('suiteTags.include').map(tag => tag.replace(/-\d+$/, '')),
|
||||
exclude: config.get('suiteTags.exclude').map(tag => tag.replace(/-\d+$/, '')),
|
||||
});
|
||||
|
||||
return mocha;
|
||||
|
|
|
@ -12,17 +12,28 @@ const watchName = 'watch Name';
|
|||
const updatedName = 'updatedName';
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const browser = getService('browser');
|
||||
const find = getService('find');
|
||||
const retry = getService('retry');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const log = getService('log');
|
||||
const esSupertest = getService('esSupertest');
|
||||
const PageObjects = getPageObjects(['security', 'common', 'header', 'settings', 'watcher']);
|
||||
|
||||
describe('watcher_test', function () {
|
||||
before('initialize tests', async () => {
|
||||
// There may be system watches if monitoring was previously enabled
|
||||
// These cannot be deleted via the UI, so we need to delete via the API
|
||||
const watches = await esSupertest.get('/.watches/_search');
|
||||
|
||||
if (watches.status === 200) {
|
||||
for (const hit of watches.body.hits.hits) {
|
||||
if (hit._id) {
|
||||
await esSupertest.delete(`/_watcher/watch/${hit._id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await browser.setWindowSize(1600, 1000);
|
||||
await PageObjects.common.navigateToApp('watcher');
|
||||
await PageObjects.watcher.clearAllWatches();
|
||||
});
|
||||
|
||||
it('create and save a new watch', async () => {
|
||||
|
@ -49,10 +60,10 @@ export default function ({ getService, getPageObjects }) {
|
|||
await PageObjects.watcher.deleteWatch(watchID);
|
||||
await testSubjects.click('confirmModalConfirmButton');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
retry.try(async () => {
|
||||
const row = await find.byCssSelector('.euiTableRow');
|
||||
const cell = await row.findByCssSelector('td:nth-child(1)');
|
||||
expect(cell.getVisibleText()).to.equal('No watches to show');
|
||||
await retry.try(async () => {
|
||||
const emptyPrompt = await testSubjects.find('emptyPrompt');
|
||||
const emptyPromptText = await emptyPrompt.getVisibleText();
|
||||
expect(emptyPromptText).to.contain('You don’t have any watches yet\n');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue