Clean e2e tests
This commit is contained in:
parent
f59a2dd8c7
commit
68f6211aac
24 changed files with 171 additions and 266 deletions
18
e2e/lib/SettingRepository.ts
Normal file
18
e2e/lib/SettingRepository.ts
Normal file
|
@ -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(),
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Reference in a new issue