@bigbinary/neeto-playwright-commons 1.9.12 → 1.9.13

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 CHANGED
@@ -1598,7 +1598,13 @@ declare class TeamMembers {
1598
1598
  * await teamMembers.navigateToTeamMembersSublink("all");
1599
1599
  * @endexample
1600
1600
  */
1601
- navigateToTeamMembersSublink: (sublink?: sublink) => Promise<void>;
1601
+ navigateToTeamMembersSublink: ({
1602
+ clickMembersTab,
1603
+ sublink
1604
+ }?: {
1605
+ clickMembersTab?: boolean;
1606
+ sublink?: sublink;
1607
+ }) => Promise<void>;
1602
1608
  /**
1603
1609
  *
1604
1610
  * Used to add a member using the add button in the header. It takes the following parameters:
package/index.js CHANGED
@@ -14842,8 +14842,9 @@ const MEMBER_FORM_SELECTORS = {
14842
14842
 
14843
14843
  class TeamMembers {
14844
14844
  constructor({ page, neetoPlaywrightUtilities, }) {
14845
- this.navigateToTeamMembersSublink = async (sublink = "all") => {
14846
- await this.page.getByTestId(MEMBER_SELECTORS.membersTab).click();
14845
+ this.navigateToTeamMembersSublink = async ({ clickMembersTab = true, sublink = "all", } = {}) => {
14846
+ clickMembersTab &&
14847
+ (await this.page.getByTestId(MEMBER_SELECTORS.membersTab).click());
14847
14848
  await this.page
14848
14849
  .getByTestId(MEMBER_SELECTORS.menubarSubLink(sublink))
14849
14850
  .click();
@@ -14855,12 +14856,14 @@ class TeamMembers {
14855
14856
  .getByTestId(MEMBER_FORM_SELECTORS.emailTextField)
14856
14857
  .fill(emails.join(", "));
14857
14858
  await this.page.getByTestId(MEMBER_SELECTORS.roleLabel(role)).click();
14858
- IS_STAGING_ENV &&
14859
- (await this.page
14859
+ await this.page.getByTestId(MEMBER_SELECTORS.continueButton).click();
14860
+ if (IS_STAGING_ENV) {
14861
+ await this.page
14860
14862
  .getByTestId(COMMON_SELECTORS.paneBody)
14861
14863
  .getByTestId(COMMON_SELECTORS.checkboxLabel)
14862
- .click());
14863
- await this.page.getByTestId(MEMBER_SELECTORS.continueButton).click();
14864
+ .click();
14865
+ await this.page.getByTestId(MEMBER_SELECTORS.continueButton).click();
14866
+ }
14864
14867
  await this.page.getByTestId(MEMBER_SELECTORS.submitButton).click();
14865
14868
  await this.neetoPlaywrightUtilities.waitForPageLoad();
14866
14869
  await this.neetoPlaywrightUtilities.verifySuccessToast();
@@ -14956,7 +14959,9 @@ class TeamMembers {
14956
14959
  .click();
14957
14960
  };
14958
14961
  // TODO: Change the selector after this issue is resolved: https://github.com/bigbinary/neeto-team-members-nano/issues/258
14959
- this.getMemberRowByName = (name) => this.page.getByRole("row", { name: `avatar--${name}` });
14962
+ this.getMemberRowByName = (name) => this.page.getByRole("row", {
14963
+ name: IS_STAGING_ENV ? name : `avatar--${name}`,
14964
+ });
14960
14965
  this.takeActionOnMembers = async ({ names = [], state, action, }) => {
14961
14966
  if (isPresent(names)) {
14962
14967
  for (const name of names) {