@junobuild/emulator-playwright 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/index.js +2 -0
- package/dist/types/constants/e2e.constants.d.ts +9 -0
- package/dist/types/constants/test-ids.constants.d.ts +38 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/init.emulator.d.ts +12 -0
- package/dist/types/init.satellite.d.ts +7 -0
- package/dist/types/page-objects/_browser.page.d.ts +13 -0
- package/dist/types/page-objects/_cli-context.page.d.ts +12 -0
- package/dist/types/page-objects/cli.page.d.ts +56 -0
- package/dist/types/page-objects/console.page.d.ts +27 -0
- package/dist/types/page-objects/satellite.page.d.ts +7 -0
- package/dist/types/types/test-id.d.ts +6 -0
- package/dist/types/utils/config.utils.d.ts +6 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 David Dal Busco
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @junobuild/emulator-playwright
|
|
2
|
+
|
|
3
|
+
A Playwright library to simplify the integration of the Juno Console and CLI in E2E tests.
|
|
4
|
+
|
|
5
|
+
## Page Objects
|
|
6
|
+
|
|
7
|
+
- **ConsolePage** — Interact with the Juno Console (sign in, create satellites, copy IDs, etc.)
|
|
8
|
+
- **CliPage** — Wrap the Juno CLI (login, deploy, snapshots, config management, etc.)
|
|
9
|
+
- **SatellitePage** — Interact with a deployed satellite project
|
|
10
|
+
|
|
11
|
+
## Test Suite Helpers
|
|
12
|
+
|
|
13
|
+
### `initEmulatorSuite`
|
|
14
|
+
|
|
15
|
+
Creates a full emulator test suite: signs in to the Console, creates a satellite, and logs in via the CLI.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const getPages = initEmulatorSuite({satelliteKind: 'website'});
|
|
19
|
+
|
|
20
|
+
test('...', async () => {
|
|
21
|
+
const {consolePage, cliPage} = getPages();
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### `initSatelliteSuite`
|
|
26
|
+
|
|
27
|
+
Lighter suite for tests that target an already-deployed satellite from the local config.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
const getPages = initSatelliteSuite();
|
|
31
|
+
|
|
32
|
+
test('...', async () => {
|
|
33
|
+
const {satelliteId, cliPage} = getPages();
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Requirements
|
|
38
|
+
|
|
39
|
+
- Juno emulator running locally
|
|
40
|
+
- `juno.config.ts` with a `<DEV_SATELLITE_ID>` placeholder
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a={auth:{signInDev:"btn-sign-in-dev",switchDevAccount:"btn-switch-account-dev",inputDevIdentifier:"input-dev-identifier",continueDevAccount:"btn-continue-dev"},launchpad:{launch:"btn-launch-first-satellite",launchExtraSatellite:"btn-launch-extra-satellite",actions:"btn-open-actions"},createSatellite:{create:"btn-create-satellite",input:"input-satellite-name",website:"input-radio-satellite-website",application:"input-radio-satellite-application",continue:"btn-continue-overview"},satelliteOverview:{visit:"link-visit-satellite",copySatelliteId:"btn-copy-satellite-id"},navbar:{openWallet:"btn-open-wallet",getIcp:"btn-get-icp",getCycles:"btn-get-cycles"},createAnalytics:{navLink:"link-analytics-dashboard",launch:"btn-launch-analytics",create:"btn-create-analytics",close:"btn-close-analytics-wizard"},wizard:{closeInsufficientFunds:"btn-close-insufficient-funds"}};import{test as b}from"@playwright/test";import{assertNonNullish as A,notEmptyString as O}from"@dfinity/utils";import{execute as l,spawn as I}from"@junobuild/cli-tools";import{statSync as k}from"node:fs";import{readdir as _,readFile as T,writeFile as B}from"node:fs/promises";import{join as f}from"node:path";var C={command:"juno",args:[]},E=["--mode","development","--headless"],m=class{command;commandArgs;constructor({command:t}){let{command:e,args:o}=t??C;this.command=e,this.commandArgs=o}buildArgs(t){return[...this.commandArgs,...t,...E]}};var u=f(process.cwd(),"juno.config.ts"),p=class n extends m{#t;constructor({satelliteId:t,command:e}){super({command:e}),this.#t=t}static initWithoutLogin(t){return new n(t)}static async initWithEmulatorLogin(t){let e=new n(t);return await e.initConfig(),await e.loginWithEmulator(),await e.applyConfig(),e}async initConfig(){let t=await T(u,"utf-8");t=t.replace("<DEV_SATELLITE_ID>",this.#t),await B(u,t,"utf-8")}async revertConfig(){let t=await T(u,"utf-8");t=t.replace(this.#t,"<DEV_SATELLITE_ID>"),await B(u,t,"utf-8")}async toggleSatelliteId({satelliteId:t}){await this.revertConfig(),this.#t=t,await this.initConfig()}async loginWithEmulator(){await l({command:this.command,args:this.buildArgs(["login","--emulator"])})}async applyConfig(){await l({command:this.command,args:this.buildArgs(["config","apply","--force"])})}async logout(){await l({command:this.command,args:this.buildArgs(["logout"])})}async clearHosting(){await l({command:this.command,args:this.buildArgs(["hosting","clear"])})}async deployHosting({clear:t}){await l({command:this.command,args:this.buildArgs(["hosting","deploy",...t?["--clear"]:[]])})}async createSnapshot({target:t}){await l({command:this.command,args:this.buildArgs(["snapshot","create","--target",t])})}async restoreSnapshot({target:t}){await l({command:this.command,args:this.buildArgs(["snapshot","restore","--target",t])})}async deleteSnapshot({target:t}){await l({command:this.command,args:this.buildArgs(["snapshot","delete","--target",t])})}async downloadSnapshot({target:t}){return await l({command:this.command,args:this.buildArgs(["snapshot","download","--target",t])}),await this.getSnapshotFsFolder()}async getSnapshotFsFolder(){let t=f(process.cwd(),".snapshots"),e=await _(t,{withFileTypes:!0}),[o]=e.filter(i=>i.isDirectory()).map(({name:i})=>{let r=f(t,i),{birthtimeMs:c}=k(r);return{path:r,time:c}}).sort((i,r)=>r.time-i.time);return A(o),{snapshotFolder:o.path}}async uploadSnapshot({target:t,folder:e}){await l({command:this.command,args:this.buildArgs(["snapshot","upload","--target",t,"--dir",e])})}async listSnapshot({target:t}){let e="";await I({command:this.command,args:this.buildArgs(["snapshot","list","--target",t]),stdout:r=>e+=r,silentErrors:!0});let[o,i]=e.split("Snapshot found:");return{snapshotId:O(i)?i.trim():void 0}}async whoami(){let t="";await I({command:this.command,args:this.buildArgs(["whoami"]),stdout:y=>t+=y,silentErrors:!0});let[e,o,i,r]=t.split(" "),[c]=r.split(`
|
|
2
|
+
`);return{accessKey:c.replace("\x1B[32m","").replace("\x1B[39m","").trim()}}async close({cleanUp:t}={cleanUp:!0}){t&&await this.cleanUp(),await this.logout()}async cleanUp(){await this.revertConfig()}};import{notEmptyString as F}from"@dfinity/utils";import{PrincipalTextSchema as U}from"@dfinity/zod-schemas";import{expect as s}from"@playwright/test";var P={timeout:15e3},g={timeout:2*15e3},Q={timeout:4*15e3};var d=class{page;context;browser;constructor({page:t,context:e,browser:o}){this.page=t,this.context=e,this.browser=o}async close(){await this.page.close()}};import{expect as x}from"@playwright/test";var h=class extends d{async reload({title:t}={title:"Juno / Satellite"}){await x.poll(async()=>(await this.page.reload({waitUntil:"load"}),await this.page.title()),{...g,intervals:[1e3,2e3,1e4]}).toBe(t)}async assertScreenshot(){await x(this.page).toHaveScreenshot({fullPage:!0})}};var w=class n extends d{constructor(t){super(t)}static async initWithSignIn(t){let e=new n(t);return await e.goto(),await e.signIn(),e}async goto({path:t}={path:"/"}){await this.page.goto(t)}async signIn(){await s(this.page.getByTestId(a.auth.switchDevAccount)).toBeVisible(g),await this.page.getByTestId(a.auth.switchDevAccount).click(),await s(this.page.getByTestId(a.auth.inputDevIdentifier)).toBeVisible(),await this.page.getByTestId(a.auth.inputDevIdentifier).fill(crypto.randomUUID().replaceAll("-","")),await s(this.page.getByTestId(a.auth.continueDevAccount)).toBeVisible(),await this.page.getByTestId(a.auth.continueDevAccount).click()}async createSatellite(t){await s(this.page.getByTestId(a.launchpad.launch)).toBeVisible(g),await this.page.getByTestId(a.launchpad.launch).click(),await this.createSatelliteWizard(t)}async openCreateAdditionalSatelliteWizard(t){await s(this.page.getByTestId(a.launchpad.actions)).toBeVisible(g),await this.page.getByTestId(a.launchpad.actions).click(),await s(this.page.getByTestId(a.launchpad.launchExtraSatellite)).toBeVisible(g),await this.page.getByTestId(a.launchpad.launchExtraSatellite).click(),await this.createSatelliteWizard(t)}async createSatelliteWizard({kind:t}){await s(this.page.getByTestId(a.createSatellite.create)).toBeVisible({timeout:15e3}),await this.page.getByTestId(a.createSatellite.input).fill("Test"),await this.page.getByTestId(a.createSatellite[t]).click(),await this.page.getByTestId(a.createSatellite.create).click(),await s(this.page.getByTestId(a.createSatellite.continue)).toBeVisible(g),await this.page.getByTestId(a.createSatellite.continue).click()}async visitSatelliteSite({title:t}={title:"Juno / Satellite"}){await s(this.page.getByTestId(a.satelliteOverview.visit)).toBeVisible(g);let e=this.context.waitForEvent("page");await this.page.getByTestId(a.satelliteOverview.visit).click();let o=await e;return await s(o).toHaveTitle(t),new h({page:o,browser:this.browser,context:this.context})}async getCycles(){await s(this.page.getByTestId(a.navbar.openWallet)).toBeVisible(),await this.page.getByTestId(a.navbar.openWallet).click(),await s(this.page.getByTestId(a.navbar.getCycles)).toBeVisible(),await this.page.getByTestId(a.navbar.getCycles).click(),await s(this.page.getByText("330.010 TCycles")).toBeVisible({timeout:65e3})}async copySatelliteID(){await s(this.page.getByTestId(a.satelliteOverview.copySatelliteId)).toBeVisible(),await this.page.getByTestId(a.satelliteOverview.copySatelliteId).click();let t=await this.page.evaluate(()=>navigator.clipboard.readText());return s(F(t)).toBeTruthy(),s(U.safeParse(t).success).toBeTruthy(),t}async addSatelliteAdminAccessKey({satelliteId:t,accessKey:e}){await this.goto({path:`/satellite/?s=${t}&tab=setup`});let o=this.page.locator("button",{hasText:"Add an access key"});await s(o).toBeVisible(P),await o.click();let i=this.page.locator("form");await i.getByRole("radio",{name:/enter one manually/i}).check();let r=i.getByLabel("Access Key ID");await s(r).toBeEnabled(),await r.fill(e),await i.locator('select[name="scope"]').selectOption("admin");let c=i.getByRole("button",{name:/^submit$/i});await s(c).toBeEnabled(),await c.click(),await s(this.page.getByText("Access Key Added")).toBeVisible(P)}};var ut=({satelliteKind:n,cli:t})=>{let e,o;return b.beforeAll(async({playwright:i})=>{b.setTimeout(12e4);let r=await i.chromium.launch(),c=await r.newContext(),v=await c.newPage();e=await w.initWithSignIn({page:v,context:c,browser:r}),await e.createSatellite({kind:n});let y=await e.copySatelliteID();o=await p.initWithEmulatorLogin({satelliteId:y,...t})}),b.afterAll(async()=>{let i=await Promise.allSettled([e.close(),o.close()]);if(i.find(({status:r})=>r==="rejected"))throw console.error(i),new Error("Failed to close test suite!")}),()=>({consolePage:e,cliPage:o})};import{assertNonNullish as W}from"@dfinity/utils";import{test as N}from"@playwright/test";import{readJunoConfig as V}from"@junobuild/config-loader";var D="juno.config",J={filename:D},L=async n=>await V({...J,config:e=>typeof e=="function"?e(n):e}),S=async n=>{try{return{ok:await L(n)}}catch(t){return{err:t}}};var It=()=>{let n,t;return N.beforeAll(async()=>{let e=await S({mode:"development"});if("err"in e)throw new Error("Failed to read config");let{ok:o}=e,i=o.satellite.ids?.development;W(i),n=i,t=await p.initWithoutLogin({satelliteId:n})}),()=>({satelliteId:n,cliPage:t})};export{p as CliPage,w as ConsolePage,h as SatellitePage,ut as initEmulatorSuite,It as initSatelliteSuite,a as testIds};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const testIds: {
|
|
2
|
+
readonly auth: {
|
|
3
|
+
readonly signInDev: "btn-sign-in-dev";
|
|
4
|
+
readonly switchDevAccount: "btn-switch-account-dev";
|
|
5
|
+
readonly inputDevIdentifier: "input-dev-identifier";
|
|
6
|
+
readonly continueDevAccount: "btn-continue-dev";
|
|
7
|
+
};
|
|
8
|
+
readonly launchpad: {
|
|
9
|
+
readonly launch: "btn-launch-first-satellite";
|
|
10
|
+
readonly launchExtraSatellite: "btn-launch-extra-satellite";
|
|
11
|
+
readonly actions: "btn-open-actions";
|
|
12
|
+
};
|
|
13
|
+
readonly createSatellite: {
|
|
14
|
+
readonly create: "btn-create-satellite";
|
|
15
|
+
readonly input: "input-satellite-name";
|
|
16
|
+
readonly website: "input-radio-satellite-website";
|
|
17
|
+
readonly application: "input-radio-satellite-application";
|
|
18
|
+
readonly continue: "btn-continue-overview";
|
|
19
|
+
};
|
|
20
|
+
readonly satelliteOverview: {
|
|
21
|
+
readonly visit: "link-visit-satellite";
|
|
22
|
+
readonly copySatelliteId: "btn-copy-satellite-id";
|
|
23
|
+
};
|
|
24
|
+
readonly navbar: {
|
|
25
|
+
readonly openWallet: "btn-open-wallet";
|
|
26
|
+
readonly getIcp: "btn-get-icp";
|
|
27
|
+
readonly getCycles: "btn-get-cycles";
|
|
28
|
+
};
|
|
29
|
+
readonly createAnalytics: {
|
|
30
|
+
readonly navLink: "link-analytics-dashboard";
|
|
31
|
+
readonly launch: "btn-launch-analytics";
|
|
32
|
+
readonly create: "btn-create-analytics";
|
|
33
|
+
readonly close: "btn-close-analytics-wizard";
|
|
34
|
+
};
|
|
35
|
+
readonly wizard: {
|
|
36
|
+
readonly closeInsufficientFunds: "btn-close-insufficient-funds";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './constants/test-ids.constants';
|
|
2
|
+
export * from './init.emulator';
|
|
3
|
+
export * from './init.satellite';
|
|
4
|
+
export * from './page-objects/cli.page';
|
|
5
|
+
export * from './page-objects/console.page';
|
|
6
|
+
export * from './page-objects/satellite.page';
|
|
7
|
+
export type * from './types/test-id';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CliContextPageParams } from './page-objects/_cli-context.page';
|
|
2
|
+
import { CliPage } from './page-objects/cli.page';
|
|
3
|
+
import { ConsolePage } from './page-objects/console.page';
|
|
4
|
+
interface EmulatorSuitePages {
|
|
5
|
+
consolePage: ConsolePage;
|
|
6
|
+
cliPage: CliPage;
|
|
7
|
+
}
|
|
8
|
+
export declare const initEmulatorSuite: ({ satelliteKind, cli }: {
|
|
9
|
+
satelliteKind: "website" | "application";
|
|
10
|
+
cli?: CliContextPageParams;
|
|
11
|
+
}) => (() => EmulatorSuitePages);
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Browser, BrowserContext, Page } from '@playwright/test';
|
|
2
|
+
export interface BrowserPageParams {
|
|
3
|
+
page: Page;
|
|
4
|
+
context: BrowserContext;
|
|
5
|
+
browser: Browser;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class BrowserPage {
|
|
8
|
+
protected readonly page: Page;
|
|
9
|
+
protected readonly context: BrowserContext;
|
|
10
|
+
protected readonly browser: Browser;
|
|
11
|
+
protected constructor({ page, context, browser }: BrowserPageParams);
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CliContextPageParams {
|
|
2
|
+
command?: {
|
|
3
|
+
command: string;
|
|
4
|
+
args: string[];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class CliContextPage {
|
|
8
|
+
protected readonly command: string;
|
|
9
|
+
protected readonly commandArgs: string[];
|
|
10
|
+
protected constructor({ command }: CliContextPageParams);
|
|
11
|
+
protected buildArgs(args: string[]): string[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PrincipalText } from '@dfinity/zod-schemas';
|
|
2
|
+
import { type CliContextPageParams, CliContextPage } from './_cli-context.page';
|
|
3
|
+
export interface CliPageParams extends CliContextPageParams {
|
|
4
|
+
satelliteId: PrincipalText;
|
|
5
|
+
}
|
|
6
|
+
export declare class CliPage extends CliContextPage {
|
|
7
|
+
#private;
|
|
8
|
+
private constructor();
|
|
9
|
+
static initWithoutLogin(params: CliPageParams): CliPage;
|
|
10
|
+
static initWithEmulatorLogin(params: CliPageParams): Promise<CliPage>;
|
|
11
|
+
protected initConfig(): Promise<void>;
|
|
12
|
+
private revertConfig;
|
|
13
|
+
toggleSatelliteId({ satelliteId }: {
|
|
14
|
+
satelliteId: PrincipalText;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
protected loginWithEmulator(): Promise<void>;
|
|
17
|
+
applyConfig(): Promise<void>;
|
|
18
|
+
private logout;
|
|
19
|
+
clearHosting(): Promise<void>;
|
|
20
|
+
deployHosting({ clear }: {
|
|
21
|
+
clear: boolean;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
createSnapshot({ target }: {
|
|
24
|
+
target: 'satellite' | 'orbiter' | 'mission-control';
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
restoreSnapshot({ target }: {
|
|
27
|
+
target: 'satellite' | 'orbiter' | 'mission-control';
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
deleteSnapshot({ target }: {
|
|
30
|
+
target: 'satellite' | 'orbiter' | 'mission-control';
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
downloadSnapshot({ target }: {
|
|
33
|
+
target: 'satellite' | 'orbiter' | 'mission-control';
|
|
34
|
+
}): Promise<{
|
|
35
|
+
snapshotFolder: string;
|
|
36
|
+
}>;
|
|
37
|
+
getSnapshotFsFolder(): Promise<{
|
|
38
|
+
snapshotFolder: string;
|
|
39
|
+
}>;
|
|
40
|
+
uploadSnapshot({ target, folder }: {
|
|
41
|
+
target: 'satellite' | 'orbiter' | 'mission-control';
|
|
42
|
+
folder: string;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
listSnapshot({ target }: {
|
|
45
|
+
target: 'satellite' | 'orbiter' | 'mission-control';
|
|
46
|
+
}): Promise<{
|
|
47
|
+
snapshotId: string | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
whoami(): Promise<{
|
|
50
|
+
accessKey: string;
|
|
51
|
+
}>;
|
|
52
|
+
close({ cleanUp }?: {
|
|
53
|
+
cleanUp: boolean;
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
cleanUp(): Promise<void>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type PrincipalText } from '@dfinity/zod-schemas';
|
|
2
|
+
import { BrowserPage, type BrowserPageParams } from './_browser.page';
|
|
3
|
+
import { SatellitePage } from './satellite.page';
|
|
4
|
+
export declare class ConsolePage extends BrowserPage {
|
|
5
|
+
private constructor();
|
|
6
|
+
static initWithSignIn(params: BrowserPageParams): Promise<ConsolePage>;
|
|
7
|
+
goto({ path }?: {
|
|
8
|
+
path: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
private signIn;
|
|
11
|
+
createSatellite(params: {
|
|
12
|
+
kind: 'website' | 'application';
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
openCreateAdditionalSatelliteWizard(params: {
|
|
15
|
+
kind: 'website' | 'application';
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
private createSatelliteWizard;
|
|
18
|
+
visitSatelliteSite({ title }?: {
|
|
19
|
+
title: string;
|
|
20
|
+
}): Promise<SatellitePage>;
|
|
21
|
+
getCycles(): Promise<void>;
|
|
22
|
+
copySatelliteID(): Promise<string>;
|
|
23
|
+
addSatelliteAdminAccessKey({ satelliteId, accessKey }: {
|
|
24
|
+
satelliteId: PrincipalText;
|
|
25
|
+
accessKey: string;
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@junobuild/emulator-playwright",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A Playwright library to simplify the integration of the Juno Console and CLI in E2E tests.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/junobuild/emulator-playwright.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/junobuild/emulator-playwright"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"playwright",
|
|
20
|
+
"e2e",
|
|
21
|
+
"test"
|
|
22
|
+
],
|
|
23
|
+
"homepage": "https://github.com/junobuild/emulator-playwright#readme",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "dist/index.js",
|
|
26
|
+
"module": "./dist/index.js",
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/types/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js",
|
|
32
|
+
"require": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"format": "prettier . --write",
|
|
37
|
+
"format:check": "prettier --check .",
|
|
38
|
+
"ts-declaration": "tsc --emitDeclarationOnly --outDir dist/types",
|
|
39
|
+
"build": "tsc --noEmit && node rmdir.mjs && node esbuild.mjs && npm run ts-declaration",
|
|
40
|
+
"lint": "eslint --max-warnings 0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@dfinity/eslint-config-oisy-wallet": "^0.2.3",
|
|
44
|
+
"@types/node": "^25.3.0",
|
|
45
|
+
"esbuild": "^0.27.3",
|
|
46
|
+
"prettier": "^3.8.1",
|
|
47
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
48
|
+
"typescript": "^5.9.3"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=24",
|
|
52
|
+
"npm": ">=11.5.1 <12.0.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@dfinity/utils": "^4.1.0",
|
|
56
|
+
"@dfinity/zod-schemas": "^3.0.2",
|
|
57
|
+
"@junobuild/cli-tools": "^0.10.2",
|
|
58
|
+
"@junobuild/config-loader": "^0.4.8",
|
|
59
|
+
"@playwright/test": "^1.52.0"
|
|
60
|
+
}
|
|
61
|
+
}
|