aboutsummaryrefslogtreecommitdiff
path: root/e2e/follow_properties.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-02-09 13:43:37 +0900
committerGitHub <noreply@github.com>2020-02-09 13:43:37 +0900
commite9f81d2e2494396bc9ebd827ab02aa8128f1a3ac (patch)
treec6382665c547443358163cb7cbaeeaba52d688b3 /e2e/follow_properties.test.ts
parent8b9388f6e60fe67d20638f55aecb0ed1b281871a (diff)
parentb2fc46ebf79ebb1ffa068fb513d1eeb9b50d7b3f (diff)
Merge pull request #708 from ueokande/sync-storage
Synchronize settings with Firefox Sync
Diffstat (limited to 'e2e/follow_properties.test.ts')
-rw-r--r--e2e/follow_properties.test.ts31
1 files changed, 13 insertions, 18 deletions
diff --git a/e2e/follow_properties.test.ts b/e2e/follow_properties.test.ts
index bbd46d4..78597a5 100644
--- a/e2e/follow_properties.test.ts
+++ b/e2e/follow_properties.test.ts
@@ -6,6 +6,8 @@ import eventually from './eventually';
import { Builder, Lanthan } from 'lanthan';
import { WebDriver, Key } from 'selenium-webdriver';
import Page from './lib/Page';
+import SettingRepository from "./lib/SettingRepository";
+import Settings from "../src/shared/settings/Settings";
describe('follow properties test', () => {
const server = new TestServer().receiveContent('/', `
@@ -31,24 +33,17 @@ describe('follow properties test', () => {
webdriver = lanthan.getWebDriver();
browser = lanthan.getWebExtBrowser();
- await browser.storage.local.set({ settings: {
- source: 'json',
- json: `{
- "keymaps": {
- ":": { "type": "command.show" },
- "f": { "type": "follow.start", "newTab": false },
- "F": { "type": "follow.start", "newTab": true, "background": false },
- "<C-F>": { "type": "follow.start", "newTab": true, "background": true }
- },
- "search": {
- "default": "google",
- "engines": { "google": "https://google.com/search?q={}" }
- },
- "properties": {
- "hintchars": "jk"
- }
- }`,
- }});
+ await new SettingRepository(browser).saveJSON(Settings.fromJSON({
+ "keymaps": {
+ ":": { "type": "command.show" },
+ "f": { "type": "follow.start", "newTab": false },
+ "F": { "type": "follow.start", "newTab": true, "background": false },
+ "<C-F>": { "type": "follow.start", "newTab": true, "background": true }
+ },
+ "properties": {
+ "hintchars": "jk"
+ }
+ }));
await server.start();
});