]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | import { by, element } from 'protractor'; |
2 | ||
3 | import { PageHelper } from '../page-helper.po'; | |
4 | ||
5 | export class NotificationSidebarPageHelper extends PageHelper { | |
6 | getNotificatinoIcon() { | |
7 | return element(by.css('cd-notifications a')); | |
8 | } | |
9 | ||
10 | getSidebar() { | |
11 | return element(by.css('cd-notifications-sidebar')); | |
12 | } | |
13 | ||
14 | getTasks() { | |
15 | return this.getSidebar().all(by.css('.card.tc_task')); | |
16 | } | |
17 | ||
18 | getNotifications() { | |
19 | return this.getSidebar().all(by.css('.card.tc_notification')); | |
20 | } | |
21 | ||
22 | getClearNotficationsBtn() { | |
23 | return this.getSidebar().element(by.css('button.btn-block')); | |
24 | } | |
25 | ||
26 | getCloseBtn() { | |
27 | return this.getSidebar().element(by.css('button.close')); | |
28 | } | |
29 | ||
30 | async open() { | |
31 | await this.waitClickableAndClick(this.getNotificatinoIcon()); | |
32 | return this.waitVisibility(this.getSidebar()); | |
33 | } | |
34 | } |