diff options
author | Shin'ya UEOKA <ueokande@i-beam.org> | 2019-10-08 13:08:29 +0000 |
---|---|---|
committer | Shin'ya UEOKA <ueokande@i-beam.org> | 2019-10-08 13:19:28 +0000 |
commit | 68f6211aac4177f3a70a40031dabbd1b61840071 (patch) | |
tree | f46720349e17c57db7bbfc55241b12c4410f2773 /e2e/lib | |
parent | f59a2dd8c7ac41798e077a795ea88f3bd580e81c (diff) |
Clean e2e tests
Diffstat (limited to 'e2e/lib')
-rw-r--r-- | e2e/lib/SettingRepository.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/e2e/lib/SettingRepository.ts b/e2e/lib/SettingRepository.ts new file mode 100644 index 0000000..9d5d5aa --- /dev/null +++ b/e2e/lib/SettingRepository.ts @@ -0,0 +1,18 @@ +import { JSONTextSettings, SettingSource } from '../../src/shared/SettingData'; +import Settings from '../../src/shared/settings/Settings'; + +export default class SettingRepository { + constructor( + private readonly browser: any, + ) { + } + + async saveJSON(settings: Settings): Promise<void> { + await this.browser.storage.local.set({ + settings: { + source: SettingSource.JSON, + json: JSONTextSettings.fromSettings(settings).toJSONText(), + } + }); + } +} |