@axinom/mosaic-e2e-page-model 0.17.12 → 0.17.13-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.
- package/dist/cjs/index.d.ts +6 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/{index.js → cjs/index.js} +5 -5
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/managed-services/image-service/image-selection-explorer.d.ts.map +1 -0
- package/dist/cjs/managed-services/image-service/image-selection-explorer.js.map +1 -0
- package/dist/{managed-services → cjs/managed-services}/image-service/image-service.d.ts +17 -2
- package/dist/cjs/managed-services/image-service/image-service.d.ts.map +1 -0
- package/dist/{managed-services → cjs/managed-services}/image-service/image-service.js +30 -5
- package/dist/cjs/managed-services/image-service/image-service.js.map +1 -0
- package/dist/cjs/managed-services/image-service/index.d.ts +3 -0
- package/dist/cjs/managed-services/image-service/index.d.ts.map +1 -0
- package/dist/{ui-selectors → cjs/managed-services/image-service}/index.js +2 -2
- package/dist/cjs/managed-services/image-service/index.js.map +1 -0
- package/dist/cjs/managed-services/index.d.ts +3 -0
- package/dist/cjs/managed-services/index.d.ts.map +1 -0
- package/dist/{managed-services/image-service → cjs/managed-services}/index.js +2 -2
- package/dist/cjs/managed-services/index.js.map +1 -0
- package/dist/{managed-services → cjs/managed-services}/managed-service-model.d.ts +2 -2
- package/dist/cjs/managed-services/managed-service-model.d.ts.map +1 -0
- package/dist/cjs/managed-services/managed-service-model.js.map +1 -0
- package/dist/{managed-services → cjs/managed-services}/video-service.d.ts +1 -1
- package/dist/cjs/managed-services/video-service.d.ts.map +1 -0
- package/dist/{managed-services → cjs/managed-services}/video-service.js +8 -9
- package/dist/cjs/managed-services/video-service.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/{page-model.d.ts → cjs/page-model.d.ts} +4 -4
- package/dist/cjs/page-model.d.ts.map +1 -0
- package/dist/{page-model.js → cjs/page-model.js} +8 -8
- package/dist/cjs/page-model.js.map +1 -0
- package/dist/{service-model.d.ts → cjs/service-model.d.ts} +2 -2
- package/dist/cjs/service-model.d.ts.map +1 -0
- package/dist/cjs/service-model.js.map +1 -0
- package/dist/cjs/sign-in/index.d.ts +5 -0
- package/dist/cjs/sign-in/index.d.ts.map +1 -0
- package/dist/{sign-in → cjs/sign-in}/index.js +4 -4
- package/dist/cjs/sign-in/index.js.map +1 -0
- package/dist/{sign-in → cjs/sign-in}/sign-in-page.d.ts +4 -4
- package/dist/cjs/sign-in/sign-in-page.d.ts.map +1 -0
- package/dist/{sign-in → cjs/sign-in}/sign-in-page.js +6 -6
- package/dist/cjs/sign-in/sign-in-page.js.map +1 -0
- package/dist/{sign-in → cjs/sign-in}/sign-in-with-ax-auth-form.d.ts +1 -1
- package/dist/cjs/sign-in/sign-in-with-ax-auth-form.d.ts.map +1 -0
- package/dist/cjs/sign-in/sign-in-with-ax-auth-form.js.map +1 -0
- package/dist/{sign-in → cjs/sign-in}/sign-in-with-google-form.d.ts +1 -1
- package/dist/cjs/sign-in/sign-in-with-google-form.d.ts.map +1 -0
- package/dist/cjs/sign-in/sign-in-with-google-form.js.map +1 -0
- package/dist/{sign-in → cjs/sign-in}/sign-in-with-microsoft-form.d.ts +1 -1
- package/dist/cjs/sign-in/sign-in-with-microsoft-form.d.ts.map +1 -0
- package/dist/cjs/sign-in/sign-in-with-microsoft-form.js.map +1 -0
- package/dist/{ui-selectors → cjs/ui-selectors}/breadcrumbs.d.ts +1 -1
- package/dist/cjs/ui-selectors/breadcrumbs.d.ts.map +1 -0
- package/dist/cjs/ui-selectors/breadcrumbs.js.map +1 -0
- package/dist/cjs/ui-selectors/index.d.ts +3 -0
- package/dist/cjs/ui-selectors/index.d.ts.map +1 -0
- package/dist/{managed-services → cjs/ui-selectors}/index.js +2 -2
- package/dist/cjs/ui-selectors/index.js.map +1 -0
- package/dist/{ui-selectors → cjs/ui-selectors}/navigation-panel.d.ts +1 -1
- package/dist/cjs/ui-selectors/navigation-panel.d.ts.map +1 -0
- package/dist/cjs/ui-selectors/navigation-panel.js.map +1 -0
- package/dist/{ui-selectors → cjs/ui-selectors}/toast-notifications.d.ts +1 -1
- package/dist/cjs/ui-selectors/toast-notifications.d.ts.map +1 -0
- package/dist/cjs/ui-selectors/toast-notifications.js.map +1 -0
- package/dist/{ui-selectors → cjs/ui-selectors}/ui-shell-model.d.ts +4 -4
- package/dist/cjs/ui-selectors/ui-shell-model.d.ts.map +1 -0
- package/dist/{ui-selectors → cjs/ui-selectors}/ui-shell-model.js +10 -10
- package/dist/cjs/ui-selectors/ui-shell-model.js.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/managed-services/image-service/image-selection-explorer.d.ts +16 -0
- package/dist/esm/managed-services/image-service/image-selection-explorer.d.ts.map +1 -0
- package/dist/esm/managed-services/image-service/image-selection-explorer.js +38 -0
- package/dist/esm/managed-services/image-service/image-selection-explorer.js.map +1 -0
- package/dist/esm/managed-services/image-service/image-service.d.ts +80 -0
- package/dist/esm/managed-services/image-service/image-service.d.ts.map +1 -0
- package/dist/esm/managed-services/image-service/image-service.js +138 -0
- package/dist/esm/managed-services/image-service/image-service.js.map +1 -0
- package/dist/esm/managed-services/image-service/index.d.ts +3 -0
- package/dist/esm/managed-services/image-service/index.d.ts.map +1 -0
- package/dist/esm/managed-services/image-service/index.js +3 -0
- package/dist/esm/managed-services/image-service/index.js.map +1 -0
- package/dist/esm/managed-services/index.d.ts +3 -0
- package/dist/esm/managed-services/index.d.ts.map +1 -0
- package/dist/esm/managed-services/index.js +3 -0
- package/dist/esm/managed-services/index.js.map +1 -0
- package/dist/esm/managed-services/managed-service-model.d.ts +46 -0
- package/dist/esm/managed-services/managed-service-model.d.ts.map +1 -0
- package/dist/esm/managed-services/managed-service-model.js +32 -0
- package/dist/esm/managed-services/managed-service-model.js.map +1 -0
- package/dist/esm/managed-services/video-service.d.ts +107 -0
- package/dist/esm/managed-services/video-service.d.ts.map +1 -0
- package/dist/esm/managed-services/video-service.js +215 -0
- package/dist/esm/managed-services/video-service.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/page-model.d.ts +65 -0
- package/dist/esm/page-model.d.ts.map +1 -0
- package/dist/esm/page-model.js +100 -0
- package/dist/esm/page-model.js.map +1 -0
- package/dist/esm/service-model.d.ts +43 -0
- package/dist/esm/service-model.d.ts.map +1 -0
- package/dist/esm/service-model.js +30 -0
- package/dist/esm/service-model.js.map +1 -0
- package/dist/esm/sign-in/index.d.ts +5 -0
- package/dist/esm/sign-in/index.d.ts.map +1 -0
- package/dist/esm/sign-in/index.js +5 -0
- package/dist/esm/sign-in/index.js.map +1 -0
- package/dist/esm/sign-in/sign-in-page.d.ts +32 -0
- package/dist/esm/sign-in/sign-in-page.d.ts.map +1 -0
- package/dist/esm/sign-in/sign-in-page.js +32 -0
- package/dist/esm/sign-in/sign-in-page.js.map +1 -0
- package/dist/esm/sign-in/sign-in-with-ax-auth-form.d.ts +24 -0
- package/dist/esm/sign-in/sign-in-with-ax-auth-form.d.ts.map +1 -0
- package/dist/esm/sign-in/sign-in-with-ax-auth-form.js +58 -0
- package/dist/esm/sign-in/sign-in-with-ax-auth-form.js.map +1 -0
- package/dist/esm/sign-in/sign-in-with-google-form.d.ts +23 -0
- package/dist/esm/sign-in/sign-in-with-google-form.d.ts.map +1 -0
- package/dist/esm/sign-in/sign-in-with-google-form.js +48 -0
- package/dist/esm/sign-in/sign-in-with-google-form.js.map +1 -0
- package/dist/esm/sign-in/sign-in-with-microsoft-form.d.ts +24 -0
- package/dist/esm/sign-in/sign-in-with-microsoft-form.d.ts.map +1 -0
- package/dist/esm/sign-in/sign-in-with-microsoft-form.js +55 -0
- package/dist/esm/sign-in/sign-in-with-microsoft-form.js.map +1 -0
- package/dist/esm/ui-selectors/breadcrumbs.d.ts +24 -0
- package/dist/esm/ui-selectors/breadcrumbs.d.ts.map +1 -0
- package/dist/esm/ui-selectors/breadcrumbs.js +37 -0
- package/dist/esm/ui-selectors/breadcrumbs.js.map +1 -0
- package/dist/esm/ui-selectors/index.d.ts +3 -0
- package/dist/esm/ui-selectors/index.d.ts.map +1 -0
- package/dist/esm/ui-selectors/index.js +3 -0
- package/dist/esm/ui-selectors/index.js.map +1 -0
- package/dist/esm/ui-selectors/navigation-panel.d.ts +91 -0
- package/dist/esm/ui-selectors/navigation-panel.d.ts.map +1 -0
- package/dist/esm/ui-selectors/navigation-panel.js +132 -0
- package/dist/esm/ui-selectors/navigation-panel.js.map +1 -0
- package/dist/esm/ui-selectors/toast-notifications.d.ts +48 -0
- package/dist/esm/ui-selectors/toast-notifications.d.ts.map +1 -0
- package/dist/esm/ui-selectors/toast-notifications.js +64 -0
- package/dist/esm/ui-selectors/toast-notifications.js.map +1 -0
- package/dist/esm/ui-selectors/ui-shell-model.d.ts +158 -0
- package/dist/esm/ui-selectors/ui-shell-model.d.ts.map +1 -0
- package/dist/esm/ui-selectors/ui-shell-model.js +265 -0
- package/dist/esm/ui-selectors/ui-shell-model.js.map +1 -0
- package/package.json +19 -8
- package/src/index.ts +5 -5
- package/src/managed-services/image-service/image-service.ts +32 -2
- package/src/managed-services/image-service/index.ts +2 -2
- package/src/managed-services/index.ts +2 -2
- package/src/managed-services/managed-service-model.ts +2 -2
- package/src/managed-services/video-service.ts +1 -1
- package/src/page-model.ts +4 -4
- package/src/service-model.ts +2 -2
- package/src/sign-in/index.ts +4 -4
- package/src/sign-in/sign-in-page.ts +4 -4
- package/src/sign-in/sign-in-with-ax-auth-form.ts +1 -1
- package/src/sign-in/sign-in-with-google-form.ts +1 -1
- package/src/sign-in/sign-in-with-microsoft-form.ts +1 -1
- package/src/ui-selectors/breadcrumbs.ts +1 -1
- package/src/ui-selectors/index.ts +2 -2
- package/src/ui-selectors/navigation-panel.ts +1 -1
- package/src/ui-selectors/toast-notifications.ts +1 -1
- package/src/ui-selectors/ui-shell-model.ts +4 -4
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/managed-services/image-service/image-selection-explorer.d.ts.map +0 -1
- package/dist/managed-services/image-service/image-selection-explorer.js.map +0 -1
- package/dist/managed-services/image-service/image-service.d.ts.map +0 -1
- package/dist/managed-services/image-service/image-service.js.map +0 -1
- package/dist/managed-services/image-service/index.d.ts +0 -3
- package/dist/managed-services/image-service/index.d.ts.map +0 -1
- package/dist/managed-services/image-service/index.js.map +0 -1
- package/dist/managed-services/index.d.ts +0 -3
- package/dist/managed-services/index.d.ts.map +0 -1
- package/dist/managed-services/index.js.map +0 -1
- package/dist/managed-services/managed-service-model.d.ts.map +0 -1
- package/dist/managed-services/managed-service-model.js.map +0 -1
- package/dist/managed-services/video-service.d.ts.map +0 -1
- package/dist/managed-services/video-service.js.map +0 -1
- package/dist/page-model.d.ts.map +0 -1
- package/dist/page-model.js.map +0 -1
- package/dist/service-model.d.ts.map +0 -1
- package/dist/service-model.js.map +0 -1
- package/dist/sign-in/index.d.ts +0 -5
- package/dist/sign-in/index.d.ts.map +0 -1
- package/dist/sign-in/index.js.map +0 -1
- package/dist/sign-in/sign-in-page.d.ts.map +0 -1
- package/dist/sign-in/sign-in-page.js.map +0 -1
- package/dist/sign-in/sign-in-with-ax-auth-form.d.ts.map +0 -1
- package/dist/sign-in/sign-in-with-ax-auth-form.js.map +0 -1
- package/dist/sign-in/sign-in-with-google-form.d.ts.map +0 -1
- package/dist/sign-in/sign-in-with-google-form.js.map +0 -1
- package/dist/sign-in/sign-in-with-microsoft-form.d.ts.map +0 -1
- package/dist/sign-in/sign-in-with-microsoft-form.js.map +0 -1
- package/dist/ui-selectors/breadcrumbs.d.ts.map +0 -1
- package/dist/ui-selectors/breadcrumbs.js.map +0 -1
- package/dist/ui-selectors/index.d.ts +0 -3
- package/dist/ui-selectors/index.d.ts.map +0 -1
- package/dist/ui-selectors/index.js.map +0 -1
- package/dist/ui-selectors/navigation-panel.d.ts.map +0 -1
- package/dist/ui-selectors/navigation-panel.js.map +0 -1
- package/dist/ui-selectors/toast-notifications.d.ts.map +0 -1
- package/dist/ui-selectors/toast-notifications.js.map +0 -1
- package/dist/ui-selectors/ui-shell-model.d.ts.map +0 -1
- package/dist/ui-selectors/ui-shell-model.js.map +0 -1
- /package/dist/{managed-services → cjs/managed-services}/image-service/image-selection-explorer.d.ts +0 -0
- /package/dist/{managed-services → cjs/managed-services}/image-service/image-selection-explorer.js +0 -0
- /package/dist/{managed-services → cjs/managed-services}/managed-service-model.js +0 -0
- /package/dist/{service-model.js → cjs/service-model.js} +0 -0
- /package/dist/{sign-in → cjs/sign-in}/sign-in-with-ax-auth-form.js +0 -0
- /package/dist/{sign-in → cjs/sign-in}/sign-in-with-google-form.js +0 -0
- /package/dist/{sign-in → cjs/sign-in}/sign-in-with-microsoft-form.js +0 -0
- /package/dist/{ui-selectors → cjs/ui-selectors}/breadcrumbs.js +0 -0
- /package/dist/{ui-selectors → cjs/ui-selectors}/navigation-panel.js +0 -0
- /package/dist/{ui-selectors → cjs/ui-selectors}/toast-notifications.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-page.d.ts","sourceRoot":"","sources":["../../../src/sign-in/sign-in-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,4CAA4C;AAC5C,qBAAa,UAAU;IAEnB,kCAAkC;IAClC,OAAO,CAAC,IAAI;;IADZ,kCAAkC;IAC1B,IAAI,EAAE,IAAI;IAGpB,kFAAkF;IAClF,QAAQ,CAAC,OAAO,aAA6D;IAE7E,qDAAqD;IACrD,QAAQ,CAAC,YAAY,oCAEnB;IAEF,QAAQ,CAAC,gBAAgB,oCAEvB;IACF,QAAQ,CAAC,mBAAmB,oCAE1B;IAEF,qDAAqD;IACrD,QAAQ,CAAC,YAAY,oCAEnB;IAEF,wDAAwD;IACxD,QAAQ,CAAC,eAAe,oCAEtB;IAEF,qDAAqD;IACrD,QAAQ,CAAC,YAAY,oCAEnB;IAEF,0CAA0C;IAC1C,QAAQ,CAAC,UAAU,uBAAuC;IAE1D,0CAA0C;IAC1C,QAAQ,CAAC,UAAU,uBAAuC;IAE1D,6CAA6C;IAC7C,QAAQ,CAAC,aAAa,0BAA0C;CACjE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MessageBar } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import {} from '@playwright/test';
|
|
3
|
+
import { SignInWithAxAuthForm } from './sign-in-with-ax-auth-form.js';
|
|
4
|
+
import { SignInWithGoogleForm } from './sign-in-with-google-form.js';
|
|
5
|
+
import { SignInWithMicrosoftForm } from './sign-in-with-microsoft-form.js';
|
|
6
|
+
/** A model for management system sign-in */
|
|
7
|
+
export class SignInPage {
|
|
8
|
+
constructor(
|
|
9
|
+
/** The playwright page object. */
|
|
10
|
+
page) {
|
|
11
|
+
this.page = page;
|
|
12
|
+
/** A locator to a message which is displayed when the environment is disabled. */
|
|
13
|
+
this.message = new MessageBar(this.page, '//*[@data-test-id="message"]');
|
|
14
|
+
/** A locator to the "Sign in with AxAuth" button. */
|
|
15
|
+
this.axAuthButton = this.page.locator('//*[@data-test-id="login-with:AX_AUTH"]');
|
|
16
|
+
this.axAuthemailField = this.page.locator('//input[@data-test-id="login-username"]');
|
|
17
|
+
this.axAuthpasswordField = this.page.locator('//input[@data-test-id="login-password"]');
|
|
18
|
+
/** A locator to the "Sign in with Google" button. */
|
|
19
|
+
this.googleButton = this.page.locator('//*[@data-test-id="login-with:GOOGLE"]');
|
|
20
|
+
/** A locator to the "Sign in with Microsoft" button. */
|
|
21
|
+
this.microsoftButton = this.page.locator('//*[@data-test-id="login-with:AZURE_AD"]');
|
|
22
|
+
/** A locator to the "Sign in with Axinom" button. */
|
|
23
|
+
this.axinomButton = this.page.locator('//*[@data-test-id="login-with:AXINOM"]');
|
|
24
|
+
/** A model for the AxAuth sign-in form */
|
|
25
|
+
this.axAuthForm = new SignInWithAxAuthForm(this.page);
|
|
26
|
+
/** A model for the Google sign-in form */
|
|
27
|
+
this.googleForm = new SignInWithGoogleForm(this.page);
|
|
28
|
+
/** A model for the Microsoft sign-in form */
|
|
29
|
+
this.microsoftForm = new SignInWithMicrosoftForm(this.page);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=sign-in-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-page.js","sourceRoot":"","sources":["../../../src/sign-in/sign-in-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,4CAA4C;AAC5C,MAAM,OAAO,UAAU;IACrB;IACE,kCAAkC;IAC1B,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;QAGpB,kFAAkF;QACzE,YAAO,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC;QAE7E,qDAAqD;QAC5C,iBAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CACvC,yCAAyC,CAC1C,CAAC;QAEO,qBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAC3C,yCAAyC,CAC1C,CAAC;QACO,wBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAC9C,yCAAyC,CAC1C,CAAC;QAEF,qDAAqD;QAC5C,iBAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CACvC,wCAAwC,CACzC,CAAC;QAEF,wDAAwD;QAC/C,oBAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAC1C,0CAA0C,CAC3C,CAAC;QAEF,qDAAqD;QAC5C,iBAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CACvC,wCAAwC,CACzC,CAAC;QAEF,0CAA0C;QACjC,eAAU,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE1D,0CAA0C;QACjC,eAAU,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE1D,6CAA6C;QACpC,kBAAa,GAAG,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAvC7D,CAAC;CAwCL"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import { type Page } from '@playwright/test';
|
|
3
|
+
/** A model for the AxAuth sign-in form */
|
|
4
|
+
export declare class SignInWithAxAuthForm extends ComponentModel {
|
|
5
|
+
constructor(page: Page);
|
|
6
|
+
/** A locator to a message displayed on authentication failure. */
|
|
7
|
+
readonly errorMessage: import("playwright-core").Locator;
|
|
8
|
+
/**
|
|
9
|
+
* This method signs in with axauth credentials.
|
|
10
|
+
* The AxAuth sign-in form must be displayed before using this method.
|
|
11
|
+
* Authentication failure due to bad credentials will result in an exception.
|
|
12
|
+
*
|
|
13
|
+
* The following steps will be taken:
|
|
14
|
+
* - Enter email and password
|
|
15
|
+
* - Click 'Sign-in'
|
|
16
|
+
* - Click 'Agree and Continue'
|
|
17
|
+
* - Wait for the form to be detached
|
|
18
|
+
*/
|
|
19
|
+
authenticate(credentials: {
|
|
20
|
+
email: string;
|
|
21
|
+
password: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sign-in-with-ax-auth-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-with-ax-auth-form.d.ts","sourceRoot":"","sources":["../../../src/sign-in/sign-in-with-ax-auth-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,0CAA0C;AAC1C,qBAAa,oBAAqB,SAAQ,cAAc;gBAC1C,IAAI,EAAE,IAAI;IAKtB,kEAAkE;IAClE,QAAQ,CAAC,YAAY,oCAEnB;IAEF;;;;;;;;;;OAUG;IACG,YAAY,CAAC,WAAW,EAAE;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;CA+ClB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import {} from '@playwright/test';
|
|
3
|
+
/** A model for the AxAuth sign-in form */
|
|
4
|
+
export class SignInWithAxAuthForm extends ComponentModel {
|
|
5
|
+
constructor(page) {
|
|
6
|
+
// Base xpath for all selectors on this page.
|
|
7
|
+
super(page, '//div[@id="signIn"]');
|
|
8
|
+
/** A locator to a message displayed on authentication failure. */
|
|
9
|
+
this.errorMessage = this.getLocator('//*[@data-test-id="login-error-message"]');
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* This method signs in with axauth credentials.
|
|
13
|
+
* The AxAuth sign-in form must be displayed before using this method.
|
|
14
|
+
* Authentication failure due to bad credentials will result in an exception.
|
|
15
|
+
*
|
|
16
|
+
* The following steps will be taken:
|
|
17
|
+
* - Enter email and password
|
|
18
|
+
* - Click 'Sign-in'
|
|
19
|
+
* - Click 'Agree and Continue'
|
|
20
|
+
* - Wait for the form to be detached
|
|
21
|
+
*/
|
|
22
|
+
async authenticate(credentials) {
|
|
23
|
+
const emailField = this.getLocator('//input[@data-test-id="login-username"]');
|
|
24
|
+
const passwordField = this.getLocator('//input[@data-test-id="login-password"]');
|
|
25
|
+
const signInButton = this.getLocator('//button[@data-test-id="signin-button"]');
|
|
26
|
+
const title = this.getLocator('//*[@data-test-id="landing-page-title"]');
|
|
27
|
+
// const agreeAndContinueButton = this.getLocator(
|
|
28
|
+
// '//*[@data-test-id="agree-button"]',
|
|
29
|
+
// );
|
|
30
|
+
// const errorOrAgreeAndContinueButton = this.getLocator(
|
|
31
|
+
// '//*[@data-test-id="error" or @data-test-id="agree-button"]',
|
|
32
|
+
// );
|
|
33
|
+
// enter email and password
|
|
34
|
+
await emailField.waitFor({ state: 'visible' });
|
|
35
|
+
await emailField.fill(credentials.email);
|
|
36
|
+
await passwordField.fill(credentials.password);
|
|
37
|
+
await signInButton.click();
|
|
38
|
+
try {
|
|
39
|
+
await signInButton.isDisabled();
|
|
40
|
+
await Promise.race([
|
|
41
|
+
this.errorMessage.waitFor({ state: 'visible' }),
|
|
42
|
+
signInButton.waitFor({ state: 'detached' }),
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
throw new Error(await this.errorMessage.innerText());
|
|
47
|
+
}
|
|
48
|
+
// await errorOrAgreeAndContinueButton.waitFor({ state: 'visible' });
|
|
49
|
+
// if (await this.errorMessage.isVisible()) {
|
|
50
|
+
// throw new Error(await this.errorMessage.innerText());
|
|
51
|
+
// }
|
|
52
|
+
// agree with terms
|
|
53
|
+
// await agreeAndContinueButton.click();
|
|
54
|
+
// wait for login to complete
|
|
55
|
+
// await agreeAndContinueButton.waitFor({ state: 'detached' });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=sign-in-with-ax-auth-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-with-ax-auth-form.js","sourceRoot":"","sources":["../../../src/sign-in/sign-in-with-ax-auth-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAa,MAAM,kBAAkB,CAAC;AAE7C,0CAA0C;AAC1C,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IACtD,YAAY,IAAU;QACpB,6CAA6C;QAC7C,KAAK,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;QAGrC,kEAAkE;QACzD,iBAAY,GAAG,IAAI,CAAC,UAAU,CACrC,0CAA0C,CAC3C,CAAC;IALF,CAAC;IAOD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,YAAY,CAAC,WAGlB;QACC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAChC,yCAAyC,CAC1C,CAAC;QACF,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CACnC,yCAAyC,CAC1C,CAAC;QACF,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAClC,yCAAyC,CAC1C,CAAC;QAEF,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,yCAAyC,CAAC,CAAC;QAEzE,kDAAkD;QAClD,yCAAyC;QACzC,KAAK;QAEL,yDAAyD;QACzD,kEAAkE;QAClE,KAAK;QAEL,2BAA2B;QAC3B,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/C,MAAM,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC;YACH,MAAM,YAAY,CAAC,UAAU,EAAE,CAAC;YAChC,MAAM,OAAO,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;gBAC/C,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;aAC5C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,qEAAqE;QACrE,6CAA6C;QAC7C,0DAA0D;QAC1D,IAAI;QAEJ,mBAAmB;QACnB,wCAAwC;QAExC,6BAA6B;QAC7B,+DAA+D;IACjE,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import { type Page } from '@playwright/test';
|
|
3
|
+
/** A model for the Google sign-in form */
|
|
4
|
+
export declare class SignInWithGoogleForm extends ComponentModel {
|
|
5
|
+
constructor(page: Page);
|
|
6
|
+
/** A locator to a message displayed on authentication failure. */
|
|
7
|
+
readonly errorMessage: import("playwright-core").Locator;
|
|
8
|
+
/**
|
|
9
|
+
* This method signs in with google.
|
|
10
|
+
* The Google sign-in form must be displayed before using this method.
|
|
11
|
+
* Authentication failure due to bad credentials will result in an exception.
|
|
12
|
+
*
|
|
13
|
+
* The following steps will be taken:
|
|
14
|
+
* - Enter email and click 'Next'
|
|
15
|
+
* - Enter the password and click 'Next'
|
|
16
|
+
* - Wait for the form to be detached
|
|
17
|
+
*/
|
|
18
|
+
authenticate(credentials: {
|
|
19
|
+
email: string;
|
|
20
|
+
password: string;
|
|
21
|
+
}): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sign-in-with-google-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-with-google-form.d.ts","sourceRoot":"","sources":["../../../src/sign-in/sign-in-with-google-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,0CAA0C;AAC1C,qBAAa,oBAAqB,SAAQ,cAAc;gBAC1C,IAAI,EAAE,IAAI;IAMtB,kEAAkE;IAClE,QAAQ,CAAC,YAAY,oCAEnB;IAEF;;;;;;;;;OASG;IACG,YAAY,CAAC,WAAW,EAAE;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;CAyBlB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import {} from '@playwright/test';
|
|
3
|
+
/** A model for the Google sign-in form */
|
|
4
|
+
export class SignInWithGoogleForm extends ComponentModel {
|
|
5
|
+
constructor(page) {
|
|
6
|
+
// Base xpath for all selectors on this page.
|
|
7
|
+
// We check that the 'head/base' element has href: 'accounts.google.com'
|
|
8
|
+
super(page, '//html[./head/base[contains(@href, "accounts.google.com")]]');
|
|
9
|
+
/** A locator to a message displayed on authentication failure. */
|
|
10
|
+
this.errorMessage = this.getLocator('//form//*[@aria-live="assertive"]//span');
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This method signs in with google.
|
|
14
|
+
* The Google sign-in form must be displayed before using this method.
|
|
15
|
+
* Authentication failure due to bad credentials will result in an exception.
|
|
16
|
+
*
|
|
17
|
+
* The following steps will be taken:
|
|
18
|
+
* - Enter email and click 'Next'
|
|
19
|
+
* - Enter the password and click 'Next'
|
|
20
|
+
* - Wait for the form to be detached
|
|
21
|
+
*/
|
|
22
|
+
async authenticate(credentials) {
|
|
23
|
+
const emailField = this.getLocator('//input[@type="email"]');
|
|
24
|
+
const nextBtn = this.getLocator('//*[@id="identifierNext"]/div/button');
|
|
25
|
+
const passwordField = this.getLocator('//input[@name="password"]');
|
|
26
|
+
const signInButton = this.getLocator('//*[@id="passwordNext"]//button');
|
|
27
|
+
// enter email
|
|
28
|
+
await emailField.waitFor({ state: 'visible' });
|
|
29
|
+
await emailField.fill(credentials.email);
|
|
30
|
+
await nextBtn.click();
|
|
31
|
+
try {
|
|
32
|
+
await passwordField.waitFor({ state: 'visible' });
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
throw new Error('Bad email.');
|
|
36
|
+
}
|
|
37
|
+
// enter password
|
|
38
|
+
await passwordField.fill(credentials.password);
|
|
39
|
+
await signInButton.click();
|
|
40
|
+
try {
|
|
41
|
+
await signInButton.waitFor({ state: 'hidden' });
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
throw new Error('Bad password.');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=sign-in-with-google-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-with-google-form.js","sourceRoot":"","sources":["../../../src/sign-in/sign-in-with-google-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAa,MAAM,kBAAkB,CAAC;AAE7C,0CAA0C;AAC1C,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IACtD,YAAY,IAAU;QACpB,6CAA6C;QAC7C,wEAAwE;QACxE,KAAK,CAAC,IAAI,EAAE,6DAA6D,CAAC,CAAC;QAG7E,kEAAkE;QACzD,iBAAY,GAAG,IAAI,CAAC,UAAU,CACrC,yCAAyC,CAC1C,CAAC;IALF,CAAC;IAOD;;;;;;;;;OASG;IACH,KAAK,CAAC,YAAY,CAAC,WAGlB;QACC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAC7D,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,sCAAsC,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;QACnE,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC;QAExE,cAAc;QACd,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/C,MAAM,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,iBAAiB;QACjB,MAAM,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC;YACH,MAAM,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import { type Page } from '@playwright/test';
|
|
3
|
+
/** A model for the Microsoft sign-in form */
|
|
4
|
+
export declare class SignInWithMicrosoftForm extends ComponentModel {
|
|
5
|
+
constructor(page: Page);
|
|
6
|
+
/** A locator to a message displayed on authentication failure. */
|
|
7
|
+
readonly errorMessage: import("playwright-core").Locator;
|
|
8
|
+
/**
|
|
9
|
+
* This method signs in with microsoft.
|
|
10
|
+
* The Microsoft sign-in form must be displayed before using this method.
|
|
11
|
+
* Authentication failure due to bad credentials will result in an exception.
|
|
12
|
+
*
|
|
13
|
+
* The following steps will be taken:
|
|
14
|
+
* - Enter email and click 'Next'
|
|
15
|
+
* - Enter the password and click 'Sign in'
|
|
16
|
+
* - Click 'Accept' if 'Accept Permissions' page is displayed. Otherwise click 'Yes' if 'Stay Signed In' page is displayed
|
|
17
|
+
* - Wait for the form to be detached
|
|
18
|
+
*/
|
|
19
|
+
authenticate(credentials: {
|
|
20
|
+
username: string;
|
|
21
|
+
password: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sign-in-with-microsoft-form.d.ts.map
|
|
@@ -0,0 +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,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,6CAA6C;AAC7C,qBAAa,uBAAwB,SAAQ,cAAc;gBAC7C,IAAI,EAAE,IAAI;IAStB,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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import {} from '@playwright/test';
|
|
3
|
+
/** A model for the Microsoft sign-in form */
|
|
4
|
+
export class SignInWithMicrosoftForm extends ComponentModel {
|
|
5
|
+
constructor(page) {
|
|
6
|
+
// Base xpath for all selectors on this page.
|
|
7
|
+
// We look for a form which has an image with alt=Microsoft
|
|
8
|
+
super(page, '//form[contains(@action, "https://login.microsoftonline.com/")]');
|
|
9
|
+
/** A locator to a message displayed on authentication failure. */
|
|
10
|
+
this.errorMessage = this.getLocator('//*[@id="usernameError" or @id="passwordError"]');
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This method signs in with microsoft.
|
|
14
|
+
* The Microsoft sign-in form must be displayed before using this method.
|
|
15
|
+
* Authentication failure due to bad credentials will result in an exception.
|
|
16
|
+
*
|
|
17
|
+
* The following steps will be taken:
|
|
18
|
+
* - Enter email and click 'Next'
|
|
19
|
+
* - Enter the password and click 'Sign in'
|
|
20
|
+
* - Click 'Accept' if 'Accept Permissions' page is displayed. Otherwise click 'Yes' if 'Stay Signed In' page is displayed
|
|
21
|
+
* - Wait for the form to be detached
|
|
22
|
+
*/
|
|
23
|
+
async authenticate(credentials) {
|
|
24
|
+
const usernameField = this.getLocator('//input[@name="loginfmt"]');
|
|
25
|
+
const nextBtn = this.getLocator('//input[@value="Next"]');
|
|
26
|
+
const passwordField = this.getLocator('//input[@name="passwd"]');
|
|
27
|
+
const signInButton = this.getLocator('//input[@value="Sign in"]');
|
|
28
|
+
// 'Accept Permissions' page will be displayed with an 'Accept' button if the user has not previously accepted permissions
|
|
29
|
+
// Otherwise, 'Stay Signed In' page will be displayed with a 'Yes' button
|
|
30
|
+
// Therefore we use a hybrid locator which works for either of those 2 buttons
|
|
31
|
+
const continueButton = this.getLocator('//input[@value="Accept"] | //input[@value="Yes"]');
|
|
32
|
+
// enter username
|
|
33
|
+
await usernameField.waitFor({ state: 'visible' });
|
|
34
|
+
await usernameField.fill(credentials.username);
|
|
35
|
+
await nextBtn.click();
|
|
36
|
+
try {
|
|
37
|
+
await signInButton.waitFor({ state: 'visible' });
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
throw new Error('Bad username.');
|
|
41
|
+
}
|
|
42
|
+
// enter password
|
|
43
|
+
await passwordField.fill(credentials.password);
|
|
44
|
+
await signInButton.click();
|
|
45
|
+
try {
|
|
46
|
+
continueButton.waitFor({ state: 'visible' });
|
|
47
|
+
await continueButton.click();
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
throw new Error('Bad password.');
|
|
51
|
+
}
|
|
52
|
+
await continueButton.waitFor({ state: 'detached' });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=sign-in-with-microsoft-form.js.map
|
|
@@ -0,0 +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,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAa,MAAM,kBAAkB,CAAC;AAE7C,6CAA6C;AAC7C,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IACzD,YAAY,IAAU;QACpB,6CAA6C;QAC7C,2DAA2D;QAC3D,KAAK,CACH,IAAI,EACJ,iEAAiE,CAClE,CAAC;QAGJ,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;QAElE,0HAA0H;QAC1H,yEAAyE;QACzE,8EAA8E;QAC9E,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CACpC,kDAAkD,CACnD,CAAC;QAEF,iBAAiB;QACjB,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAClD,MAAM,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,MAAM,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACnD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QAED,iBAAiB;QACjB,MAAM,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC;YACH,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAC7C,MAAM,cAAc,CAAC,KAAK,EAAE,CAAC;QAC/B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QAED,MAAM,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import { type FrameLocator, type Locator, type Page } from '@playwright/test';
|
|
3
|
+
/**
|
|
4
|
+
* A model for a Breadcrumbs bar with methods to retrieve individual breadcrumbs.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Breadcrumbs extends ComponentModel {
|
|
7
|
+
/**
|
|
8
|
+
* A model for a breadcrumbs bar with methods to retrieve individual breadcrumbs.
|
|
9
|
+
* @param parent The playwright page or frame.
|
|
10
|
+
* @param xpath An absolute XPath selector to this element. Default: //*[@data-test-id="breadcrumbs"]
|
|
11
|
+
*/
|
|
12
|
+
constructor(parent: Page | FrameLocator, xpath?: string);
|
|
13
|
+
/** This method expands the drop-down menu if it is visible enabling hidden breadcrumbs to be selected. */
|
|
14
|
+
expand(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* This method finds a breadcrumb by position. Position is 1 indexed. Negative numbers count from the end.
|
|
17
|
+
*/
|
|
18
|
+
getBreadcrumb(position: number): Locator;
|
|
19
|
+
/** The method finds a breadcrumb by label. The label must match exactly. */
|
|
20
|
+
getBreadcrumbByLabel(label: string): Locator;
|
|
21
|
+
/** The method finds a breadcrumb by URL. The URL must match exactly. */
|
|
22
|
+
getBreadcrumbByURL(url: string): Locator;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/ui-selectors/breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE9E;;GAEG;AACH,qBAAa,WAAY,SAAQ,cAAc;IAC7C;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,EAC3B,KAAK,SAAqC;IAK5C,0GAA0G;IACpG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAS7B;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIxC,4EAA4E;IAC5E,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAM5C,wEAAwE;IACxE,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAGzC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import {} from '@playwright/test';
|
|
3
|
+
/**
|
|
4
|
+
* A model for a Breadcrumbs bar with methods to retrieve individual breadcrumbs.
|
|
5
|
+
*/
|
|
6
|
+
export class Breadcrumbs extends ComponentModel {
|
|
7
|
+
/**
|
|
8
|
+
* A model for a breadcrumbs bar with methods to retrieve individual breadcrumbs.
|
|
9
|
+
* @param parent The playwright page or frame.
|
|
10
|
+
* @param xpath An absolute XPath selector to this element. Default: //*[@data-test-id="breadcrumbs"]
|
|
11
|
+
*/
|
|
12
|
+
constructor(parent, xpath = '//*[@data-test-id="breadcrumbs"]') {
|
|
13
|
+
super(parent, xpath);
|
|
14
|
+
}
|
|
15
|
+
/** This method expands the drop-down menu if it is visible enabling hidden breadcrumbs to be selected. */
|
|
16
|
+
async expand() {
|
|
17
|
+
const dropdown = this.getLocator('//*[@data-test-id="breadcrumbs-dropdown"]');
|
|
18
|
+
if (await dropdown.isVisible()) {
|
|
19
|
+
await dropdown.hover();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* This method finds a breadcrumb by position. Position is 1 indexed. Negative numbers count from the end.
|
|
24
|
+
*/
|
|
25
|
+
getBreadcrumb(position) {
|
|
26
|
+
return this.getLocator('//a', position);
|
|
27
|
+
}
|
|
28
|
+
/** The method finds a breadcrumb by label. The label must match exactly. */
|
|
29
|
+
getBreadcrumbByLabel(label) {
|
|
30
|
+
return this.getLocator(`//a[.//*[@data-test-id="breadcrumb-label" and text()="${label}"]]`);
|
|
31
|
+
}
|
|
32
|
+
/** The method finds a breadcrumb by URL. The URL must match exactly. */
|
|
33
|
+
getBreadcrumbByURL(url) {
|
|
34
|
+
return this.getLocator(`//a[@href="${url}"]`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../src/ui-selectors/breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAA8C,MAAM,kBAAkB,CAAC;AAE9E;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,cAAc;IAC7C;;;;OAIG;IACH,YACE,MAA2B,EAC3B,KAAK,GAAG,kCAAkC;QAE1C,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,0GAA0G;IAC1G,KAAK,CAAC,MAAM;QACV,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAC9B,2CAA2C,CAC5C,CAAC;QACF,IAAI,MAAM,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC;YAC/B,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,QAAgB;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED,4EAA4E;IAC5E,oBAAoB,CAAC,KAAa;QAChC,OAAO,IAAI,CAAC,UAAU,CACpB,yDAAyD,KAAK,KAAK,CACpE,CAAC;IACJ,CAAC;IAED,wEAAwE;IACxE,kBAAkB,CAAC,GAAW;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui-selectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui-selectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import { type FrameLocator, type Locator, type Page } from '@playwright/test';
|
|
3
|
+
/**
|
|
4
|
+
* A model for Shell apps Navigation Panel
|
|
5
|
+
*/
|
|
6
|
+
export declare class NavigationPanel extends ComponentModel {
|
|
7
|
+
/** A locator for navigation panel */
|
|
8
|
+
readonly panel: Locator;
|
|
9
|
+
constructor(parent: Page | FrameLocator, xpath?: string);
|
|
10
|
+
/**
|
|
11
|
+
* Gets navigation category by position
|
|
12
|
+
* @param position 1-based index. Negative numbers count from the end.
|
|
13
|
+
*/
|
|
14
|
+
getCategory(position: number): NavigationCategory;
|
|
15
|
+
/**
|
|
16
|
+
* Gets navigation category by matching category label text
|
|
17
|
+
* @param label Text of the category item label
|
|
18
|
+
* @param nth 1-based index. Negative numbers count from the end.
|
|
19
|
+
*/
|
|
20
|
+
getCategoryByLabel(label: string, nth?: number): NavigationCategory;
|
|
21
|
+
/**
|
|
22
|
+
* Gets navigation item group by matching data-test-id attribute
|
|
23
|
+
* @param id Value of item groups `data-test-id` attribute
|
|
24
|
+
* @param nth 1-based index. Negative numbers count from the end.
|
|
25
|
+
*/
|
|
26
|
+
getNavigationItemGroupById(id: string, nth?: number): NavigationItemGroup;
|
|
27
|
+
/**
|
|
28
|
+
* Gets navigation item by matching data-test-id attribute
|
|
29
|
+
* @param id Value of items `data-test-id` attribute
|
|
30
|
+
* @param nth 1-based index. Negative numbers count from the end.
|
|
31
|
+
*/
|
|
32
|
+
getNavigationItemById(id: string, nth?: number): Locator;
|
|
33
|
+
}
|
|
34
|
+
export declare class NavigationCategory extends ComponentModel {
|
|
35
|
+
/** Label of navigation category */
|
|
36
|
+
readonly label: Locator;
|
|
37
|
+
/**
|
|
38
|
+
* Gets navigation item group by position
|
|
39
|
+
* @param position 1-based index. Negative numbers count from the end.
|
|
40
|
+
*/
|
|
41
|
+
getNavigationItemGroup(position: number): NavigationItemGroup;
|
|
42
|
+
/**
|
|
43
|
+
* Gets navigation item group by matching groups label text in category
|
|
44
|
+
* @param label Navigation item label text to use for matches
|
|
45
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `label`, defaults to 1
|
|
46
|
+
*/
|
|
47
|
+
getNavigationItemGroupByLabel(label: string, nth?: number): NavigationItemGroup;
|
|
48
|
+
/**
|
|
49
|
+
* Gets navigation item by matching label text in the navigation category
|
|
50
|
+
* @param label Text of the navigation item label
|
|
51
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `label`, defaults to 1
|
|
52
|
+
*/
|
|
53
|
+
getNavigationItemByLabel(label: string, nth?: number): Locator;
|
|
54
|
+
}
|
|
55
|
+
export declare class NavigationItemGroup extends ComponentModel {
|
|
56
|
+
readonly label: Locator;
|
|
57
|
+
/** A locator to the navigation items root container */
|
|
58
|
+
readonly navItemRoot: Locator;
|
|
59
|
+
/** A locator to the expand/collapse button */
|
|
60
|
+
readonly expandButton: Locator;
|
|
61
|
+
/** A locator to the child item container */
|
|
62
|
+
readonly childItemContainer: Locator;
|
|
63
|
+
/**
|
|
64
|
+
* Expands child items in navigation group
|
|
65
|
+
* Does nothing in case group already expanded
|
|
66
|
+
*/
|
|
67
|
+
expand(): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Collapses child item container in navigation group
|
|
70
|
+
* Does nothing in case group already collapsed
|
|
71
|
+
*/
|
|
72
|
+
collapse(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Gets navigation item by position in navigation group.
|
|
75
|
+
* @param position 1-based index. Negative numbers count from the end.
|
|
76
|
+
*/
|
|
77
|
+
getNavItem(position: number): Locator;
|
|
78
|
+
/**
|
|
79
|
+
* Gets navigation item by matching data-test-id attribute
|
|
80
|
+
* @param id Value of navigation items data-test-id attribute
|
|
81
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `data-test-id`, defaults to 1
|
|
82
|
+
*/
|
|
83
|
+
getNavItemById(id: string, nth?: number): Locator;
|
|
84
|
+
/**
|
|
85
|
+
* Gets navigation item by matching label text in the navigation group
|
|
86
|
+
* @param label Navigation item label text
|
|
87
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `label`, defaults to 1
|
|
88
|
+
*/
|
|
89
|
+
getNavItemByLabel(label: string, nth?: number): Locator;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=navigation-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-panel.d.ts","sourceRoot":"","sources":["../../../src/ui-selectors/navigation-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAK9E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IACjD,qCAAqC;IACrC,QAAQ,CAAC,KAAK,UAAqB;gBAGjC,MAAM,EAAE,IAAI,GAAG,YAAY,EAC3B,KAAK,SAA0C;IAKjD;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB;IAQjD;;;;OAIG;IACH,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,kBAAkB;IAQ9D;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,mBAAmB;IAQpE;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,OAAO;CAGpD;AAED,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,mCAAmC;IACnC,QAAQ,CAAC,KAAK,UAA0D;IAExE;;;OAGG;IACH,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB;IAQ7D;;;;OAIG;IACH,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,mBAAmB;IAQ1E;;;;OAIG;IACH,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,OAAO;CAM1D;AAED,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,QAAQ,CAAC,KAAK,UAA0D;IAExE,uDAAuD;IACvD,QAAQ,CAAC,WAAW,UAElB;IAEF,8CAA8C;IAC9C,QAAQ,CAAC,YAAY,UAAkD;IAEvE,4CAA4C;IAC5C,QAAQ,CAAC,kBAAkB,UAEzB;IAEF;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ7B;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B;;;OAGG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIrC;;;;OAIG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,OAAO;IAI5C;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,OAAO;CAMnD"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { ComponentModel } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
+
import {} from '@playwright/test';
|
|
3
|
+
const navItemXPath = (id) => `//*[@data-test-id="root-item-container"]//a[.//*[@data-test-id="${id}"]]`;
|
|
4
|
+
/**
|
|
5
|
+
* A model for Shell apps Navigation Panel
|
|
6
|
+
*/
|
|
7
|
+
export class NavigationPanel extends ComponentModel {
|
|
8
|
+
constructor(parent, xpath = '//*[@data-test-id="navigation-panel"]') {
|
|
9
|
+
super(parent, xpath);
|
|
10
|
+
/** A locator for navigation panel */
|
|
11
|
+
this.panel = this.getLocator();
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets navigation category by position
|
|
15
|
+
* @param position 1-based index. Negative numbers count from the end.
|
|
16
|
+
*/
|
|
17
|
+
getCategory(position) {
|
|
18
|
+
return new NavigationCategory(this, '//*[@data-test-id="category"]', position);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gets navigation category by matching category label text
|
|
22
|
+
* @param label Text of the category item label
|
|
23
|
+
* @param nth 1-based index. Negative numbers count from the end.
|
|
24
|
+
*/
|
|
25
|
+
getCategoryByLabel(label, nth = 1) {
|
|
26
|
+
return new NavigationCategory(this, `//*[@data-test-id="category"][.//*[@data-test-id="category-label" and text()="${label}"]]`, nth);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Gets navigation item group by matching data-test-id attribute
|
|
30
|
+
* @param id Value of item groups `data-test-id` attribute
|
|
31
|
+
* @param nth 1-based index. Negative numbers count from the end.
|
|
32
|
+
*/
|
|
33
|
+
getNavigationItemGroupById(id, nth = 1) {
|
|
34
|
+
return new NavigationItemGroup(this, `//*[@data-test-id="root-item-container"][.//*[@data-test-id="${id}"]]`, nth);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Gets navigation item by matching data-test-id attribute
|
|
38
|
+
* @param id Value of items `data-test-id` attribute
|
|
39
|
+
* @param nth 1-based index. Negative numbers count from the end.
|
|
40
|
+
*/
|
|
41
|
+
getNavigationItemById(id, nth = 1) {
|
|
42
|
+
return this.getLocator(navItemXPath(id), nth);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export class NavigationCategory extends ComponentModel {
|
|
46
|
+
constructor() {
|
|
47
|
+
super(...arguments);
|
|
48
|
+
/** Label of navigation category */
|
|
49
|
+
this.label = this.getLocator(`//*[@data-test-id="category-label"]`);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gets navigation item group by position
|
|
53
|
+
* @param position 1-based index. Negative numbers count from the end.
|
|
54
|
+
*/
|
|
55
|
+
getNavigationItemGroup(position) {
|
|
56
|
+
return new NavigationItemGroup(this, '//*[@data-test-id="root-item-container"]', position);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Gets navigation item group by matching groups label text in category
|
|
60
|
+
* @param label Navigation item label text to use for matches
|
|
61
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `label`, defaults to 1
|
|
62
|
+
*/
|
|
63
|
+
getNavigationItemGroupByLabel(label, nth = 1) {
|
|
64
|
+
return new NavigationItemGroup(this, `//*[@data-test-id="root-item-container"][.//*[@data-test-id="nav-item-label" and text()="${label}"]]`, nth);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Gets navigation item by matching label text in the navigation category
|
|
68
|
+
* @param label Text of the navigation item label
|
|
69
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `label`, defaults to 1
|
|
70
|
+
*/
|
|
71
|
+
getNavigationItemByLabel(label, nth = 1) {
|
|
72
|
+
return this.getLocator(`//*[@data-test-id="root-item-container"][.//*[@data-test-id="nav-item-label" and text()="${label}"]]`, nth);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export class NavigationItemGroup extends ComponentModel {
|
|
76
|
+
constructor() {
|
|
77
|
+
super(...arguments);
|
|
78
|
+
this.label = this.getLocator(`//*[@data-test-id="category-label"]`);
|
|
79
|
+
/** A locator to the navigation items root container */
|
|
80
|
+
this.navItemRoot = this.getLocator('//*[@data-test-id="root-item-container"]');
|
|
81
|
+
/** A locator to the expand/collapse button */
|
|
82
|
+
this.expandButton = this.getLocator('//*[@data-test-id="button"]');
|
|
83
|
+
/** A locator to the child item container */
|
|
84
|
+
this.childItemContainer = this.getLocator('//*[@data-test-id="child-item-container"]');
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Expands child items in navigation group
|
|
88
|
+
* Does nothing in case group already expanded
|
|
89
|
+
*/
|
|
90
|
+
async expand() {
|
|
91
|
+
if (await this.childItemContainer.isVisible()) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
await this.expandButton.click();
|
|
95
|
+
await this.childItemContainer.waitFor({ state: 'visible' });
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Collapses child item container in navigation group
|
|
99
|
+
* Does nothing in case group already collapsed
|
|
100
|
+
*/
|
|
101
|
+
async collapse() {
|
|
102
|
+
if (!(await this.childItemContainer.isVisible())) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
await this.expandButton.click();
|
|
106
|
+
await this.childItemContainer.waitFor({ state: 'hidden' });
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Gets navigation item by position in navigation group.
|
|
110
|
+
* @param position 1-based index. Negative numbers count from the end.
|
|
111
|
+
*/
|
|
112
|
+
getNavItem(position) {
|
|
113
|
+
return this.getLocator('//*[@data-test-id="nav-item-label"]', position);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Gets navigation item by matching data-test-id attribute
|
|
117
|
+
* @param id Value of navigation items data-test-id attribute
|
|
118
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `data-test-id`, defaults to 1
|
|
119
|
+
*/
|
|
120
|
+
getNavItemById(id, nth = 1) {
|
|
121
|
+
return this.getLocator(`//a[.//*[@data-test-id="${id}"]]`, nth);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Gets navigation item by matching label text in the navigation group
|
|
125
|
+
* @param label Navigation item label text
|
|
126
|
+
* @param nth 1-based index. Specifies which match to return in case multiple items match `label`, defaults to 1
|
|
127
|
+
*/
|
|
128
|
+
getNavItemByLabel(label, nth = 1) {
|
|
129
|
+
return this.getLocator(`//a[.//*[@data-test-id="nav-item-label" and text()="${label}"]]`, nth);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=navigation-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-panel.js","sourceRoot":"","sources":["../../../src/ui-selectors/navigation-panel.ts"],"names":[],"mappings":"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"}
|