Newer
Older
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { element, by, ElementFinder } from 'protractor';
export class LikesComponentsPage {
createButton = element(by.id('jh-create-entity'));
deleteButtons = element.all(by.css('jhi-likes div table .btn-danger'));
title = element.all(by.css('jhi-likes div h2#page-heading span')).first();
noResult = element(by.id('no-result'));
entities = element(by.id('entities'));
async clickOnCreateButton(): Promise<void> {
await this.createButton.click();
}
async clickOnLastDeleteButton(): Promise<void> {
await this.deleteButtons.last().click();
}
async countDeleteButtons(): Promise<number> {
return this.deleteButtons.count();
}
async getTitle(): Promise<string> {
return this.title.getAttribute('jhiTranslate');
}
}
export class LikesUpdatePage {
pageTitle = element(by.id('jhi-likes-heading'));
saveButton = element(by.id('save-entity'));
cancelButton = element(by.id('cancel-save'));
dateInput = element(by.id('field_date'));
userIDInput = element(by.id('field_userID'));
projectIDInput = element(by.id('field_projectID'));
async getPageTitle(): Promise<string> {
return this.pageTitle.getAttribute('jhiTranslate');
}
async setDateInput(date: string): Promise<void> {
await this.dateInput.sendKeys(date);
}
async getDateInput(): Promise<string> {
return await this.dateInput.getAttribute('value');
}
async setUserIDInput(userID: string): Promise<void> {
await this.userIDInput.sendKeys(userID);
}
async getUserIDInput(): Promise<string> {
return await this.userIDInput.getAttribute('value');
}
async setProjectIDInput(projectID: string): Promise<void> {
await this.projectIDInput.sendKeys(projectID);
}
async getProjectIDInput(): Promise<string> {
return await this.projectIDInput.getAttribute('value');
}
async save(): Promise<void> {
await this.saveButton.click();
}
async cancel(): Promise<void> {
await this.cancelButton.click();
}
getSaveButton(): ElementFinder {
return this.saveButton;
}
}
export class LikesDeleteDialog {
private dialogTitle = element(by.id('jhi-delete-likes-heading'));
private confirmButton = element(by.id('jhi-confirm-delete-likes'));
async getDialogTitle(): Promise<string> {
return this.dialogTitle.getAttribute('jhiTranslate');
}
async clickOnConfirmButton(): Promise<void> {
await this.confirmButton.click();
}
}