-
Notifications
You must be signed in to change notification settings - Fork 5
/
hotSpots.po.js
26 lines (22 loc) · 1.29 KB
/
hotSpots.po.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var HotSpotsPage = function () {
this.createHotSpotBucketInput = element(by.model('$ctrl.hotSpotBucketName'));
this.createButton = element(by.cssContainingText('button', 'Create'));
this.hotSpotBucketName = function (index) {
return this.hotSpotBuckets.get(index).element(by.binding('hotSpotBucket.name'));
};
this.hotSpots = function (index) {
return this.hotSpotBuckets.get(index).all(by.repeater('$chip in $mdChipsCtrl.items'));
};
this.hotSpotBucketEditButton = function (index) {
return this.hotSpotBuckets.get(index).element(by.css('[ng-click="$ctrl.editHotSpotBucket(hotSpotBucket)"]'));
};
this.hotSpotInput = function (index) {
return this.hotSpotBuckets.get(index).element(by.model('$mdChipsCtrl.chipBuffer'));
};
this.hotSpotDeleteButton = function (hotSpotBucketIndex, hotSpotIndex) {
return this.hotSpots(hotSpotBucketIndex).get(hotSpotIndex).element(by.css('[ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)"]'));
};
this.hotSpotBuckets = element.all(by.repeater('hotSpotBucket in $ctrl.hotSpotBuckets'));
this.hotSpotBucketNameInputMessage = this.createHotSpotBucketInput.element(by.xpath('..')).element(by.css('[ng-messages]')).element(by.xpath('*[1]'));
};
module.exports = HotSpotsPage;