Skip to content

Commit

Permalink
Add await to protractor calls that require it
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Jul 8, 2020
1 parent a96bb2d commit 4d83b1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/tests/test-admin-configure-languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ describe("admin configure languages", function() {

await element(by.cssContainingText("a", "Languages")).click();

element(by.model("GLTranslate.state.language")).element(by.xpath(".//*[text()='Deutsch']")).click();
await element(by.model("GLTranslate.state.language")).element(by.xpath(".//*[text()='Deutsch']")).click();

expect(await browser.isElementPresent(element(by.cssContainingText("a", "Site settings")))).toBe(false);
expect(await browser.isElementPresent(element(by.cssContainingText("a", "Seiteneinstellungen")))).toBe(true);

element(by.model("GLTranslate.state.language")).element(by.xpath(".//*[text()='Italiano']")).click();
await element(by.model("GLTranslate.state.language")).element(by.xpath(".//*[text()='Italiano']")).click();

expect(await browser.isElementPresent(element(by.cssContainingText("a", "Seiteneinstellungen")))).toBe(false);
expect(await browser.isElementPresent(element(by.cssContainingText("a", "Impostazioni sito")))).toBe(true);

element(by.model("GLTranslate.state.language")).element(by.xpath(".//*[text()='English']")).click();
await element(by.model("GLTranslate.state.language")).element(by.xpath(".//*[text()='English']")).click();

expect(await browser.isElementPresent(element(by.cssContainingText("a", "Impostazioni sito")))).toBe(false);
expect(await browser.isElementPresent(element(by.cssContainingText("a", "Site settings")))).toBe(true);
Expand Down

0 comments on commit 4d83b1e

Please sign in to comment.