@thisisagile/easy-test-web 15.8.3 → 15.8.5

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.
@@ -1,6 +1,13 @@
1
- import { TestElement } from './TestElement';
2
- import { Id, UseCase } from '@thisisagile/easy';
3
- export interface Tester {
1
+ import { Json, UseCase, Id } from '@thisisagile/easy';
2
+
3
+ interface TestElement {
4
+ click(): Promise<void>;
5
+ type(text: string): Promise<void>;
6
+ property(property: string): Promise<Json | undefined>;
7
+ exists(): Promise<boolean>;
8
+ }
9
+
10
+ interface Tester {
4
11
  host: string;
5
12
  url: string;
6
13
  by(key: string, value: string): TestElement;
@@ -15,4 +22,6 @@ export interface Tester {
15
22
  redirect(url: string): Promise<boolean>;
16
23
  goto(to: UseCase, id?: Id): Promise<boolean>;
17
24
  }
18
- export declare const toUrl: (uc: UseCase, host?: string, id?: Id) => string;
25
+ declare const toUrl: (uc: UseCase, host?: string, id?: Id) => string;
26
+
27
+ export { TestElement, Tester, toUrl };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,27 @@
1
- export * from './TestElement';
2
- export * from './Tester';
1
+ import { Json, UseCase, Id } from '@thisisagile/easy';
2
+
3
+ interface TestElement {
4
+ click(): Promise<void>;
5
+ type(text: string): Promise<void>;
6
+ property(property: string): Promise<Json | undefined>;
7
+ exists(): Promise<boolean>;
8
+ }
9
+
10
+ interface Tester {
11
+ host: string;
12
+ url: string;
13
+ by(key: string, value: string): TestElement;
14
+ byClass(c: string): TestElement;
15
+ byId(id: string): TestElement;
16
+ byDataTestId(id: string): TestElement;
17
+ byName(name: string): TestElement;
18
+ row(contains: string): TestElement;
19
+ submit(): TestElement;
20
+ wait(): Promise<boolean>;
21
+ close(): Promise<void>;
22
+ redirect(url: string): Promise<boolean>;
23
+ goto(to: UseCase, id?: Id): Promise<boolean>;
24
+ }
25
+ declare const toUrl: (uc: UseCase, host?: string, id?: Id) => string;
26
+
27
+ export { TestElement, Tester, toUrl };
package/dist/index.js CHANGED
@@ -1,19 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./TestElement"), exports);
18
- __exportStar(require("./Tester"), exports);
19
- //# sourceMappingURL=index.js.map
1
+ "use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},b=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!l.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=m(e,o))||s.enumerable});return t};var p=t=>b(i({},"__esModule",{value:!0}),t);var d={};g(d,{toUrl:()=>T});module.exports=p(d);var n=require("@thisisagile/easy"),T=(t,e,r)=>(0,n.tryTo)(()=>e).map(s=>({domain:s,i:r?`/${r}`:""})).map(({domain:s,i:o})=>(0,n.text)(`${s}/${t.app}/${t}${o}`)).map(s=>s.kebab.toString()).value;0&&(module.exports={toUrl});
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{text as n,tryTo as i}from"@thisisagile/easy";var g=(t,r,s)=>i(()=>r).map(e=>({domain:e,i:s?`/${s}`:""})).map(({domain:e,i:o})=>n(`${e}/${t.app}/${t}${o}`)).map(e=>e.kebab.toString()).value;export{g as toUrl};
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@thisisagile/easy-test-web",
3
- "version": "15.8.3",
3
+ "version": "15.8.5",
4
4
  "description": "Straightforward wrapper library for web testing frameworks",
5
5
  "author": "Sander Hoogendoorn",
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
+ "module": "dist/index.mjs",
8
9
  "types": "dist/index",
9
10
  "repository": {
10
11
  "type": "git",
@@ -23,6 +24,7 @@
23
24
  "lint": "yarn g:eslint . --ext .js,.jsx,.ts,.tsx --fix",
24
25
  "format": "yarn g:prettier --check --write src test *.json",
25
26
  "build": "yarn g:tsc",
27
+ "build:tsup": "yarn g:tsup",
26
28
  "test": "yarn g:jest --coverage",
27
29
  "prepack": "yarn g:copy-readme"
28
30
  },
@@ -34,6 +36,6 @@
34
36
  "access": "public"
35
37
  },
36
38
  "dependencies": {
37
- "@thisisagile/easy": "^15.8.3"
39
+ "@thisisagile/easy": "^15.8.5"
38
40
  }
39
41
  }
@@ -1,7 +0,0 @@
1
- import { Json } from '@thisisagile/easy';
2
- export interface TestElement {
3
- click(): Promise<void>;
4
- type(text: string): Promise<void>;
5
- property(property: string): Promise<Json | undefined>;
6
- exists(): Promise<boolean>;
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=TestElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestElement.js","sourceRoot":"","sources":["../src/TestElement.ts"],"names":[],"mappings":""}
package/dist/Tester.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toUrl = void 0;
4
- const easy_1 = require("@thisisagile/easy");
5
- const toUrl = (uc, host, id) => (0, easy_1.tryTo)(() => host)
6
- .map(domain => ({ domain, i: id ? `/${id}` : '' }))
7
- .map(({ domain, i }) => (0, easy_1.text)(`${domain}/${uc.app}/${uc}${i}`))
8
- .map(url => url.kebab.toString()).value;
9
- exports.toUrl = toUrl;
10
- //# sourceMappingURL=Tester.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tester.js","sourceRoot":"","sources":["../src/Tester.ts"],"names":[],"mappings":";;;AACA,4CAA6D;AA8BtD,MAAM,KAAK,GAAG,CAAC,EAAW,EAAE,IAAa,EAAE,EAAO,EAAU,EAAE,CACnE,IAAA,YAAK,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;KACd,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KAClD,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,GAAG,MAAM,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;KAC7D,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC;AAJ/B,QAAA,KAAK,SAI0B"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB"}