mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1928] e2e improvements - part2 (#884)
* refactor Mark as favourite tests rename method to be more clear create separate methods for some checks and actions * forgot some changes * refactor delete-undo tests * some more refactoring * fix * small improvements / refactoring
This commit is contained in:
committed by
Cilibiu Bogdan
parent
b8ce533759
commit
24f5f01900
@@ -94,7 +94,7 @@ export class DataTable extends Component {
|
|||||||
return this.head.all(locator);
|
return this.head.all(locator);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getHeaderText() {
|
async getColumnHeadersText() {
|
||||||
const el = this.getColumnHeaders();
|
const el = this.getColumnHeaders();
|
||||||
return await el.getText();
|
return await el.getText();
|
||||||
}
|
}
|
||||||
@@ -319,4 +319,27 @@ export class DataTable extends Component {
|
|||||||
async isItemPresent(name: string) {
|
async isItemPresent(name: string) {
|
||||||
return await this.getRowByName(name).isPresent();
|
return await this.getRowByName(name).isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getEntireDataTableText() {
|
||||||
|
return this.getRows().map((row) => {
|
||||||
|
return row.all(this.cell).map(async cell => await cell.getText());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async getSitesNameAndVisibility() {
|
||||||
|
const data = await this.getEntireDataTableText();
|
||||||
|
return data.reduce((acc, cell) => {
|
||||||
|
acc[cell[1]] = cell[3].toUpperCase();
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
async getSitesNameAndRole() {
|
||||||
|
const data = await this.getEntireDataTableText();
|
||||||
|
return data.reduce((acc, cell) => {
|
||||||
|
acc[cell[1]] = cell[2];
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -31,17 +31,17 @@ import { Toolbar } from './../toolbar/toolbar';
|
|||||||
import { SearchInput } from '../search/search-input';
|
import { SearchInput } from '../search/search-input';
|
||||||
|
|
||||||
export class Header extends Component {
|
export class Header extends Component {
|
||||||
private locators = {
|
private static selectors = {
|
||||||
root: 'app-header',
|
root: 'app-header',
|
||||||
logoLink: by.css('.app-menu__title'),
|
logoLink: by.css('.app-menu__title'),
|
||||||
userInfo: by.css('aca-current-user'),
|
userInfo: by.css('aca-current-user'),
|
||||||
moreActions: by.id('app.header.more')
|
moreActions: by.id('app.header.more')
|
||||||
};
|
};
|
||||||
|
|
||||||
logoLink: ElementFinder = this.component.element(this.locators.logoLink);
|
logoLink: ElementFinder = this.component.element(Header.selectors.logoLink);
|
||||||
userInfo: UserInfo = new UserInfo(this.component);
|
moreActions: ElementFinder = browser.element(Header.selectors.moreActions);
|
||||||
moreActions: ElementFinder = browser.element(this.locators.moreActions);
|
|
||||||
|
|
||||||
|
userInfo: UserInfo = new UserInfo(this.component);
|
||||||
menu: Menu = new Menu();
|
menu: Menu = new Menu();
|
||||||
toolbar: Toolbar = new Toolbar();
|
toolbar: Toolbar = new Toolbar();
|
||||||
searchInput: SearchInput = new SearchInput();
|
searchInput: SearchInput = new SearchInput();
|
||||||
|
@@ -28,14 +28,14 @@ import { Menu } from '../menu/menu';
|
|||||||
import { Component } from '../component';
|
import { Component } from '../component';
|
||||||
|
|
||||||
export class UserInfo extends Component {
|
export class UserInfo extends Component {
|
||||||
private locators = {
|
private static selectors = {
|
||||||
avatar: by.css('.current-user__avatar'),
|
avatar: by.css('.current-user__avatar'),
|
||||||
fullName: by.css('.current-user__full-name'),
|
fullName: by.css('.current-user__full-name'),
|
||||||
menuItems: by.css('[mat-menu-item]')
|
menuItems: by.css('[mat-menu-item]')
|
||||||
};
|
};
|
||||||
|
|
||||||
fullName: ElementFinder = this.component.element(this.locators.fullName);
|
fullName: ElementFinder = this.component.element(UserInfo.selectors.fullName);
|
||||||
avatar: ElementFinder = this.component.element(this.locators.avatar);
|
avatar: ElementFinder = this.component.element(UserInfo.selectors.avatar);
|
||||||
|
|
||||||
menu: Menu = new Menu();
|
menu: Menu = new Menu();
|
||||||
|
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
import { ElementFinder, ElementArrayFinder, by, browser, ExpectedConditions as EC } from 'protractor';
|
import { ElementFinder, ElementArrayFinder, by, browser, ExpectedConditions as EC } from 'protractor';
|
||||||
import { Component } from '../component';
|
import { Component } from '../component';
|
||||||
import { BROWSER_WAIT_TIMEOUT } from '../../configs';
|
import { BROWSER_WAIT_TIMEOUT } from '../../configs';
|
||||||
import { Utils } from './../../utilities/utils';
|
|
||||||
|
|
||||||
export class InfoDrawer extends Component {
|
export class InfoDrawer extends Component {
|
||||||
private static selectors = {
|
private static selectors = {
|
||||||
@@ -86,6 +85,7 @@ export class InfoDrawer extends Component {
|
|||||||
super(InfoDrawer.selectors.root, ancestor);
|
super(InfoDrawer.selectors.root, ancestor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async waitForInfoDrawerToOpen() {
|
async waitForInfoDrawerToOpen() {
|
||||||
return await browser.wait(EC.presenceOf(this.header), BROWSER_WAIT_TIMEOUT);
|
return await browser.wait(EC.presenceOf(this.header), BROWSER_WAIT_TIMEOUT);
|
||||||
}
|
}
|
||||||
@@ -95,10 +95,7 @@ export class InfoDrawer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isEmpty() {
|
async isEmpty() {
|
||||||
if (await browser.isElementPresent(by.css(InfoDrawer.selectors.tabs))) {
|
return !(await browser.isElementPresent(by.css(InfoDrawer.selectors.tabs)));
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getTabByTitle(title: string) {
|
getTabByTitle(title: string) {
|
||||||
@@ -146,12 +143,6 @@ export class InfoDrawer extends Component {
|
|||||||
return this.getFieldByName(fieldName).isEnabled();
|
return this.getFieldByName(fieldName).isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isVisibilityEnabled() {
|
|
||||||
const wrapper = this.getLabelWrapper('Visibility');
|
|
||||||
const field = wrapper.element(by.xpath('..')).element(by.css(InfoDrawer.selectors.dropDown));
|
|
||||||
return await field.isEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
async getValueOfField(fieldName: string) {
|
async getValueOfField(fieldName: string) {
|
||||||
return await this.getFieldByName(fieldName).getText();
|
return await this.getFieldByName(fieldName).getText();
|
||||||
}
|
}
|
||||||
@@ -162,11 +153,6 @@ export class InfoDrawer extends Component {
|
|||||||
return await input.sendKeys(text);
|
return await input.sendKeys(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeTextInInput(fieldName: string, text: string) {
|
|
||||||
const input = this.getFieldByName(fieldName);
|
|
||||||
await input.clear();
|
|
||||||
return await Utils.typeInField(input, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
getButton(button: string) {
|
getButton(button: string) {
|
||||||
return this.component.element(by.cssContainingText(InfoDrawer.selectors.metadataTabAction, button));
|
return this.component.element(by.cssContainingText(InfoDrawer.selectors.metadataTabAction, button));
|
||||||
@@ -184,15 +170,21 @@ export class InfoDrawer extends Component {
|
|||||||
return await this.getButton(button).click();
|
return await this.getButton(button).click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async isButtonDisabled(button: string) {
|
async waitForVisibilityDropDownToOpen() {
|
||||||
try {
|
await browser.wait(EC.presenceOf(this.visibilityDropDown), BROWSER_WAIT_TIMEOUT);
|
||||||
const disabled = await this.getButton(button).getAttribute('disabled');
|
|
||||||
return disabled;
|
|
||||||
} catch (error) {
|
|
||||||
console.log('----- isButtonDisabled catch: ', error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async waitForVisibilityDropDownToClose() {
|
||||||
|
await browser.wait(EC.stalenessOf(browser.$('.mat-option .mat-option-text')), BROWSER_WAIT_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------
|
||||||
|
|
||||||
|
async isAboutTabDisplayed() {
|
||||||
|
return await this.isTabDisplayed('About');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async isMessageDisplayed() {
|
async isMessageDisplayed() {
|
||||||
return await browser.isElementPresent(this.hint);
|
return await browser.isElementPresent(this.hint);
|
||||||
}
|
}
|
||||||
@@ -210,80 +202,59 @@ export class InfoDrawer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------
|
|
||||||
async isNameDisplayed() {
|
async isNameDisplayed() {
|
||||||
return await this.isFieldDisplayed('Name');
|
return await this.isFieldDisplayed('Name');
|
||||||
}
|
}
|
||||||
|
|
||||||
async isDescriptionDisplayed() {
|
|
||||||
return await this.isFieldDisplayed('Description');
|
|
||||||
}
|
|
||||||
|
|
||||||
async isVisibilityDisplayed() {
|
|
||||||
return await this.isFieldDisplayed('Visibility');
|
|
||||||
}
|
|
||||||
|
|
||||||
async isLibraryIdDisplayed() {
|
|
||||||
return await this.isFieldDisplayed('Library ID');
|
|
||||||
}
|
|
||||||
|
|
||||||
async getName() {
|
|
||||||
return await this.getValueOfField('Name');
|
|
||||||
}
|
|
||||||
|
|
||||||
async getVisibility() {
|
|
||||||
return await this.getValueOfField('Visibility');
|
|
||||||
}
|
|
||||||
|
|
||||||
async getLibraryId() {
|
|
||||||
return await this.getValueOfField('Library ID');
|
|
||||||
}
|
|
||||||
|
|
||||||
async getDescription() {
|
|
||||||
return await this.getValueOfField('Description');
|
|
||||||
}
|
|
||||||
|
|
||||||
async isNameEnabled() {
|
async isNameEnabled() {
|
||||||
return await this.isInputEnabled('Name');
|
return await this.isInputEnabled('Name');
|
||||||
}
|
}
|
||||||
|
|
||||||
async isLibraryIdEnabled() {
|
async getName() {
|
||||||
return await this.isInputEnabled('Library ID');
|
return await this.getValueOfField('Name');
|
||||||
}
|
|
||||||
|
|
||||||
async isDescriptionEnabled() {
|
|
||||||
return await this.isInputEnabled('Description');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterName(name: string) {
|
async enterName(name: string) {
|
||||||
return await this.enterTextInInput('Name', name);
|
return await this.enterTextInInput('Name', name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeName(name: string) {
|
|
||||||
return await this.typeTextInInput('Name', name);
|
async isDescriptionDisplayed() {
|
||||||
|
return await this.isFieldDisplayed('Description');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isDescriptionEnabled() {
|
||||||
|
return await this.isInputEnabled('Description');
|
||||||
|
}
|
||||||
|
|
||||||
|
async getDescription() {
|
||||||
|
return await this.getValueOfField('Description');
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterDescription(desc: string) {
|
async enterDescription(desc: string) {
|
||||||
return await this.enterTextInInput('Description', desc);
|
return await this.enterTextInInput('Description', desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeDescription(desc: string) {
|
|
||||||
return await this.typeTextInInput('Description', desc);
|
async isVisibilityEnabled() {
|
||||||
|
const wrapper = this.getLabelWrapper('Visibility');
|
||||||
|
const field = wrapper.element(by.xpath('..')).element(by.css(InfoDrawer.selectors.dropDown));
|
||||||
|
return await field.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForDropDownToOpen() {
|
async isVisibilityDisplayed() {
|
||||||
await browser.wait(EC.presenceOf(this.visibilityDropDown), BROWSER_WAIT_TIMEOUT);
|
return await this.isFieldDisplayed('Visibility');
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForDropDownToClose() {
|
async getVisibility() {
|
||||||
await browser.wait(EC.stalenessOf(browser.$('.mat-option .mat-option-text')), BROWSER_WAIT_TIMEOUT);
|
return await this.getValueOfField('Visibility');
|
||||||
}
|
}
|
||||||
|
|
||||||
async setVisibility(visibility: string) {
|
async setVisibility(visibility: string) {
|
||||||
const val = visibility.toLowerCase();
|
const val = visibility.toLowerCase();
|
||||||
|
|
||||||
await this.visibilityDropDown.click();
|
await this.visibilityDropDown.click();
|
||||||
await this.waitForDropDownToOpen();
|
await this.waitForVisibilityDropDownToOpen();
|
||||||
|
|
||||||
if (val === 'public') {
|
if (val === 'public') {
|
||||||
await this.visibilityPublic.click();
|
await this.visibilityPublic.click();
|
||||||
@@ -295,7 +266,59 @@ export class InfoDrawer extends Component {
|
|||||||
console.log('----- invalid visibility', val);
|
console.log('----- invalid visibility', val);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.waitForDropDownToClose();
|
await this.waitForVisibilityDropDownToClose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async isLibraryIdDisplayed() {
|
||||||
|
return await this.isFieldDisplayed('Library ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isLibraryIdEnabled() {
|
||||||
|
return await this.isInputEnabled('Library ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
async getLibraryId() {
|
||||||
|
return await this.getValueOfField('Library ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async isEditEnabled() {
|
||||||
|
return await this.isButtonEnabled('Edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isEditDisplayed() {
|
||||||
|
return await this.isButtonDisplayed('Edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickEdit() {
|
||||||
|
return await this.clickButton('Edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async isUpdateEnabled() {
|
||||||
|
return await this.isButtonEnabled('Update');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isUpdateDisplayed() {
|
||||||
|
return await this.isButtonDisplayed('Update');
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickUpdate() {
|
||||||
|
return await this.clickButton('Update');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async isCancelEnabled() {
|
||||||
|
return await this.isButtonEnabled('Cancel');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isCancelDisplayed() {
|
||||||
|
return await this.isButtonDisplayed('Cancel');
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickCancel() {
|
||||||
|
return await this.clickButton('Cancel');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -27,9 +27,9 @@ import { by, ElementFinder } from 'protractor';
|
|||||||
import { Component } from '../component';
|
import { Component } from '../component';
|
||||||
|
|
||||||
export class LoginComponent extends Component {
|
export class LoginComponent extends Component {
|
||||||
static selector = 'adf-login';
|
private static selectors = {
|
||||||
|
root: 'adf-login',
|
||||||
|
|
||||||
private locators = {
|
|
||||||
usernameInput: by.css('input#username'),
|
usernameInput: by.css('input#username'),
|
||||||
passwordInput: by.css('input#password'),
|
passwordInput: by.css('input#password'),
|
||||||
passwordVisibility: by.css('.adf-login-password-icon'),
|
passwordVisibility: by.css('.adf-login-password-icon'),
|
||||||
@@ -38,15 +38,15 @@ export class LoginComponent extends Component {
|
|||||||
copyright: by.css('.adf-copyright')
|
copyright: by.css('.adf-copyright')
|
||||||
};
|
};
|
||||||
|
|
||||||
usernameInput: ElementFinder = this.component.element(this.locators.usernameInput);
|
usernameInput: ElementFinder = this.component.element(LoginComponent.selectors.usernameInput);
|
||||||
passwordInput: ElementFinder = this.component.element(this.locators.passwordInput);
|
passwordInput: ElementFinder = this.component.element(LoginComponent.selectors.passwordInput);
|
||||||
submitButton: ElementFinder = this.component.element(this.locators.submitButton);
|
submitButton: ElementFinder = this.component.element(LoginComponent.selectors.submitButton);
|
||||||
errorMessage: ElementFinder = this.component.element(this.locators.errorMessage);
|
errorMessage: ElementFinder = this.component.element(LoginComponent.selectors.errorMessage);
|
||||||
copyright: ElementFinder = this.component.element(this.locators.copyright);
|
copyright: ElementFinder = this.component.element(LoginComponent.selectors.copyright);
|
||||||
passwordVisibility: ElementFinder = this.component.element(this.locators.passwordVisibility);
|
passwordVisibility: ElementFinder = this.component.element(LoginComponent.selectors.passwordVisibility);
|
||||||
|
|
||||||
constructor(ancestor?: ElementFinder) {
|
constructor(ancestor?: ElementFinder) {
|
||||||
super(LoginComponent.selector, ancestor);
|
super(LoginComponent.selectors.root, ancestor);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterUsername(username: string) {
|
async enterUsername(username: string) {
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
import { ElementFinder, by } from 'protractor';
|
import { ElementFinder, by } from 'protractor';
|
||||||
import { Menu } from '../menu/menu';
|
import { Menu } from '../menu/menu';
|
||||||
import { Component } from '../component';
|
import { Component } from '../component';
|
||||||
|
import { browser } from 'protractor';
|
||||||
export class Pagination extends Component {
|
export class Pagination extends Component {
|
||||||
private static selectors = {
|
private static selectors = {
|
||||||
root: 'adf-pagination',
|
root: 'adf-pagination',
|
||||||
@@ -61,7 +61,6 @@ export class Pagination extends Component {
|
|||||||
|
|
||||||
await maxItemsButton.click();
|
await maxItemsButton.click();
|
||||||
await menu.waitForMenuToOpen();
|
await menu.waitForMenuToOpen();
|
||||||
// return menu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openCurrentPageMenu() {
|
async openCurrentPageMenu() {
|
||||||
@@ -69,11 +68,6 @@ export class Pagination extends Component {
|
|||||||
|
|
||||||
await pagesButton.click();
|
await pagesButton.click();
|
||||||
await menu.waitForMenuToOpen();
|
await menu.waitForMenuToOpen();
|
||||||
// return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
async getText(elem: ElementFinder) {
|
|
||||||
return await elem.getText();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async resetToDefaultPageSize() {
|
async resetToDefaultPageSize() {
|
||||||
@@ -95,4 +89,56 @@ export class Pagination extends Component {
|
|||||||
async clickPrevious() {
|
async clickPrevious() {
|
||||||
await this.previousButton.click();
|
await this.previousButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async isNextEnabled() {
|
||||||
|
return await this.nextButton.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isPreviousEnabled() {
|
||||||
|
return await this.previousButton.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isPagesButtonPresent() {
|
||||||
|
return await browser.isElementPresent(this.pagesButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
async isRangePresent() {
|
||||||
|
return await this.range.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isMaxItemsPresent() {
|
||||||
|
return await this.maxItems.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isCurrentPagePresent() {
|
||||||
|
return await this.currentPage.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isTotalPagesPresent() {
|
||||||
|
return await this.totalPages.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isPreviousButtonPresent() {
|
||||||
|
return await this.previousButton.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isNextButtonPresent() {
|
||||||
|
return await this.nextButton.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getCurrentPage() {
|
||||||
|
return await this.currentPage.getText();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getRange() {
|
||||||
|
return await this.range.getText();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getMaxItems() {
|
||||||
|
return await this.maxItems.getText();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getTotalPages() {
|
||||||
|
return await this.totalPages.getText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ import { browser, by, ElementFinder, ExpectedConditions as EC, until } from 'pro
|
|||||||
import { BROWSER_WAIT_TIMEOUT, USE_HASH_STRATEGY } from './../configs';
|
import { BROWSER_WAIT_TIMEOUT, USE_HASH_STRATEGY } from './../configs';
|
||||||
|
|
||||||
export abstract class Page {
|
export abstract class Page {
|
||||||
private static locators = {
|
private static selectors = {
|
||||||
app: 'app-root',
|
app: 'app-root',
|
||||||
layout: 'app-layout',
|
layout: 'app-layout',
|
||||||
overlay: '.cdk-overlay-container',
|
overlay: '.cdk-overlay-container',
|
||||||
@@ -41,17 +41,17 @@ export abstract class Page {
|
|||||||
genericErrorTitle: '.generic-error__title'
|
genericErrorTitle: '.generic-error__title'
|
||||||
};
|
};
|
||||||
|
|
||||||
app: ElementFinder = browser.element(by.css(Page.locators.app));
|
app: ElementFinder = browser.element(by.css(Page.selectors.app));
|
||||||
layout: ElementFinder = browser.element(by.css(Page.locators.layout));
|
layout: ElementFinder = browser.element(by.css(Page.selectors.layout));
|
||||||
overlay: ElementFinder = browser.element(by.css(Page.locators.overlay));
|
overlay: ElementFinder = browser.element(by.css(Page.selectors.overlay));
|
||||||
snackBar: ElementFinder = browser.element(by.css(Page.locators.snackBar));
|
snackBar: ElementFinder = browser.element(by.css(Page.selectors.snackBar));
|
||||||
dialogContainer: ElementFinder = browser.element(by.css(Page.locators.dialogContainer));
|
dialogContainer: ElementFinder = browser.element(by.css(Page.selectors.dialogContainer));
|
||||||
snackBarContainer: ElementFinder = browser.element(by.css(Page.locators.snackBarContainer));
|
snackBarContainer: ElementFinder = browser.element(by.css(Page.selectors.snackBarContainer));
|
||||||
snackBarAction: ElementFinder = browser.element(by.css(Page.locators.snackBarAction));
|
snackBarAction: ElementFinder = browser.element(by.css(Page.selectors.snackBarAction));
|
||||||
|
|
||||||
genericError: ElementFinder = browser.element(by.css(Page.locators.genericError));
|
genericError: ElementFinder = browser.element(by.css(Page.selectors.genericError));
|
||||||
genericErrorIcon: ElementFinder = browser.element(by.css(Page.locators.genericErrorIcon));
|
genericErrorIcon: ElementFinder = browser.element(by.css(Page.selectors.genericErrorIcon));
|
||||||
genericErrorTitle: ElementFinder = browser.element(by.css(Page.locators.genericErrorTitle));
|
genericErrorTitle: ElementFinder = browser.element(by.css(Page.selectors.genericErrorTitle));
|
||||||
|
|
||||||
constructor(public url: string = '') {}
|
constructor(public url: string = '') {}
|
||||||
|
|
||||||
|
@@ -136,7 +136,7 @@ describe('Delete and undo delete', () => {
|
|||||||
expect(message).toContain(`Undo`);
|
expect(message).toContain(`Undo`);
|
||||||
expect(await dataTable.isItemPresent(file1)).toBe(false, 'Item was not removed from list');
|
expect(await dataTable.isItemPresent(file1)).toBe(false, 'Item was not removed from list');
|
||||||
items--;
|
items--;
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await dataTable.isItemPresent(file1)).toBe(true, 'Item is not in trash');
|
expect(await dataTable.isItemPresent(file1)).toBe(true, 'Item is not in trash');
|
||||||
});
|
});
|
||||||
@@ -150,7 +150,7 @@ describe('Delete and undo delete', () => {
|
|||||||
expect(await dataTable.isItemPresent(file2)).toBe(false, `${file2} was not removed from list`);
|
expect(await dataTable.isItemPresent(file2)).toBe(false, `${file2} was not removed from list`);
|
||||||
expect(await dataTable.isItemPresent(file3)).toBe(false, `${file3} was not removed from list`);
|
expect(await dataTable.isItemPresent(file3)).toBe(false, `${file3} was not removed from list`);
|
||||||
items = items - 2;
|
items = items - 2;
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await dataTable.isItemPresent(file2)).toBe(true, `${file2} is not in trash`);
|
expect(await dataTable.isItemPresent(file2)).toBe(true, `${file2} is not in trash`);
|
||||||
expect(await dataTable.isItemPresent(file3)).toBe(true, `${file3} is not in trash`);
|
expect(await dataTable.isItemPresent(file3)).toBe(true, `${file3} is not in trash`);
|
||||||
@@ -162,7 +162,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await toolbar.clickMoreActionsDelete();
|
await toolbar.clickMoreActionsDelete();
|
||||||
expect(await dataTable.isItemPresent(folder1)).toBe(false, 'Item was not removed from list');
|
expect(await dataTable.isItemPresent(folder1)).toBe(false, 'Item was not removed from list');
|
||||||
items--;
|
items--;
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await dataTable.isItemPresent(folder1)).toBe(true, 'Item is not in trash');
|
expect(await dataTable.isItemPresent(folder1)).toBe(true, 'Item is not in trash');
|
||||||
expect(await dataTable.isItemPresent(file1InFolder)).toBe(false, 'Item is in trash');
|
expect(await dataTable.isItemPresent(file1InFolder)).toBe(false, 'Item is in trash');
|
||||||
@@ -204,7 +204,7 @@ describe('Delete and undo delete', () => {
|
|||||||
|
|
||||||
await page.clickSnackBarAction();
|
await page.clickSnackBarAction();
|
||||||
expect(await dataTable.isItemPresent(file5)).toBe(true, 'Item was not restored');
|
expect(await dataTable.isItemPresent(file5)).toBe(true, 'Item was not restored');
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('undo delete of folder with content - [C280503]', async () => {
|
it('undo delete of folder with content - [C280503]', async () => {
|
||||||
@@ -214,7 +214,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await toolbar.clickMoreActionsDelete();
|
await toolbar.clickMoreActionsDelete();
|
||||||
await page.clickSnackBarAction();
|
await page.clickSnackBarAction();
|
||||||
expect(await dataTable.isItemPresent(folder6)).toBe(true, 'Item was not restored');
|
expect(await dataTable.isItemPresent(folder6)).toBe(true, 'Item was not restored');
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await dataTable.doubleClickOnRowByName(folder6);
|
await dataTable.doubleClickOnRowByName(folder6);
|
||||||
expect(await dataTable.isItemPresent(file2InFolder)).toBe(true, 'file from folder not restored');
|
expect(await dataTable.isItemPresent(file2InFolder)).toBe(true, 'file from folder not restored');
|
||||||
});
|
});
|
||||||
@@ -227,7 +227,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await page.clickSnackBarAction();
|
await page.clickSnackBarAction();
|
||||||
expect(await dataTable.isItemPresent(file6)).toBe(true, `${file6} was not removed from list`);
|
expect(await dataTable.isItemPresent(file6)).toBe(true, `${file6} was not removed from list`);
|
||||||
expect(await dataTable.isItemPresent(file7)).toBe(true, `${file7} was not removed from list`);
|
expect(await dataTable.isItemPresent(file7)).toBe(true, `${file7} was not removed from list`);
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ describe('Delete and undo delete', () => {
|
|||||||
expect(message).toContain(`Undo`);
|
expect(message).toContain(`Undo`);
|
||||||
expect(await dataTable.isItemPresent(favFile1)).toBe(false, 'Item was not removed from list');
|
expect(await dataTable.isItemPresent(favFile1)).toBe(false, 'Item was not removed from list');
|
||||||
items--;
|
items--;
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await dataTable.isItemPresent(favFile1)).toBe(true, 'Item is not in trash');
|
expect(await dataTable.isItemPresent(favFile1)).toBe(true, 'Item is not in trash');
|
||||||
});
|
});
|
||||||
@@ -420,7 +420,7 @@ describe('Delete and undo delete', () => {
|
|||||||
expect(await dataTable.isItemPresent(favFile2)).toBe(false, `${favFile2} was not removed from list`);
|
expect(await dataTable.isItemPresent(favFile2)).toBe(false, `${favFile2} was not removed from list`);
|
||||||
expect(await dataTable.isItemPresent(favFile3)).toBe(false, `${favFile3} was not removed from list`);
|
expect(await dataTable.isItemPresent(favFile3)).toBe(false, `${favFile3} was not removed from list`);
|
||||||
items = items - 2;
|
items = items - 2;
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await dataTable.isItemPresent(favFile2)).toBe(true, `${favFile2} is not in trash`);
|
expect(await dataTable.isItemPresent(favFile2)).toBe(true, `${favFile2} is not in trash`);
|
||||||
expect(await dataTable.isItemPresent(favFile3)).toBe(true, `${favFile3} is not in trash`);
|
expect(await dataTable.isItemPresent(favFile3)).toBe(true, `${favFile3} is not in trash`);
|
||||||
@@ -432,7 +432,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await toolbar.clickMoreActionsDelete();
|
await toolbar.clickMoreActionsDelete();
|
||||||
expect(await dataTable.isItemPresent(favFolder1)).toBe(false, 'Item was not removed from list');
|
expect(await dataTable.isItemPresent(favFolder1)).toBe(false, 'Item was not removed from list');
|
||||||
items--;
|
items--;
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await dataTable.isItemPresent(favFolder1)).toBe(true, 'Item is not in trash');
|
expect(await dataTable.isItemPresent(favFolder1)).toBe(true, 'Item is not in trash');
|
||||||
expect(await dataTable.isItemPresent(file1InFolder)).toBe(false, 'Item is in trash');
|
expect(await dataTable.isItemPresent(file1InFolder)).toBe(false, 'Item is in trash');
|
||||||
@@ -472,7 +472,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await toolbar.clickMoreActionsDelete();
|
await toolbar.clickMoreActionsDelete();
|
||||||
await page.clickSnackBarAction();
|
await page.clickSnackBarAction();
|
||||||
expect(await dataTable.isItemPresent(favFile5)).toBe(true, 'Item was not restored');
|
expect(await dataTable.isItemPresent(favFile5)).toBe(true, 'Item was not restored');
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('undo delete of folder with content - [C280526]', async () => {
|
it('undo delete of folder with content - [C280526]', async () => {
|
||||||
@@ -482,7 +482,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await toolbar.clickMoreActionsDelete();
|
await toolbar.clickMoreActionsDelete();
|
||||||
await page.clickSnackBarAction();
|
await page.clickSnackBarAction();
|
||||||
expect(await dataTable.isItemPresent(favFolder6)).toBe(true, 'Item was not restored');
|
expect(await dataTable.isItemPresent(favFolder6)).toBe(true, 'Item was not restored');
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
await dataTable.doubleClickOnRowByName(favFolder6);
|
await dataTable.doubleClickOnRowByName(favFolder6);
|
||||||
expect(await dataTable.isItemPresent(file2InFolder)).toBe(true, 'file from folder not restored');
|
expect(await dataTable.isItemPresent(file2InFolder)).toBe(true, 'file from folder not restored');
|
||||||
});
|
});
|
||||||
@@ -495,7 +495,7 @@ describe('Delete and undo delete', () => {
|
|||||||
await page.clickSnackBarAction();
|
await page.clickSnackBarAction();
|
||||||
expect(await dataTable.isItemPresent(favFile6)).toBe(true, `${favFile6} was not removed from list`);
|
expect(await dataTable.isItemPresent(favFile6)).toBe(true, `${favFile6} was not removed from list`);
|
||||||
expect(await dataTable.isItemPresent(favFile7)).toBe(true, `${favFile7} was not removed from list`);
|
expect(await dataTable.isItemPresent(favFile7)).toBe(true, `${favFile7} was not removed from list`);
|
||||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -36,24 +36,24 @@ describe('Extensions - DocumentList presets', () => {
|
|||||||
const testData = [
|
const testData = [
|
||||||
{
|
{
|
||||||
id: 'app.files.name',
|
id: 'app.files.name',
|
||||||
fixtureLabel: 'Name'
|
label: 'Name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'app.files.thumbnail',
|
id: 'app.files.thumbnail',
|
||||||
fixtureLabel: 'Thumbnail'
|
label: 'Thumbnail'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'app.files.size',
|
id: 'app.files.size',
|
||||||
fixtureLabel: 'Size',
|
label: 'Size',
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'app.files.modifiedBy',
|
id: 'app.files.modifiedBy',
|
||||||
fixtureLabel: 'Test header'
|
label: 'Test header'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'some.id.createdBy',
|
id: 'some.id.createdBy',
|
||||||
fixtureLabel: 'New column'
|
label: 'New column'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -88,20 +88,16 @@ describe('Extensions - DocumentList presets', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Sets the columns to display - [C286700]', async () => {
|
it('Sets the columns to display - [C286700]', async () => {
|
||||||
const labels = testData
|
const expectedColumns = testData
|
||||||
.filter(item => !item.disabled)
|
.filter(item => !item.disabled)
|
||||||
.map(data => data.fixtureLabel);
|
.map(data => data.label);
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(labels.length, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Disabled items are not shown - [C286699]', async () => {
|
it('Disabled items are not shown - [C286699]', async () => {
|
||||||
const noColumnLabel = testData.find(item => item.disabled).fixtureLabel;
|
const noColumnLabel = testData.find(item => item.disabled).label;
|
||||||
const element = dataTable.getColumnHeaderByLabel(noColumnLabel);
|
const element = dataTable.getColumnHeaderByLabel(noColumnLabel);
|
||||||
|
|
||||||
expect(await element.isPresent()).toBe(false, `"${noColumnLabel}" is displayed`);
|
expect(await element.isPresent()).toBe(false, `"${noColumnLabel}" is displayed`);
|
||||||
|
@@ -107,7 +107,7 @@ describe('Library properties', () => {
|
|||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
|
|
||||||
expect(await infoDrawer.getHeaderTitle()).toEqual('Details');
|
expect(await infoDrawer.getHeaderTitle()).toEqual('Details');
|
||||||
expect(await infoDrawer.isTabPresent('About')).toBe(true, 'About tab is not displayed');
|
expect(await infoDrawer.isAboutTabDisplayed()).toBe(true, 'About tab is not displayed');
|
||||||
expect(await infoDrawer.isNameDisplayed()).toBe(true, 'Name field not displayed');
|
expect(await infoDrawer.isNameDisplayed()).toBe(true, 'Name field not displayed');
|
||||||
expect(await infoDrawer.isLibraryIdDisplayed()).toBe(true, 'Library ID field not displayed');
|
expect(await infoDrawer.isLibraryIdDisplayed()).toBe(true, 'Library ID field not displayed');
|
||||||
expect(await infoDrawer.isVisibilityDisplayed()).toBe(true, 'Visibility field not displayed');
|
expect(await infoDrawer.isVisibilityDisplayed()).toBe(true, 'Visibility field not displayed');
|
||||||
@@ -118,7 +118,7 @@ describe('Library properties', () => {
|
|||||||
expect((await infoDrawer.getVisibility()).toLowerCase()).toEqual((site.visibility).toLowerCase());
|
expect((await infoDrawer.getVisibility()).toLowerCase()).toEqual((site.visibility).toLowerCase());
|
||||||
expect(await infoDrawer.getDescription()).toEqual(site.description);
|
expect(await infoDrawer.getDescription()).toEqual(site.description);
|
||||||
|
|
||||||
expect(await infoDrawer.isButtonDisplayed('Edit')).toBe(true, 'Edit action is not displayed');
|
expect(await infoDrawer.isEditDisplayed()).toBe(true, 'Edit action is not displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Editable properties - [C289338]', async () => {
|
it('Editable properties - [C289338]', async () => {
|
||||||
@@ -126,18 +126,18 @@ describe('Library properties', () => {
|
|||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
|
|
||||||
expect(await infoDrawer.isButtonEnabled('Edit')).toBe(true, 'Edit action is not enabled');
|
expect(await infoDrawer.isEditEnabled()).toBe(true, 'Edit action is not enabled');
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
expect(await infoDrawer.isNameEnabled()).toBe(true, 'Name field not enabled');
|
expect(await infoDrawer.isNameEnabled()).toBe(true, 'Name field not enabled');
|
||||||
expect(await infoDrawer.isLibraryIdEnabled()).toBe(false, 'Library ID field not disabled');
|
expect(await infoDrawer.isLibraryIdEnabled()).toBe(false, 'Library ID field not disabled');
|
||||||
expect(await infoDrawer.isVisibilityEnabled()).toBe(true, 'Visibility field not enabled');
|
expect(await infoDrawer.isVisibilityEnabled()).toBe(true, 'Visibility field not enabled');
|
||||||
expect(await infoDrawer.isDescriptionEnabled()).toBe(true, 'Description field not enabled');
|
expect(await infoDrawer.isDescriptionEnabled()).toBe(true, 'Description field not enabled');
|
||||||
|
|
||||||
expect(await infoDrawer.isButtonDisplayed('Cancel')).toBe(true, 'Cancel button not displayed');
|
expect(await infoDrawer.isCancelDisplayed()).toBe(true, 'Cancel button not displayed');
|
||||||
expect(await infoDrawer.isButtonDisplayed('Update')).toBe(true, 'Update button not displayed');
|
expect(await infoDrawer.isUpdateDisplayed()).toBe(true, 'Update button not displayed');
|
||||||
expect(await infoDrawer.isButtonEnabled('Cancel')).toBe(true, 'Cancel button not enabled');
|
expect(await infoDrawer.isCancelEnabled()).toBe(true, 'Cancel button not enabled');
|
||||||
expect(await infoDrawer.isButtonEnabled('Update')).toBe(false, 'Update button not disabled');
|
expect(await infoDrawer.isUpdateEnabled()).toBe(false, 'Update button not disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Edit site details - [C289339]', async () => {
|
it('Edit site details - [C289339]', async () => {
|
||||||
@@ -145,15 +145,15 @@ describe('Library properties', () => {
|
|||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
|
|
||||||
expect(await infoDrawer.isButtonEnabled('Edit')).toBe(true, 'Edit action is not enabled');
|
expect(await infoDrawer.isEditEnabled()).toBe(true, 'Edit action is not enabled');
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
await infoDrawer.enterName(siteUpdated.name);
|
await infoDrawer.enterName(siteUpdated.name);
|
||||||
await infoDrawer.enterDescription(siteUpdated.description);
|
await infoDrawer.enterDescription(siteUpdated.description);
|
||||||
await infoDrawer.setVisibility(siteUpdated.visibility);
|
await infoDrawer.setVisibility(siteUpdated.visibility);
|
||||||
expect(await infoDrawer.isButtonEnabled('Update')).toBe(true, 'Update button not enabled');
|
expect(await infoDrawer.isUpdateEnabled()).toBe(true, 'Update button not enabled');
|
||||||
|
|
||||||
await infoDrawer.clickButton('Update');
|
await infoDrawer.clickUpdate();
|
||||||
|
|
||||||
expect(await page.getSnackBarMessage()).toEqual('Library properties updated');
|
expect(await page.getSnackBarMessage()).toEqual('Library properties updated');
|
||||||
expect(await dataTable.isItemPresent(siteUpdated.name)).toBe(true, 'New site name not displayed in the list');
|
expect(await dataTable.isItemPresent(siteUpdated.name)).toBe(true, 'New site name not displayed in the list');
|
||||||
@@ -172,14 +172,14 @@ describe('Library properties', () => {
|
|||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
|
|
||||||
expect(await infoDrawer.isButtonEnabled('Edit')).toBe(true, 'Edit action is not enabled');
|
expect(await infoDrawer.isEditEnabled()).toBe(true, 'Edit action is not enabled');
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
await infoDrawer.enterName(newName);
|
await infoDrawer.enterName(newName);
|
||||||
await infoDrawer.enterDescription(newDesc);
|
await infoDrawer.enterDescription(newDesc);
|
||||||
await infoDrawer.setVisibility(SITE_VISIBILITY.MODERATED);
|
await infoDrawer.setVisibility(SITE_VISIBILITY.MODERATED);
|
||||||
|
|
||||||
await infoDrawer.clickButton('Cancel');
|
await infoDrawer.clickCancel();
|
||||||
|
|
||||||
expect(await dataTable.isItemPresent(newName)).toBe(false, 'New site name is displayed in the list');
|
expect(await dataTable.isItemPresent(newName)).toBe(false, 'New site name is displayed in the list');
|
||||||
expect(await dataTable.isItemPresent(site.name)).toBe(true, 'Original site name not displayed in the list');
|
expect(await dataTable.isItemPresent(site.name)).toBe(true, 'Original site name not displayed in the list');
|
||||||
@@ -192,7 +192,7 @@ describe('Library properties', () => {
|
|||||||
await dataTable.selectItem(siteDup);
|
await dataTable.selectItem(siteDup);
|
||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
await infoDrawer.enterName(site.name);
|
await infoDrawer.enterName(site.name);
|
||||||
expect(await infoDrawer.isMessageDisplayed()).toBe(true, 'Message not displayed');
|
expect(await infoDrawer.isMessageDisplayed()).toBe(true, 'Message not displayed');
|
||||||
@@ -203,26 +203,26 @@ describe('Library properties', () => {
|
|||||||
await dataTable.selectItem(site.name);
|
await dataTable.selectItem(site.name);
|
||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
await infoDrawer.enterName(Utils.string257);
|
await infoDrawer.enterName(Utils.string257);
|
||||||
await Utils.pressTab();
|
await Utils.pressTab();
|
||||||
expect(await infoDrawer.isErrorDisplayed()).toBe(true, 'Message not displayed');
|
expect(await infoDrawer.isErrorDisplayed()).toBe(true, 'Message not displayed');
|
||||||
expect(await infoDrawer.getError()).toEqual('Use 256 characters or less for title');
|
expect(await infoDrawer.getError()).toEqual('Use 256 characters or less for title');
|
||||||
expect(await infoDrawer.isButtonEnabled('Update')).toBe(false, 'Update button not disabled');
|
expect(await infoDrawer.isUpdateEnabled()).toBe(false, 'Update button not disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Site description too long - [C289343]', async () => {
|
it('Site description too long - [C289343]', async () => {
|
||||||
await dataTable.selectItem(site.name);
|
await dataTable.selectItem(site.name);
|
||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
await infoDrawer.enterDescription(Utils.string513);
|
await infoDrawer.enterDescription(Utils.string513);
|
||||||
await Utils.pressTab();
|
await Utils.pressTab();
|
||||||
expect(await infoDrawer.isErrorDisplayed()).toBe(true, 'Message not displayed');
|
expect(await infoDrawer.isErrorDisplayed()).toBe(true, 'Message not displayed');
|
||||||
expect(await infoDrawer.getError()).toEqual('Use 512 characters or less for description');
|
expect(await infoDrawer.getError()).toEqual('Use 512 characters or less for description');
|
||||||
expect(await infoDrawer.isButtonEnabled('Update')).toBe(false, 'Update button not disabled');
|
expect(await infoDrawer.isUpdateEnabled()).toBe(false, 'Update button not disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Non manager', () => {
|
describe('Non manager', () => {
|
||||||
@@ -238,7 +238,7 @@ describe('Library properties', () => {
|
|||||||
await dataTable.selectItem(site.name);
|
await dataTable.selectItem(site.name);
|
||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
expect(await infoDrawer.isButtonDisplayed('Edit')).toBe(false, 'Edit action is displayed');
|
expect(await infoDrawer.isEditDisplayed()).toBe(false, 'Edit action is displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Error notification - [C289344]', async () => {
|
it('Error notification - [C289344]', async () => {
|
||||||
@@ -248,12 +248,12 @@ describe('Library properties', () => {
|
|||||||
await dataTable.selectItem(site.name);
|
await dataTable.selectItem(site.name);
|
||||||
await page.toolbar.clickViewDetails();
|
await page.toolbar.clickViewDetails();
|
||||||
await infoDrawer.waitForInfoDrawerToOpen();
|
await infoDrawer.waitForInfoDrawerToOpen();
|
||||||
await infoDrawer.clickButton('Edit');
|
await infoDrawer.clickEdit();
|
||||||
|
|
||||||
await apis.user.sites.updateSiteMember(site.id, user3, SITE_ROLES.SITE_CONSUMER.ROLE);
|
await apis.user.sites.updateSiteMember(site.id, user3, SITE_ROLES.SITE_CONSUMER.ROLE);
|
||||||
|
|
||||||
await infoDrawer.enterDescription('new description');
|
await infoDrawer.enterDescription('new description');
|
||||||
await infoDrawer.clickButton('Update');
|
await infoDrawer.clickUpdate();
|
||||||
|
|
||||||
expect(await page.getSnackBarMessage()).toEqual('There was an error updating library properties');
|
expect(await page.getSnackBarMessage()).toEqual('There was an error updating library properties');
|
||||||
});
|
});
|
||||||
|
@@ -98,62 +98,62 @@ describe('Empty list views', () => {
|
|||||||
|
|
||||||
it('Favorites - pagination controls not displayed - [C280111]', async () => {
|
it('Favorites - pagination controls not displayed - [C280111]', async () => {
|
||||||
await page.clickFavorites();
|
await page.clickFavorites();
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('File Libraries - pagination controls not displayed - [C280084]', async () => {
|
it('File Libraries - pagination controls not displayed - [C280084]', async () => {
|
||||||
await page.clickFileLibraries();
|
await page.clickFileLibraries();
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Personal Files - pagination controls not displayed - [C280075]', async () => {
|
it('Personal Files - pagination controls not displayed - [C280075]', async () => {
|
||||||
await page.clickPersonalFiles();
|
await page.clickPersonalFiles();
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Recent Files - pagination controls not displayed - [C280102]', async () => {
|
it('Recent Files - pagination controls not displayed - [C280102]', async () => {
|
||||||
await page.clickRecentFiles();
|
await page.clickRecentFiles();
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Shared Files - pagination controls not displayed - [C280094]', async () => {
|
it('Shared Files - pagination controls not displayed - [C280094]', async () => {
|
||||||
await page.clickSharedFiles();
|
await page.clickSharedFiles();
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Trash - pagination controls not displayed - [C280120]', async () => {
|
it('Trash - pagination controls not displayed - [C280120]', async () => {
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Search results - pagination controls not displayed - [C290123]', async () => {
|
it('Search results - pagination controls not displayed - [C290123]', async () => {
|
||||||
@@ -163,11 +163,11 @@ describe('Empty list views', () => {
|
|||||||
await searchInput.searchFor('qwertyuiop');
|
await searchInput.searchFor('qwertyuiop');
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
|
|
||||||
expect(await pagination.range.isPresent()).toBe(false);
|
expect(await pagination.isRangePresent()).toBe(false, 'Range is present');
|
||||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
expect(await pagination.isMaxItemsPresent()).toBe(false, 'Max items is present');
|
||||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
expect(await pagination.isCurrentPagePresent()).toBe(false, 'Current page is present');
|
||||||
expect(await pagination.totalPages.isPresent()).toBe(false);
|
expect(await pagination.isTotalPagesPresent()).toBe(false, 'Total pages is present');
|
||||||
expect(await pagination.previousButton.isPresent()).toBe(false);
|
expect(await pagination.isPreviousButtonPresent()).toBe(false, 'Previous button is present');
|
||||||
expect(await pagination.nextButton.isPresent()).toBe(false);
|
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -88,12 +88,10 @@ describe('Favorites', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C280482]', async () => {
|
it('has the correct columns - [C280482]', async () => {
|
||||||
const expectedHeader = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Modified', 'Modified by' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Modified', 'Modified by' ];
|
||||||
const headers = dataTable.getColumnHeaders();
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
const count = await headers.count();
|
|
||||||
expect(count).toBe(5 + 1, 'Incorrect number of columns');
|
|
||||||
|
|
||||||
expect(await dataTable.getHeaderText()).toEqual(expectedHeader);
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('displays the favorite files and folders - [C213226]', async () => {
|
it('displays the favorite files and folders - [C213226]', async () => {
|
||||||
|
@@ -105,14 +105,10 @@ describe('File Libraries', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C217095]', async () => {
|
it('has the correct columns - [C217095]', async () => {
|
||||||
const labels = [ 'Name', 'My Role', 'Visibility' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'My Role', 'Visibility' ];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(3 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('User can see only the sites he is a member of - [C280501]', async () => {
|
it('User can see only the sites he is a member of - [C280501]', async () => {
|
||||||
@@ -129,17 +125,11 @@ describe('File Libraries', () => {
|
|||||||
[userSitePublic]: SITE_VISIBILITY.PUBLIC
|
[userSitePublic]: SITE_VISIBILITY.PUBLIC
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowCells = await dataTable.getRows().map((row) => {
|
const sitesList = await dataTable.getSitesNameAndVisibility();
|
||||||
return row.all(dataTable.cell).map(async cell => await cell.getText());
|
|
||||||
});
|
|
||||||
const sitesList = rowCells.reduce((acc, cell) => {
|
|
||||||
acc[cell[1]] = cell[3].toUpperCase();
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
Object.keys(expectedSitesVisibility).forEach((site) => {
|
for (const site of Object.keys(expectedSitesVisibility)) {
|
||||||
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('User role is correctly displayed - [C289903]', async () => {
|
it('User role is correctly displayed - [C289903]', async () => {
|
||||||
@@ -150,17 +140,11 @@ describe('File Libraries', () => {
|
|||||||
[adminSite4]: SITE_ROLES.SITE_MANAGER.LABEL
|
[adminSite4]: SITE_ROLES.SITE_MANAGER.LABEL
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowCells = await dataTable.getRows().map((row) => {
|
const sitesList = await dataTable.getSitesNameAndRole();
|
||||||
return row.all(dataTable.cell).map(async cell => await cell.getText());
|
|
||||||
});
|
|
||||||
const sitesList = rowCells.reduce((acc, cell) => {
|
|
||||||
acc[cell[1]] = cell[2];
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
Object.keys(expectedSitesRoles).forEach((site) => {
|
for (const site of Object.keys(expectedSitesRoles)) {
|
||||||
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Site ID is displayed when two sites have the same name - [C217098]', async () => {
|
it('Site ID is displayed when two sites have the same name - [C217098]', async () => {
|
||||||
@@ -192,14 +176,10 @@ describe('File Libraries', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C289893]', async () => {
|
it('has the correct columns - [C289893]', async () => {
|
||||||
const labels = [ 'Name', 'My Role', 'Visibility' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'My Role', 'Visibility' ];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(3 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('User can see only his favorite sites - [C289897]', async () => {
|
it('User can see only his favorite sites - [C289897]', async () => {
|
||||||
@@ -216,17 +196,11 @@ describe('File Libraries', () => {
|
|||||||
[userSitePublic]: SITE_VISIBILITY.PUBLIC
|
[userSitePublic]: SITE_VISIBILITY.PUBLIC
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowCells = await dataTable.getRows().map((row) => {
|
const sitesList = await dataTable.getSitesNameAndVisibility();
|
||||||
return row.all(dataTable.cell).map(async cell => await cell.getText());
|
|
||||||
});
|
|
||||||
const sitesList = rowCells.reduce((acc, cell) => {
|
|
||||||
acc[cell[1]] = cell[3].toUpperCase();
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
Object.keys(expectedSitesVisibility).forEach((site) => {
|
for (const site of Object.keys(expectedSitesVisibility)) {
|
||||||
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('User role is correctly displayed - [C289904]', async () => {
|
it('User role is correctly displayed - [C289904]', async () => {
|
||||||
@@ -237,17 +211,11 @@ describe('File Libraries', () => {
|
|||||||
[adminSite4]: SITE_ROLES.SITE_MANAGER.LABEL
|
[adminSite4]: SITE_ROLES.SITE_MANAGER.LABEL
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowCells = await dataTable.getRows().map((row) => {
|
const sitesList = await dataTable.getSitesNameAndRole();
|
||||||
return row.all(dataTable.cell).map(async cell => await cell.getText());
|
|
||||||
});
|
|
||||||
const sitesList = rowCells.reduce((acc, cell) => {
|
|
||||||
acc[cell[1]] = cell[2];
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
Object.keys(expectedSitesRoles).forEach((site) => {
|
for (const site of Object.keys(expectedSitesRoles)) {
|
||||||
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Site ID is displayed when two sites have the same name - [C289896]', async () => {
|
it('Site ID is displayed when two sites have the same name - [C289896]', async () => {
|
||||||
|
@@ -96,18 +96,14 @@ describe('Personal Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C217142]', async () => {
|
it('has the correct columns - [C217142]', async () => {
|
||||||
const labels = [ 'Name', 'Size', 'Modified', 'Modified by' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'Size', 'Modified', 'Modified by' ];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(4 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('has default sorted column - [C217143]', async () => {
|
it('has default sorted column - [C217143]', async () => {
|
||||||
expect(await dataTable.getSortedColumnHeader().getText()).toBe('Modified');
|
expect(await dataTable.getSortedColumnHeaderText()).toBe('Modified');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('has user created content - [C213242]', async () => {
|
it('has user created content - [C213242]', async () => {
|
||||||
|
@@ -81,18 +81,14 @@ describe('Recent Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C213168]', async () => {
|
it('has the correct columns - [C213168]', async () => {
|
||||||
const labels = [ 'Name', 'Location', 'Size', 'Modified' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Modified' ];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(4 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('default sorting column - [C213171]', async () => {
|
it('default sorting column - [C213171]', async () => {
|
||||||
expect(await dataTable.getSortedColumnHeader().getText()).toBe('Modified');
|
expect(await dataTable.getSortedColumnHeaderText()).toBe('Modified');
|
||||||
expect(await dataTable.getSortingOrder()).toBe('desc');
|
expect(await dataTable.getSortingOrder()).toBe('desc');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -87,12 +87,10 @@ describe('Shared Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C213113]', async () => {
|
it('has the correct columns - [C213113]', async () => {
|
||||||
const expectedHeader = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Modified', 'Modified by', 'Shared by' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Modified', 'Modified by', 'Shared by' ];
|
||||||
const headers = dataTable.getColumnHeaders();
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
const count = await headers.count();
|
|
||||||
expect(count).toBe(6 + 1, 'Incorrect number of columns');
|
|
||||||
|
|
||||||
expect(await dataTable.getHeaderText()).toEqual(expectedHeader);
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('default sorting column - [C213115]', async () => {
|
it('default sorting column - [C213115]', async () => {
|
||||||
|
@@ -101,14 +101,10 @@ describe('Trash', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C213217]', async () => {
|
it('has the correct columns - [C213217]', async () => {
|
||||||
const labels = [ 'Name', 'Location', 'Size', 'Deleted', 'Deleted by' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Deleted', 'Deleted by' ];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(5 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('displays the files and folders deleted by everyone - [C280493]', async () => {
|
it('displays the files and folders deleted by everyone - [C280493]', async () => {
|
||||||
@@ -134,14 +130,10 @@ describe('Trash', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct columns - [C280494]', async () => {
|
it('has the correct columns - [C280494]', async () => {
|
||||||
const labels = [ 'Name', 'Location', 'Size', 'Deleted'];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'Location', 'Size', 'Deleted'];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(4 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('displays the files and folders deleted by the user - [C213218]', async () => {
|
it('displays the files and folders deleted by the user - [C213218]', async () => {
|
||||||
@@ -154,7 +146,7 @@ describe('Trash', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('default sorting column - [C213219]', async () => {
|
it('default sorting column - [C213219]', async () => {
|
||||||
expect(await dataTable.getSortedColumnHeader().getText()).toBe('Deleted');
|
expect(await dataTable.getSortedColumnHeaderText()).toBe('Deleted');
|
||||||
expect(await dataTable.getSortingOrder()).toBe('desc');
|
expect(await dataTable.getSortingOrder()).toBe('desc');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -185,8 +185,7 @@ describe('Breadcrumb', () => {
|
|||||||
expect(await breadcrumb.getAllItems()).toEqual(expectedBreadcrumb);
|
expect(await breadcrumb.getAllItems()).toEqual(expectedBreadcrumb);
|
||||||
});
|
});
|
||||||
|
|
||||||
// disabled cause of ACA-1039
|
describe('as admin', () => {
|
||||||
xdescribe('as admin', () => {
|
|
||||||
const user2 = 'a_user';
|
const user2 = 'a_user';
|
||||||
const userFolder = `userFolder-${Utils.random()}`; let userFolderId;
|
const userFolder = `userFolder-${Utils.random()}`; let userFolderId;
|
||||||
const user2Api = new RepoClient(user2, user2);
|
const user2Api = new RepoClient(user2, user2);
|
||||||
@@ -203,7 +202,7 @@ describe('Breadcrumb', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
xit(`Breadcrumb on navigation to a user's home - [C260970]`, async () => {
|
it(`Breadcrumb on navigation to a user's home - [C260970]`, async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName('User Homes');
|
await page.dataTable.doubleClickOnRowByName('User Homes');
|
||||||
await page.dataTable.doubleClickOnRowByName(user2);
|
await page.dataTable.doubleClickOnRowByName(user2);
|
||||||
expect(await breadcrumb.getAllItems()).toEqual([ 'Personal Files', 'User Homes', user2 ]);
|
expect(await breadcrumb.getAllItems()).toEqual([ 'Personal Files', 'User Homes', user2 ]);
|
||||||
|
@@ -73,12 +73,12 @@ describe('Pagination on multiple pages on Favorites', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Pagination control default values - [C280113]', async () => {
|
it('Pagination control default values - [C280113]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C280114]', async () => {
|
it('Items per page values - [C280114]', async () => {
|
||||||
@@ -94,24 +94,24 @@ describe('Pagination on multiple pages on Favorites', () => {
|
|||||||
it('current page menu items - [C280115]', async () => {
|
it('current page menu items - [C280115]', async () => {
|
||||||
await pagination.openMaxItemsMenu()
|
await pagination.openMaxItemsMenu()
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(5);
|
expect(await pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(3);
|
expect(await pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -122,43 +122,43 @@ describe('Pagination on multiple pages on Favorites', () => {
|
|||||||
it('change the current page from menu - [C280116]', async () => {
|
it('change the current page from menu - [C280116]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
expect(await pagination.getText(pagination.range)).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.getText(pagination.currentPage)).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('navigate to next and previous pages - [C280119]', async () => {
|
it('navigate to next and previous pages - [C280119]', async () => {
|
||||||
await pagination.nextButton.click();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('26-50 of 101');
|
expect(await pagination.getRange()).toContain('26-50 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C280117]', async () => {
|
it('Previous button is disabled on first page - [C280117]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C280118]', async () => {
|
it('Next button is disabled on last page - [C280118]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -67,12 +67,12 @@ describe('Pagination on multiple pages on File Libraries', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('Pagination control default values - [C280086]', async () => {
|
it('Pagination control default values - [C280086]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C280087]', async () => {
|
it('Items per page values - [C280087]', async () => {
|
||||||
@@ -88,24 +88,24 @@ describe('Pagination on multiple pages on File Libraries', () => {
|
|||||||
it('current page menu items - [C280088]', async () => {
|
it('current page menu items - [C280088]', async () => {
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(5);
|
expect(await pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(3);
|
expect(await pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -117,10 +117,10 @@ describe('Pagination on multiple pages on File Libraries', () => {
|
|||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
expect(await dataTable.isItemPresent('site-60')).toBe(true, 'Site-60 not found on page');
|
expect(await dataTable.isItemPresent('site-60')).toBe(true, 'Site-60 not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
@@ -129,31 +129,31 @@ describe('Pagination on multiple pages on File Libraries', () => {
|
|||||||
it('navigate to next and previous pages - [C280092]', async () => {
|
it('navigate to next and previous pages - [C280092]', async () => {
|
||||||
await pagination.clickNext();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('26-50 of 101');
|
expect(await pagination.getRange()).toContain('26-50 of 101');
|
||||||
expect(await dataTable.isItemPresent('site-31')).toBe(true, 'Site-31 not found on page');
|
expect(await dataTable.isItemPresent('site-31')).toBe(true, 'Site-31 not found on page');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await dataTable.isItemPresent('site-12')).toBe(true, 'Site-12 not found on page');
|
expect(await dataTable.isItemPresent('site-12')).toBe(true, 'Site-12 not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C280090]', async () => {
|
it('Previous button is disabled on first page - [C280090]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C280091]', async () => {
|
it('Next button is disabled on last page - [C280091]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -69,12 +69,12 @@ describe('Pagination on multiple pages on Personal Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Pagination control default values - [C280077]', async () => {
|
it('Pagination control default values - [C280077]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C280078]', async () => {
|
it('Items per page values - [C280078]', async () => {
|
||||||
@@ -90,24 +90,24 @@ describe('Pagination on multiple pages on Personal Files', () => {
|
|||||||
it('current page menu items - [C280079]', async () => {
|
it('current page menu items - [C280079]', async () => {
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(pagination.menu.getItemsCount()).toBe(5);
|
expect(pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(pagination.menu.getItemsCount()).toBe(3);
|
expect(pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -119,10 +119,10 @@ describe('Pagination on multiple pages on Personal Files', () => {
|
|||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
expect(await dataTable.isItemPresent('file-60')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-60')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
@@ -131,31 +131,31 @@ describe('Pagination on multiple pages on Personal Files', () => {
|
|||||||
it('navigate to next and previous pages - [C280083]', async () => {
|
it('navigate to next and previous pages - [C280083]', async () => {
|
||||||
await pagination.clickNext();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('26-50 of 101');
|
expect(await pagination.getRange()).toContain('26-50 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-31')).toBe(true, 'file-31 not found on page');
|
expect(await dataTable.isItemPresent('file-31')).toBe(true, 'file-31 not found on page');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-12')).toBe(true, 'file-12 not found on page');
|
expect(await dataTable.isItemPresent('file-12')).toBe(true, 'file-12 not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C280081]', async () => {
|
it('Previous button is disabled on first page - [C280081]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C280082]', async () => {
|
it('Next button is disabled on last page - [C280082]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -69,12 +69,12 @@ describe('Pagination on multiple pages on Recent Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Pagination control default values - [C280104]', async () => {
|
it('Pagination control default values - [C280104]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C280105]', async () => {
|
it('Items per page values - [C280105]', async () => {
|
||||||
@@ -90,24 +90,24 @@ describe('Pagination on multiple pages on Recent Files', () => {
|
|||||||
it('current page menu items - [C280106]', async () => {
|
it('current page menu items - [C280106]', async () => {
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(5);
|
expect(await pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(3);
|
expect(await pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -119,43 +119,43 @@ describe('Pagination on multiple pages on Recent Files', () => {
|
|||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('navigate to next and previous pages - [C280110]', async () => {
|
it('navigate to next and previous pages - [C280110]', async () => {
|
||||||
await pagination.nextButton.click();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('26-50 of 101');
|
expect(await pagination.getRange()).toContain('26-50 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(pagination.range.getText()).toContain('1-25 of 101');
|
expect(pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
expect(dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C280108]', async () => {
|
it('Previous button is disabled on first page - [C280108]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C280109]', async () => {
|
it('Next button is disabled on last page - [C280109]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -71,12 +71,12 @@ describe('Pagination on multiple pages on Search Results', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Pagination control default values - [C290125]', async () => {
|
it('Pagination control default values - [C290125]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C290126]', async () => {
|
it('Items per page values - [C290126]', async () => {
|
||||||
@@ -92,24 +92,24 @@ describe('Pagination on multiple pages on Search Results', () => {
|
|||||||
it('current page menu items - [C290127]', async () => {
|
it('current page menu items - [C290127]', async () => {
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(5);
|
expect(await pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(3);
|
expect(await pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -121,40 +121,40 @@ describe('Pagination on multiple pages on Search Results', () => {
|
|||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
expect(await pagination.range.getText()).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('navigate to next and previous pages - [C290131]', async () => {
|
it('navigate to next and previous pages - [C290131]', async () => {
|
||||||
await pagination.nextButton.click();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
expect(await pagination.range.getText()).toContain('26-50 of 101');
|
expect(await pagination.getRange()).toContain('26-50 of 101');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
expect(pagination.range.getText()).toContain('1-25 of 101');
|
expect(pagination.getRange()).toContain('1-25 of 101');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C290129]', async () => {
|
it('Previous button is disabled on first page - [C290129]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C290130]', async () => {
|
it('Next button is disabled on last page - [C290130]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -72,12 +72,12 @@ describe('Pagination on multiple pages on Shared Files', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Pagination control default values - [C280095]', async () => {
|
it('Pagination control default values - [C280095]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C280096]', async () => {
|
it('Items per page values - [C280096]', async () => {
|
||||||
@@ -94,24 +94,24 @@ describe('Pagination on multiple pages on Shared Files', () => {
|
|||||||
it('current page menu items - [C280097]', async () => {
|
it('current page menu items - [C280097]', async () => {
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(5);
|
expect(await pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(3);
|
expect(await pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -123,43 +123,43 @@ describe('Pagination on multiple pages on Shared Files', () => {
|
|||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('navigate to next and previous pages - [C280101]', async () => {
|
it('navigate to next and previous pages - [C280101]', async () => {
|
||||||
await pagination.nextButton.click();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('26-50 of 101');
|
expect(await pagination.getRange()).toContain('26-50 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C280099]', async () => {
|
it('Previous button is disabled on first page - [C280099]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C280100]', async () => {
|
it('Next button is disabled on last page - [C280100]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -81,32 +81,32 @@ describe('Pagination on single page', () => {
|
|||||||
|
|
||||||
it('page selector not displayed on Favorites - [C280112]', async () => {
|
it('page selector not displayed on Favorites - [C280112]', async () => {
|
||||||
await page.clickFavoritesAndWait();
|
await page.clickFavoritesAndWait();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('page selector not displayed on File Libraries - [C280085]', async () => {
|
it('page selector not displayed on File Libraries - [C280085]', async () => {
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.clickFileLibrariesAndWait();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('page selector not displayed on Personal Files - [C280076]', async () => {
|
it('page selector not displayed on Personal Files - [C280076]', async () => {
|
||||||
await page.clickPersonalFilesAndWait();
|
await page.clickPersonalFilesAndWait();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('page selector not displayed on Recent Files - [C280103]', async () => {
|
it('page selector not displayed on Recent Files - [C280103]', async () => {
|
||||||
await page.clickRecentFilesAndWait();
|
await page.clickRecentFilesAndWait();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('page selector not displayed on Shared Files - [C280094]', async () => {
|
it('page selector not displayed on Shared Files - [C280094]', async () => {
|
||||||
await page.clickSharedFilesAndWait();
|
await page.clickSharedFilesAndWait();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('page selector not displayed on Trash - [C280121]', async () => {
|
it('page selector not displayed on Trash - [C280121]', async () => {
|
||||||
await page.clickTrashAndWait();
|
await page.clickTrashAndWait();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('page selector not displayed on Search results - [C290124]', async () => {
|
it('page selector not displayed on Search results - [C290124]', async () => {
|
||||||
@@ -114,7 +114,7 @@ describe('Pagination on single page', () => {
|
|||||||
await searchInput.checkOnlyFiles();
|
await searchInput.checkOnlyFiles();
|
||||||
await searchInput.searchFor(file);
|
await searchInput.searchFor(file);
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
expect(await pagination.isPagesButtonPresent()).toBe(false, 'page selector displayed');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -68,12 +68,12 @@ describe('Pagination on multiple pages on Trash', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Pagination control default values - [C280122]', async () => {
|
it('Pagination control default values - [C280122]', async () => {
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await pagination.maxItems.getText()).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.totalPages.getText()).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Items per page values - [C280123]', async () => {
|
it('Items per page values - [C280123]', async () => {
|
||||||
@@ -89,24 +89,24 @@ describe('Pagination on multiple pages on Trash', () => {
|
|||||||
it('current page menu items - [C280124]', async () => {
|
it('current page menu items - [C280124]', async () => {
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('25');
|
await pagination.menu.clickMenuItem('25');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('25');
|
expect(await pagination.getMaxItems()).toContain('25');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 5');
|
expect(await pagination.getTotalPages()).toContain('of 5');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(5);
|
expect(await pagination.menu.getItemsCount()).toBe(5);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('50');
|
await pagination.menu.clickMenuItem('50');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('50');
|
expect(await pagination.getMaxItems()).toContain('50');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 3');
|
expect(await pagination.getTotalPages()).toContain('of 3');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(3);
|
expect(await pagination.menu.getItemsCount()).toBe(3);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
|
|
||||||
await pagination.openMaxItemsMenu();
|
await pagination.openMaxItemsMenu();
|
||||||
await pagination.menu.clickMenuItem('100');
|
await pagination.menu.clickMenuItem('100');
|
||||||
expect(await pagination.getText(pagination.maxItems)).toContain('100');
|
expect(await pagination.getMaxItems()).toContain('100');
|
||||||
expect(await pagination.getText(pagination.totalPages)).toContain('of 2');
|
expect(await pagination.getTotalPages()).toContain('of 2');
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
expect(await pagination.menu.getItemsCount()).toBe(2);
|
expect(await pagination.menu.getItemsCount()).toBe(2);
|
||||||
await pagination.menu.closeMenu();
|
await pagination.menu.closeMenu();
|
||||||
@@ -118,43 +118,43 @@ describe('Pagination on multiple pages on Trash', () => {
|
|||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(3);
|
await pagination.menu.clickNthItem(3);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('51-75 of 101');
|
expect(await pagination.getRange()).toContain('51-75 of 101');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 3');
|
expect(await pagination.getCurrentPage()).toContain('Page 3');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled');
|
expect(await pagination.isPreviousEnabled()).toBe(true, 'Previous button is not enabled');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
|
expect(await pagination.isNextEnabled()).toBe(true, 'Next button is not enabled');
|
||||||
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-40')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('navigate to next and previous pages - [C280128]', async () => {
|
it('navigate to next and previous pages - [C280128]', async () => {
|
||||||
await pagination.nextButton.click();
|
await pagination.clickNext();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(pagination.range.getText()).toContain('26-50 of 101');
|
expect(pagination.getRange()).toContain('26-50 of 101');
|
||||||
expect(dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
expect(dataTable.isItemPresent('file-70')).toBe(true, 'File not found on page');
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
|
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(2);
|
await pagination.menu.clickNthItem(2);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
await pagination.previousButton.click();
|
await pagination.clickPrevious();
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
expect(await pagination.range.getText()).toContain('1-25 of 101');
|
expect(await pagination.getRange()).toContain('1-25 of 101');
|
||||||
expect(await dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
expect(await dataTable.isItemPresent('file-88')).toBe(true, 'File not found on page');
|
||||||
|
|
||||||
await pagination.resetToDefaultPageNumber();
|
await pagination.resetToDefaultPageNumber();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Previous button is disabled on first page - [C280126]', async () => {
|
it('Previous button is disabled on first page - [C280126]', async () => {
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 1');
|
expect(await pagination.getCurrentPage()).toContain('Page 1');
|
||||||
expect(await pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
|
expect(await pagination.isPreviousEnabled()).toBe(false, 'Previous button is enabled on first page');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Next button is disabled on last page - [C280127]', async () => {
|
it('Next button is disabled on last page - [C280127]', async () => {
|
||||||
await pagination.openCurrentPageMenu();
|
await pagination.openCurrentPageMenu();
|
||||||
await pagination.menu.clickNthItem(5);
|
await pagination.menu.clickNthItem(5);
|
||||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page');
|
||||||
expect(await pagination.currentPage.getText()).toContain('Page 5');
|
expect(await pagination.getCurrentPage()).toContain('Page 5');
|
||||||
expect(await pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled on last page');
|
expect(await pagination.isNextEnabled()).toBe(false, 'Next button is enabled on last page');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -24,8 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowsingPage, LoginPage } from '../../pages/pages';
|
import { BrowsingPage, LoginPage } from '../../pages/pages';
|
||||||
// import { Utils } from '../../utilities/utils';
|
import { Utils } from '../../utilities/utils';
|
||||||
import { browser } from 'protractor';
|
|
||||||
|
|
||||||
describe('Search input', () => {
|
describe('Search input', () => {
|
||||||
const loginPage = new LoginPage();
|
const loginPage = new LoginPage();
|
||||||
@@ -38,8 +37,7 @@ describe('Search input', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async (done) => {
|
beforeEach(async (done) => {
|
||||||
// await Utils.pressEscape();
|
await Utils.pressEscape();
|
||||||
await browser.actions().mouseMove(browser.$('body'), { x: 0, y: 0 }).click().perform();
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -172,14 +172,10 @@ describe('Search results - libraries', () => {
|
|||||||
await searchInput.searchFor(site1.name);
|
await searchInput.searchFor(site1.name);
|
||||||
await dataTable.waitForBody();
|
await dataTable.waitForBody();
|
||||||
|
|
||||||
const labels = [ 'Name', 'My Role', 'Visibility' ];
|
const expectedColumns = [ 'Thumbnail', 'Name', 'My Role', 'Visibility' ];
|
||||||
const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label));
|
const actualColumns = await dataTable.getColumnHeadersText();
|
||||||
|
|
||||||
expect(await dataTable.getColumnHeaders().count()).toBe(3 + 1, 'Incorrect number of columns');
|
expect(actualColumns).toEqual(expectedColumns);
|
||||||
|
|
||||||
await elements.forEach(async (element, index) => {
|
|
||||||
expect(await element.isPresent()).toBe(true, `"${labels[index]}" is missing`);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Library visibility is correctly displayed - [C290017]', async () => {
|
it('Library visibility is correctly displayed - [C290017]', async () => {
|
||||||
@@ -194,17 +190,11 @@ describe('Search results - libraries', () => {
|
|||||||
[userSitePublic]: SITE_VISIBILITY.PUBLIC
|
[userSitePublic]: SITE_VISIBILITY.PUBLIC
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowCells = await dataTable.getRows().map((row) => {
|
const sitesList = await dataTable.getSitesNameAndVisibility();
|
||||||
return row.all(dataTable.cell).map(async cell => await cell.getText());
|
|
||||||
});
|
|
||||||
const sitesList = rowCells.reduce((acc, cell) => {
|
|
||||||
acc[cell[1]] = cell[3].toUpperCase();
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
Object.keys(expectedSitesVisibility).forEach((expectedSite) => {
|
for (const site of Object.keys(expectedSitesVisibility)) {
|
||||||
expect(sitesList[expectedSite]).toEqual(expectedSitesVisibility[expectedSite]);
|
expect(sitesList[site]).toEqual(expectedSitesVisibility[site]);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('User role is correctly displayed - [C290018]', async () => {
|
it('User role is correctly displayed - [C290018]', async () => {
|
||||||
@@ -220,17 +210,11 @@ describe('Search results - libraries', () => {
|
|||||||
[adminSite4]: SITE_ROLES.SITE_MANAGER.LABEL
|
[adminSite4]: SITE_ROLES.SITE_MANAGER.LABEL
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowCells = await dataTable.getRows().map((row) => {
|
const sitesList = await dataTable.getSitesNameAndRole();
|
||||||
return row.all(dataTable.cell).map(async cell => await cell.getText());
|
|
||||||
});
|
|
||||||
const sitesList = rowCells.reduce((acc, cell) => {
|
|
||||||
acc[cell[1]] = cell[2];
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
Object.keys(expectedSitesRoles).forEach((expectedSite) => {
|
for (const site of Object.keys(expectedSitesRoles)) {
|
||||||
expect(sitesList[expectedSite]).toEqual(expectedSitesRoles[expectedSite]);
|
expect(sitesList[site]).toEqual(expectedSitesRoles[site]);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Private sites are not displayed when user is not a member - [C290019]', async () => {
|
it('Private sites are not displayed when user is not a member - [C290019]', async () => {
|
||||||
|
@@ -52,6 +52,7 @@ exports.config = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
SELENIUM_PROMISE_MANAGER: true,
|
SELENIUM_PROMISE_MANAGER: true,
|
||||||
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
browserName: 'chrome',
|
browserName: 'chrome',
|
||||||
chromeOptions: {
|
chromeOptions: {
|
||||||
@@ -71,7 +72,7 @@ exports.config = {
|
|||||||
// baseUrl: 'http://localhost:4000',
|
// baseUrl: 'http://localhost:4000',
|
||||||
getPageTimeout: 50000,
|
getPageTimeout: 50000,
|
||||||
|
|
||||||
framework: 'jasmine2',
|
framework: 'jasmine',
|
||||||
jasmineNodeOpts: {
|
jasmineNodeOpts: {
|
||||||
showColors: true,
|
showColors: true,
|
||||||
defaultTimeoutInterval: 60000,
|
defaultTimeoutInterval: 60000,
|
||||||
|
Reference in New Issue
Block a user