@jscutlery/playwright-ct-angular 0.7.8 → 0.8.0
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/package.json +3 -3
- package/src/hooks.d.ts +2 -3
- package/src/index.d.ts +3 -4
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jscutlery/playwright-ct-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@babel/core": "7.23.9",
|
|
6
|
-
"@playwright/experimental-ct-core": "1.
|
|
7
|
-
"@playwright/test": "1.
|
|
6
|
+
"@playwright/experimental-ct-core": "1.47.1",
|
|
7
|
+
"@playwright/test": "1.47.1"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"@angular/compiler": "^16.0.0 || ^17.0.0",
|
package/src/hooks.d.ts
CHANGED
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { TestBedStatic } from '@angular/core/testing';
|
|
17
|
-
|
|
18
|
-
export declare function beforeMount<HOOKS extends JsonObject>(callback: (params: {
|
|
17
|
+
export declare function beforeMount<HOOKS>(callback: (params: {
|
|
19
18
|
hooksConfig?: HOOKS;
|
|
20
19
|
TestBed: TestBedStatic;
|
|
21
20
|
}) => Promise<void>): void;
|
|
22
|
-
export declare function afterMount<HOOKS
|
|
21
|
+
export declare function afterMount<HOOKS>(callback: (params: {
|
|
23
22
|
hooksConfig?: HOOKS;
|
|
24
23
|
}) => Promise<void>): void;
|
package/src/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { EnvironmentProviders, EventEmitter, InputSignal, Provider, Type } from '@angular/core';
|
|
2
2
|
import type { PlaywrightTestConfig, TestType } from '@playwright/experimental-ct-core';
|
|
3
3
|
import * as playwrightCtCore from '@playwright/experimental-ct-core';
|
|
4
|
-
import { JsonObject } from '@playwright/experimental-ct-core/types/component';
|
|
5
4
|
import * as playwright from '@playwright/test';
|
|
6
5
|
export type { PlaywrightTestConfig };
|
|
7
6
|
export { expect, devices } from '@playwright/test';
|
|
8
7
|
export interface ComponentFixtures {
|
|
9
|
-
mount<COMPONENT, HOOKS
|
|
10
|
-
mount<COMPONENT, HOOKS
|
|
8
|
+
mount<COMPONENT, HOOKS>(template: string, options?: MountTemplateOptions<COMPONENT, HOOKS>): Promise<MountResult<COMPONENT>>;
|
|
9
|
+
mount<COMPONENT, HOOKS>(component: Type<COMPONENT>, options?: MountOptions<COMPONENT, HOOKS>): Promise<MountResult<COMPONENT>>;
|
|
11
10
|
}
|
|
12
11
|
export interface MountOptions<COMPONENT, HOOKS> {
|
|
13
12
|
hooksConfig?: HOOKS;
|
|
@@ -15,7 +14,7 @@ export interface MountOptions<COMPONENT, HOOKS> {
|
|
|
15
14
|
props?: Inputs<COMPONENT>;
|
|
16
15
|
on?: OutputListeners<COMPONENT>;
|
|
17
16
|
}
|
|
18
|
-
export interface MountTemplateOptions<COMPONENT, HOOKS
|
|
17
|
+
export interface MountTemplateOptions<COMPONENT, HOOKS> extends MountOptions<COMPONENT, HOOKS> {
|
|
19
18
|
imports?: Type<unknown>[];
|
|
20
19
|
}
|
|
21
20
|
export interface MountResult<COMPONENT> extends playwright.Locator {
|