Created
October 24, 2016 02:09
-
-
Save MiguelCastillo/cb44ee1a9746f7bfc2cb17c4c15fefe1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { expect } from 'chai'; | |
describe('Bad test when awaiting google Suite', () => { | |
beforeEach(async () => { | |
await browser.url('https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=bit-bundler'); | |
}); | |
describe('Getting all results container', () => { | |
var resultWithId, resultText; | |
beforeEach(async () => { | |
resultWithId = browser | |
.waitForExist('[data-hveid="41"]') | |
.element('[data-hveid="41"]'); | |
// Awaiting here breaks getText | |
await resultWithId; | |
resultText = await resultWithId.getText('.r'); | |
}); | |
it('then the text is all good', () => { | |
expect(resultText).to.equal('bit-bundler-browserpack - npm'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment