@axinom/mosaic-e2e-page-model 0.2.3-rc.1 → 0.2.3-rc.3
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.
|
@@ -13,7 +13,7 @@ export declare class SignInWithMicrosoftForm extends ComponentModel {
|
|
|
13
13
|
* The following steps will be taken:
|
|
14
14
|
* - Enter email and click 'Next'
|
|
15
15
|
* - Enter the password and click 'Sign in'
|
|
16
|
-
* - Click 'Accept'
|
|
16
|
+
* - Click 'Accept' if 'Accept Permissions' page is displayed. Otherwise click 'Yes' if 'Stay Signed In' page is displayed
|
|
17
17
|
* - Wait for the form to be detached
|
|
18
18
|
*/
|
|
19
19
|
authenticate(credentials: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-in-with-microsoft-form.d.ts","sourceRoot":"","sources":["../../src/sign-in/sign-in-with-microsoft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,6CAA6C;AAC7C,qBAAa,uBAAwB,SAAQ,cAAc;gBAC7C,IAAI,EAAE,IAAI;IAMtB,kEAAkE;IAClE,QAAQ,CAAC,YAAY,oCAEnB;IAEF;;;;;;;;;;OAUG;IACG,YAAY,CAAC,WAAW,EAAE;QAC9B,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"sign-in-with-microsoft-form.d.ts","sourceRoot":"","sources":["../../src/sign-in/sign-in-with-microsoft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,6CAA6C;AAC7C,qBAAa,uBAAwB,SAAQ,cAAc;gBAC7C,IAAI,EAAE,IAAI;IAMtB,kEAAkE;IAClE,QAAQ,CAAC,YAAY,oCAEnB;IAEF;;;;;;;;;;OAUG;IACG,YAAY,CAAC,WAAW,EAAE;QAC9B,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;CAmClB"}
|
|
@@ -19,7 +19,7 @@ class SignInWithMicrosoftForm extends mosaic_e2e_ui_selectors_1.ComponentModel {
|
|
|
19
19
|
* The following steps will be taken:
|
|
20
20
|
* - Enter email and click 'Next'
|
|
21
21
|
* - Enter the password and click 'Sign in'
|
|
22
|
-
* - Click 'Accept'
|
|
22
|
+
* - Click 'Accept' if 'Accept Permissions' page is displayed. Otherwise click 'Yes' if 'Stay Signed In' page is displayed
|
|
23
23
|
* - Wait for the form to be detached
|
|
24
24
|
*/
|
|
25
25
|
async authenticate(credentials) {
|
|
@@ -27,8 +27,10 @@ class SignInWithMicrosoftForm extends mosaic_e2e_ui_selectors_1.ComponentModel {
|
|
|
27
27
|
const nextBtn = this.getLocator('//input[@value="Next"]');
|
|
28
28
|
const passwordField = this.getLocator('//input[@name="passwd"]');
|
|
29
29
|
const signInButton = this.getLocator('//input[@value="Sign in"]');
|
|
30
|
-
//
|
|
31
|
-
|
|
30
|
+
// 'Accept Permissions' page will be displayed with an 'Accept' button if the user has not previously accepted permissions
|
|
31
|
+
// Otherwise, 'Stay Signed In' page will be displayed with a 'Yes' button
|
|
32
|
+
// Therefore we use a hybrid locator which works for either of those 2 buttons
|
|
33
|
+
const continueButton = this.getLocator('//input[@value="Accept"] | //input[@value="Yes"]');
|
|
32
34
|
// enter username
|
|
33
35
|
await usernameField.waitFor({ state: 'visible' });
|
|
34
36
|
await usernameField.fill(credentials.username);
|
|
@@ -43,15 +45,13 @@ class SignInWithMicrosoftForm extends mosaic_e2e_ui_selectors_1.ComponentModel {
|
|
|
43
45
|
await passwordField.fill(credentials.password);
|
|
44
46
|
await signInButton.click();
|
|
45
47
|
try {
|
|
46
|
-
|
|
48
|
+
continueButton.waitFor({ state: 'visible' });
|
|
49
|
+
await continueButton.click();
|
|
47
50
|
}
|
|
48
51
|
catch (e) {
|
|
49
52
|
throw new Error('Bad password.');
|
|
50
53
|
}
|
|
51
|
-
|
|
52
|
-
await acceptButton.click();
|
|
53
|
-
// wait for login to complete
|
|
54
|
-
await acceptButton.waitFor({ state: 'detached' });
|
|
54
|
+
await continueButton.waitFor({ state: 'detached' });
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
exports.SignInWithMicrosoftForm = SignInWithMicrosoftForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-in-with-microsoft-form.js","sourceRoot":"","sources":["../../src/sign-in/sign-in-with-microsoft-form.ts"],"names":[],"mappings":";;;AAAA,6EAAiE;AAGjE,6CAA6C;AAC7C,MAAa,uBAAwB,SAAQ,wCAAc;IACzD,YAAY,IAAU;QACpB,6CAA6C;QAC7C,2DAA2D;QAC3D,KAAK,CAAC,IAAI,EAAE,kCAAkC,CAAC,CAAC;QAGlD,kEAAkE;QACzD,iBAAY,GAAG,IAAI,CAAC,UAAU,CACrC,iDAAiD,CAClD,CAAC;IALF,CAAC;IAOD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,YAAY,CAAC,WAGlB;QACC,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;QACnE,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAC1D,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sign-in-with-microsoft-form.js","sourceRoot":"","sources":["../../src/sign-in/sign-in-with-microsoft-form.ts"],"names":[],"mappings":";;;AAAA,6EAAiE;AAGjE,6CAA6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AE,SAAS,EAAE,CAAC,CAAC;YAC7C,MAAM,cAAc,CAAC,KAAK,EAAE,CAAC;SAC9B;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;SAClC;QAED,MAAM,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IACtD,CAAC;CACF;AA7DD,0DA6DC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-e2e-page-model",
|
|
3
|
-
"version": "0.2.3-rc.
|
|
3
|
+
"version": "0.2.3-rc.3",
|
|
4
4
|
"description": "A page model for testing an Axinom Mosaic Management System with Playwright.",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dev": "tsc -w"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@axinom/mosaic-e2e-ui-selectors": "^0.2.3-rc.
|
|
24
|
+
"@axinom/mosaic-e2e-ui-selectors": "^0.2.3-rc.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^14.18.0",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "786d1933dc8a9d36928595222def1c5135674dd5"
|
|
37
37
|
}
|