@bigbinary/neeto-playwright-commons 5.0.1 → 5.0.2
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/index.d.ts +1 -0
- package/index.js +13 -10
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -6010,6 +6010,7 @@ declare const COMMON_SELECTORS: {
|
|
|
6010
6010
|
settingsLink: string;
|
|
6011
6011
|
ticketFieldTextInput: (label: string) => string;
|
|
6012
6012
|
appSwitcherButton: string;
|
|
6013
|
+
famAppSwitcherButton: string;
|
|
6013
6014
|
appSwitcherWrapper: string;
|
|
6014
6015
|
appLink: (appName: NeetoProducts) => string;
|
|
6015
6016
|
tableSpinner: string;
|
package/index.js
CHANGED
|
@@ -828,9 +828,10 @@ const COMMON_SELECTORS = {
|
|
|
828
828
|
subheader: "subheader",
|
|
829
829
|
settingsLink: "Settings",
|
|
830
830
|
ticketFieldTextInput: (label) => `${hyphenate(label)}-text-input`,
|
|
831
|
-
appSwitcherButton: "product-switcher-button",
|
|
832
|
-
|
|
833
|
-
|
|
831
|
+
appSwitcherButton: "sidebar-product-switcher-button",
|
|
832
|
+
famAppSwitcherButton: "fam-product-switcher-button",
|
|
833
|
+
appSwitcherWrapper: "switcher-wrapper", // Unused: neeto-molecules renders no wrapper testid around the product
|
|
834
|
+
appLink: (appName) => `${appName.toLowerCase()}-app-card`,
|
|
834
835
|
tableSpinner: ".ant-spin",
|
|
835
836
|
pageLoader: "neeto-molecules-pageloader",
|
|
836
837
|
homeButton: "home-button",
|
|
@@ -863,7 +864,7 @@ const COMMON_SELECTORS = {
|
|
|
863
864
|
badgeCloseButton: "badge-close-button",
|
|
864
865
|
nextYearButton: "next-year-button",
|
|
865
866
|
popoverTitle: "popover-title",
|
|
866
|
-
productSwitcherSearchInput: "product-switcher-search
|
|
867
|
+
productSwitcherSearchInput: "sidebar-product-switcher-search",
|
|
867
868
|
noAppsFoundTitle: "no-apps-found-title",
|
|
868
869
|
helpPopoverButton: "help-popover-button",
|
|
869
870
|
helpPopoverDesc: "help-popover-description",
|
|
@@ -4426,16 +4427,18 @@ class HelpAndProfilePage {
|
|
|
4426
4427
|
const productName = "Cal";
|
|
4427
4428
|
const searchQueryPartial = productName.slice(0, 1).toLowerCase();
|
|
4428
4429
|
const searchQueryFull = productName.toLowerCase();
|
|
4430
|
+
const cal = this.page.getByTestId(COMMON_SELECTORS.appLink(productName));
|
|
4431
|
+
const chat = this.page.getByTestId(COMMON_SELECTORS.appLink("Chat"));
|
|
4432
|
+
const searchInput = this.page.getByTestId(COMMON_SELECTORS.productSwitcherSearchInput);
|
|
4429
4433
|
await test.step("1: Open the app switcher drawer", () => expect(async () => {
|
|
4430
|
-
await this.
|
|
4434
|
+
await this.page.reload();
|
|
4435
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
4431
4436
|
await this.openAppSwitcher();
|
|
4432
|
-
await expect(this.page.getByTestId(COMMON_SELECTORS.
|
|
4437
|
+
await expect(this.page.getByTestId(COMMON_SELECTORS.productSwitcherSearchInput)).toBeVisible();
|
|
4433
4438
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
4434
|
-
|
|
4439
|
+
await Promise.all([cal, chat].map(app => expect(app).toBeVisible({ timeout: 3_000 })));
|
|
4440
|
+
}).toPass({ timeout: 75_000, intervals: [3_000] }));
|
|
4435
4441
|
await test.step("2: Verify search functionality", async () => {
|
|
4436
|
-
const cal = this.page.getByTestId(COMMON_SELECTORS.appLink(productName));
|
|
4437
|
-
const chat = this.page.getByTestId(COMMON_SELECTORS.appLink("Chat"));
|
|
4438
|
-
const searchInput = this.page.getByTestId(COMMON_SELECTORS.productSwitcherSearchInput);
|
|
4439
4442
|
await searchInput.fill(faker.word.words(3));
|
|
4440
4443
|
await expect(this.page.getByTestId(COMMON_SELECTORS.noAppsFoundTitle)).toBeVisible();
|
|
4441
4444
|
await searchInput.fill(searchQueryPartial);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "A package encapsulating common playwright code across neeto projects.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
|
|
6
6
|
"license": "apache-2.0",
|