open-vault/ui/tests/pages/components/calendar-widget.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

22 lines
741 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { clickable, create, isPresent } from 'ember-cli-page-object';
export default create({
clickPreviousYear: clickable('[data-test-previous-year]'),
clickCurrentMonth: clickable('[data-test-current-month]'),
clickCurrentBillingPeriod: clickable('[data-test-current-billing-period]'),
customEndMonthBtn: clickable('[data-test-show-calendar]'),
menuToggle: clickable('[data-test-popup-menu-trigger="true"]'),
showsCalendar: isPresent('[data-test-calendar-widget-container]'),
dateRangeTrigger: '[data-test-popup-menu-trigger="true"]',
async openCalendar() {
await this.menuToggle();
await this.customEndMonthBtn();
return;
},
});