small improvements (#762)

This commit is contained in:
Adina Parpalita
2018-10-29 16:44:57 +02:00
committed by Denys Vuika
parent 1807456a3e
commit 66769fc0c8
4 changed files with 66 additions and 117 deletions

View File

@@ -39,7 +39,7 @@ describe('Empty list views', () => {
const loginPage = new LoginPage();
const logoutPage = new LogoutPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { dataTable, pagination } = page;
beforeAll(async (done) => {
await apis.admin.people.createUser({ username });
@@ -93,4 +93,64 @@ describe('Empty list views', () => {
expect(await dataTable.getEmptyStateText()).toContain('Items you delete are moved to the Trash.');
expect(await dataTable.getEmptyStateText()).toContain('Empty Trash to permanently delete items.');
});
it('Favorites - pagination controls not displayed - [C280111]', async () => {
await page.clickFavorites();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('File Libraries - pagination controls not displayed - [C280084]', async () => {
await page.clickFileLibraries();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Personal Files - pagination controls not displayed - [C280075]', async () => {
await page.clickPersonalFiles();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Recent Files - pagination controls not displayed - [C280102]', async () => {
await page.clickRecentFiles();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Shared Files - pagination controls not displayed - [C280094]', async () => {
await page.clickSharedFiles();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Trash - pagination controls not displayed - [C280120]', async () => {
await page.clickTrash();
expect(await pagination.range.isPresent()).toBe(false);
expect(pagination.maxItems.isPresent()).toBe(false);
expect(pagination.currentPage.isPresent()).toBe(false);
expect(pagination.totalPages.isPresent()).toBe(false);
expect(pagination.previousButton.isPresent()).toBe(false);
expect(pagination.nextButton.isPresent()).toBe(false);
});
});

View File

@@ -137,7 +137,7 @@ describe('Favorites', () => {
it('Location column redirect - file in site - [C280485]', async () => {
await dataTable.clickItemLocation(fileName1);
expect(breadcrumb.getAllItems()).toEqual([ 'File Libraries', siteName ]);
expect(await breadcrumb.getAllItems()).toEqual([ 'File Libraries', siteName ]);
});
it('Navigate into folder from Favorites - [C213230]', async () => {

View File

@@ -1,111 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
import { Utils } from '../../utilities/utils';
import { RepoClient } from '../../utilities/repo-client/repo-client';
describe('Pagination on empty page', () => {
const username = `user-${Utils.random()}`;
const adminApi = new RepoClient();
const loginPage = new LoginPage();
const logoutPage = new LogoutPage();
const page = new BrowsingPage();
const { pagination } = page;
beforeAll(async (done) => {
await adminApi.people.createUser({ username });
await loginPage.loginWith(username);
done();
});
afterAll(async (done) => {
await logoutPage.load();
done();
});
it('Favorites - pagination controls not displayed - [C280111]', async () => {
await page.clickFavorites();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('File Libraries - pagination controls not displayed - [C280084]', async () => {
await page.clickFileLibraries();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Personal Files - pagination controls not displayed - [C280075]', async () => {
await page.clickPersonalFiles();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Recent Files - pagination controls not displayed - [C280102]', async () => {
await page.clickRecentFiles();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Shared Files - pagination controls not displayed - [C280094]', async () => {
await page.clickSharedFiles();
expect(await pagination.range.isPresent()).toBe(false);
expect(await pagination.maxItems.isPresent()).toBe(false);
expect(await pagination.currentPage.isPresent()).toBe(false);
expect(await pagination.totalPages.isPresent()).toBe(false);
expect(await pagination.previousButton.isPresent()).toBe(false);
expect(await pagination.nextButton.isPresent()).toBe(false);
});
it('Trash - pagination controls not displayed - [C280120]', async () => {
await page.clickTrash();
expect(await pagination.range.isPresent()).toBe(false);
expect(pagination.maxItems.isPresent()).toBe(false);
expect(pagination.currentPage.isPresent()).toBe(false);
expect(pagination.totalPages.isPresent()).toBe(false);
expect(pagination.previousButton.isPresent()).toBe(false);
expect(pagination.nextButton.isPresent()).toBe(false);
});
});