diff options
Diffstat (limited to 'e2e/lib/JSONOptionPage.ts')
-rw-r--r-- | e2e/lib/JSONOptionPage.ts | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/e2e/lib/JSONOptionPage.ts b/e2e/lib/JSONOptionPage.ts index d6ed7ee..1c2db5b 100644 --- a/e2e/lib/JSONOptionPage.ts +++ b/e2e/lib/JSONOptionPage.ts @@ -1,5 +1,5 @@ -import { Lanthan } from 'lanthan'; -import { WebDriver, By } from 'selenium-webdriver'; +import { Lanthan } from "lanthan"; +import { WebDriver, By } from "selenium-webdriver"; export default class JSONOptionPage { private webdriver: WebDriver; @@ -9,14 +9,20 @@ export default class JSONOptionPage { } async updateSettings(value: string): Promise<void> { - const textarea = await this.webdriver.findElement(By.css('textarea')); - await this.webdriver.executeScript(`document.querySelector('textarea').value = '${value}'`) - await textarea.sendKeys(' '); - await this.webdriver.executeScript(() => document.querySelector('textarea')!!.blur()); + const textarea = await this.webdriver.findElement(By.css("textarea")); + await this.webdriver.executeScript( + `document.querySelector('textarea').value = '${value}'` + ); + await textarea.sendKeys(" "); + await this.webdriver.executeScript(() => + document.querySelector("textarea")!!.blur() + ); } async getErrorMessage(): Promise<string> { - const error = await this.webdriver.findElement(By.css('.settings-ui-input-error')); + const error = await this.webdriver.findElement( + By.css(".settings-ui-input-error") + ); return error.getText(); } } |