Skip to content

Commit

Permalink
fix bad tests merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Jan 21, 2021
1 parent 8c6d8e7 commit c726a86
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const browser = getService('browser');
const inspector = getService('inspector');
const PageObjects = getPageObjects(['discover', 'common', 'timePicker', 'header']);
const sendToBackground = getService('sendToBackground');
const searchSessions = getService('searchSessions');

describe('discover async search', () => {
before(async () => {
Expand All @@ -38,13 +38,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const savedSessionURL = url + `&searchSessionId=${fakeSearchSessionId}`;
await browser.navigateTo(savedSessionURL);
await PageObjects.header.waitUntilLoadingHasFinished();
await sendToBackground.expectState('restored');
await searchSessions.expectState('restored');
await testSubjects.existOrFail('discoverNoResultsError'); // expect error because of fake searchSessionId
const searchSessionId1 = await getSearchSessionId();
expect(searchSessionId1).to.be(fakeSearchSessionId);
await queryBar.clickQuerySubmitButton();
await PageObjects.header.waitUntilLoadingHasFinished();
await sendToBackground.expectState('completed');
await searchSessions.expectState('completed');
const searchSessionId2 = await getSearchSessionId();
expect(searchSessionId2).not.to.be(searchSessionId1);

Expand All @@ -57,7 +57,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
url = await browser.getCurrentUrl();
expect(url).to.contain('searchSessionId');
await PageObjects.header.waitUntilLoadingHasFinished();
await sendToBackground.expectState('restored');
await searchSessions.expectState('restored');
expect(await getSearchSessionId()).to.be(fakeSearchSessionId);
});
});
Expand Down

0 comments on commit c726a86

Please sign in to comment.