MCPcopy Create free account
hub / github.com/abi/screenshot-to-code / setupLocalStorage

Method setupLocalStorage

frontend/src/tests/qa.test.ts:215–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213 }
214
215 async setupLocalStorage() {
216 const setting = {
217 openAiApiKey: "test-openai-key",
218 openAiBaseURL: null,
219 anthropicApiKey: "test-anthropic-key",
220 screenshotOneApiKey: "test-screenshotone-key",
221 isImageGenerationEnabled: true,
222 editorTheme: "cobalt",
223 generatedCodeConfig: this.stack,
224 codeGenerationModel: this.model,
225 isTermOfServiceAccepted: true,
226 accessCode: null,
227 };
228
229 await this.page.evaluate((nextSetting) => {
230 localStorage.setItem("setting", JSON.stringify(nextSetting));
231 }, setting);
232
233 await this.page.reload({ waitUntil: "networkidle0" });
234 }
235
236 async resetTestHooks() {
237 await this.page.evaluate(() => {

Callers 1

initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected