Scroll option page for Firefox 60

jh-changes
Shin'ya UEOKA 5 years ago
parent 8e5e6bfcdd
commit fff371ae6e
  1. 5
      e2e/lib/OptionPage.ts
  2. 2
      e2e/options_form.test.ts

@ -32,5 +32,8 @@ export default class OptionPage {
// TODO validate current page // TODO validate current page
return new JSONOptionPage(this.lanthan); return new JSONOptionPage(this.lanthan);
} }
}
scrollTo(x: number, y: number): Promise<void> {
return this.webdriver.executeScript(`window.scrollTo(${x}, ${y})`);
}
}

@ -38,6 +38,8 @@ describe("options form page", () => {
it('add blacklist', async () => { it('add blacklist', async () => {
let page = await OptionPage.open(lanthan); let page = await OptionPage.open(lanthan);
let forms = await page.switchToForm(); let forms = await page.switchToForm();
// Scroll is required to click a button on Firefox 60
await page.scrollTo(0, 1000);
// assert default // assert default
let settings = (await browser.storage.local.get('settings')).settings; let settings = (await browser.storage.local.get('settings')).settings;