@bigbinary/neeto-playwright-commons 5.0.0 → 5.0.1

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.
Files changed (2) hide show
  1. package/index.js +6 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2876,7 +2876,12 @@ class CustomCommands {
2876
2876
  return await this.recursiveMethod(callback, condition, timeout, startTime, 1);
2877
2877
  };
2878
2878
  verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10_000, toastCloseTimeout = 10_000, customPageContext = this.page, } = {}) => {
2879
- const toastLocator = customPageContext.getByTestId(COMMON_SELECTORS.toastMessage(toastType));
2879
+ const toastMessageLocator = customPageContext.getByTestId(COMMON_SELECTORS.toastMessage(toastType));
2880
+ // Some products are still on the v1 (neetoui) Toastr, which renders the thumbs up icon and close button outside the message container.
2881
+ const toastLocator = customPageContext
2882
+ .locator(COMMON_SELECTORS.neetoUiToastr)
2883
+ .filter({ has: toastMessageLocator })
2884
+ .or(toastMessageLocator);
2880
2885
  const filteredToastLocator = (isEmpty(message)
2881
2886
  ? toastLocator
2882
2887
  : toastLocator.filter({ hasText: message }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-playwright-commons",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
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",