File tree Expand file tree Collapse file tree 3 files changed +7
-19
lines changed
Expand file tree Collapse file tree 3 files changed +7
-19
lines changed Original file line number Diff line number Diff line change 11import type { Browser , BrowserContext , Page } from '@playwright/test' ;
2- import { TestPage } from './_page' ;
32
43export interface BrowserPageParams {
54 page : Page ;
65 context : BrowserContext ;
76 browser : Browser ;
87}
98
10- export abstract class BrowserPage extends TestPage {
9+ export abstract class BrowserPage {
1110 protected readonly page : Page ;
1211 protected readonly context : BrowserContext ;
1312 protected readonly browser : Browser ;
1413
1514 protected constructor ( { page, context, browser} : BrowserPageParams ) {
16- super ( ) ;
17-
1815 this . page = page ;
1916 this . context = context ;
2017 this . browser = browser ;
2118 }
2219
23- /**
24- * @override
25- */
2620 async close ( ) : Promise < void > {
2721 await this . page . close ( ) ;
2822 }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import {execute, spawn} from '@junobuild/cli-tools';
44import { statSync } from 'node:fs' ;
55import { readdir , readFile , writeFile } from 'node:fs/promises' ;
66import { join } from 'node:path' ;
7- import { TestPage } from './_page' ;
87
98const DEV = ( process . env . NODE_ENV ?? 'production' ) === 'development' ;
109
@@ -22,12 +21,10 @@ export interface CliPageParams {
2221 satelliteId : PrincipalText ;
2322}
2423
25- export class CliPage extends TestPage {
24+ export class CliPage {
2625 #satelliteId: PrincipalText ;
2726
2827 private constructor ( { satelliteId} : CliPageParams ) {
29- super ( ) ;
30-
3128 this . #satelliteId = satelliteId ;
3229 }
3330
@@ -214,11 +211,11 @@ export class CliPage extends TestPage {
214211 return { accessKey : accessKey . trim ( ) } ;
215212 }
216213
217- /**
218- * @override
219- */
220- async close ( ) : Promise < void > {
221- await this . revertConfig ( ) ;
214+ async close ( { revertConfig } : { revertConfig : boolean } = { revertConfig : true } ) : Promise < void > {
215+ if ( revertConfig ) {
216+ await this . revertConfig ( ) ;
217+ }
218+
222219 await this . logout ( ) ;
223220 }
224221}
You can’t perform that action at this time.
0 commit comments