e2e/src/apps/app-versions.po.ts
E2E Page Object for app details page.
Methods |
getFooterCancel |
getFooterCancel()
|
Defined in e2e/src/apps/app-versions.po.ts:30
|
Get footer cancel button
Returns :
any
|
getHeaderCancel |
getHeaderCancel()
|
Defined in e2e/src/apps/app-versions.po.ts:38
|
Get header cancel button
Returns :
any
|
getHeaderText |
getHeaderText()
|
Defined in e2e/src/apps/app-versions.po.ts:14
|
Retrieves text of the title.
Returns :
any
|
getModal |
getModal()
|
Defined in e2e/src/apps/app-versions.po.ts:22
|
Get Modal
Returns :
any
|
getRowButtons | ||||||||
getRowButtons(index: number)
|
||||||||
Defined in e2e/src/apps/app-versions.po.ts:55
|
||||||||
Get the buttons to a row
Parameters :
Returns :
any
|
getTableRows |
getTableRows()
|
Defined in e2e/src/apps/app-versions.po.ts:46
|
Get table rows
Returns :
any
|
setDestroy | ||||||||
setDestroy(index: number)
|
||||||||
Defined in e2e/src/apps/app-versions.po.ts:76
|
||||||||
Destroy an application Validate the confirm modal
Parameters :
Returns :
void
|
setMakeDefault | ||||||||
setMakeDefault(index: number)
|
||||||||
Defined in e2e/src/apps/app-versions.po.ts:64
|
||||||||
Set a default version to a row Validate the confirm modal
Parameters :
Returns :
void
|
import { browser, by, element } from 'protractor';
/**
* E2E Page Object for app details page.
*
* @author Damien Vitrac
*/
export class AppVersionsModal {
/**
* Retrieves text of the title.
* @returns {any}
*/
getHeaderText() {
return element(by.css('.modal-header h4')).getText();
}
/**
* Get Modal
* @returns {ElementFinder}
*/
getModal() {
return element(by.css('#app-versions'));
}
/**
* Get footer cancel button
* @returns {ElementFinder}
*/
getFooterCancel() {
return element(by.css('#app-versions .modal-footer button'));
}
/**
* Get header cancel button
* @returns {ElementFinder}
*/
getHeaderCancel() {
return element(by.css('#app-versions .modal-header .close'));
}
/**
* Get table rows
* @returns {ElementArrayFinder}
*/
getTableRows() {
return element.all(by.css('#app-versions #table-versions tbody tr'));
}
/**
* Get the buttons to a row
* @param {number} index
* @returns {ElementArrayFinder}
*/
getRowButtons(index: number) {
return this.getTableRows().get(index).all(by.css('.actions button'));
}
/**
* Set a default version to a row
* Validate the confirm modal
* @param {number} index
*/
setMakeDefault(index: number) {
this.getRowButtons(index).get(0).click();
browser.sleep(400);
element(by.css('#modal-confirm')).element(by.buttonText('Validate')).click();
browser.sleep(200);
}
/**
* Destroy an application
* Validate the confirm modal
* @param {number} index
*/
setDestroy(index: number) {
this.getRowButtons(index).get(1).click();
browser.sleep(400);
element(by.css('#modal-confirm')).element(by.buttonText('Unregister version')).click();
browser.sleep(200);
}
}