Skip to content

Commit

Permalink
PLT-6854: started dapp-authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
yveshauser committed Oct 6, 2023
1 parent d638c73 commit 045cda4
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions e2e/src/step-definitions/setup/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,30 @@ export class ScenarioWorld extends World {
window.localStorage.setItem('BACKGROUND_STORAGE', JSON.stringify(backgroundStorage));
window.localStorage.setItem('appSettings', testWallet.appSettings);
window.localStorage.setItem('keyAgentData', testWallet.keyAgentData);
//window.localStorage.setItem('authorizedDapps', testWallet.authorizedDapps);
//window.localStorage.setItem('lace-activate', testWallet.laceActivate);
//window.localStorage.setItem('laceOrigins', testWallet.laceOrigins);
}, testWallet);
await page.goto(`${EXTENSION_URL}/app.html`);
await page.waitForTimeout(5000);
await page.reload();

// authorize Dapp
// await page.getByRole('button').filter({ hasText: 'Lace' }).click();

// const popupPromise = context.waitForEvent('page');
// await Promise.race([
// new Promise((resolve) => setTimeout(resolve, 5000)),
// page.evaluate(async () => await window['cardano']['lace'].enable())
// ]);
// const popup = await popupPromise;
// await popup.waitForLoadState();
// await popup.waitForTimeout(5000);

// await page.getByRole('button').filter({ hasText: 'Authorize' }).click();
// await page.getByRole('button').filter({ hasText: 'Always' }).click();

// await page.goto(`${EXTENSION_URL}/app.html`);
// await page.waitForTimeout(5000);
// await page.reload();

this.screen = { context, page };

return this.screen
Expand Down

0 comments on commit 045cda4

Please sign in to comment.