Home Manual Reference Source

src/page_objects/web/contacts/pages/roomSystems.page.js

import BaseContactsPage from "./base.contacts.page.js";

/** 
 * RoomSystemsPage
 * @extends BaseContactsPage
 */
class RoomSystemsPage extends BaseContactsPage {
  /**
   * @param {args} args Args from controller
   */
  constructor(args) {
    super(args);
  }

  // PAGE ELEMENTS
  /* eslint-disable require-jsdoc */
  showAllButton() {
    return this.element("span=All");
  }

  showAvailableButton() {
    return this.element("span=Available");
  }
  /* eslint-enable require-jsdoc */

  // PAGE FUNCTIONS

  /** 
   * Use the nav panel to visit page
   */
  visit() {
    this.navPanel.roomSystems().click();
  }

  /**
   * Use filter to show all contacts
   */
  async showAll() {
    await this.showFilterOptions();
    await this.showAllButton().click();
  }

  /**
   * Use filter to show available contacts
   */
  async showAvailable() {
    await this.showFilterOptions();
    await this.showAvailableButton().click();
  }
}

export default RoomSystemsPage;