PromucFlow_constructor/app/client/cypress/support/Pages/AdminSettings.ts
Vijetha-Kaja a6df101f45
test: Cypress - Added AdminSettings Helper (#21741)
## Description

- Supporting PR for the
[bug](https://github.com/appsmithorg/appsmith/issues/21046) automation
[script](https://github.com/appsmithorg/appsmith-ee/pull/1219) in EE
repo - Can be used for other admin settings scripts

## Type of change

- Admin settings helpers for automation scripts

## How Has This Been Tested?
- Cypress test runs

## Checklist:
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-03-27 15:06:03 +05:30

22 lines
766 B
TypeScript

import { ObjectsRegistry } from "../Objects/Registry";
export class AdminSettings {
public agHelper = ObjectsRegistry.AggregateHelper;
public locator = ObjectsRegistry.CommonLocators;
public homePage = ObjectsRegistry.HomePage;
private _adminSettingsBtn = '[data-testid="t--admin-settings-menu-option"]';
private _settingsList = ".t--settings-category-list";
public _usersTab = ".t--settings-category-users";
public _roles = (user: string) =>
"//span[contains(text(), '" +
user +
"')]/parent::div/parent::a/parent::td/following-sibling::td[1]";
public NavigateToAdminSettings() {
this.homePage.NavigateToHome();
this.agHelper.GetNClick(this._adminSettingsBtn);
this.agHelper.AssertElementVisible(this._settingsList);
}
}