From 8aed6f6ff496a9d22759ba5cca951924b1a01cd1 Mon Sep 17 00:00:00 2001 From: Adina Parpalita Date: Mon, 29 Oct 2018 09:34:06 +0200 Subject: [PATCH] small improvements --- e2e/suites/list-views/empty-list.test.ts | 62 ++++++++++- e2e/suites/list-views/favorites.test.ts | 2 +- e2e/suites/pagination/pag-empty-page.test.ts | 111 ------------------- src/assets/i18n/en.json | 8 +- 4 files changed, 66 insertions(+), 117 deletions(-) delete mode 100755 e2e/suites/pagination/pag-empty-page.test.ts diff --git a/e2e/suites/list-views/empty-list.test.ts b/e2e/suites/list-views/empty-list.test.ts index 364cbc469a..aa31eccb64 100755 --- a/e2e/suites/list-views/empty-list.test.ts +++ b/e2e/suites/list-views/empty-list.test.ts @@ -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); + }); }); diff --git a/e2e/suites/list-views/favorites.test.ts b/e2e/suites/list-views/favorites.test.ts index d0f8d182df..874e17a292 100755 --- a/e2e/suites/list-views/favorites.test.ts +++ b/e2e/suites/list-views/favorites.test.ts @@ -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 () => { diff --git a/e2e/suites/pagination/pag-empty-page.test.ts b/e2e/suites/pagination/pag-empty-page.test.ts deleted file mode 100755 index 2524d96dfd..0000000000 --- a/e2e/suites/pagination/pag-empty-page.test.ts +++ /dev/null @@ -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 . - */ - -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); - }); -}); diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index cdc2fc30ca..5cc1b48377 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -259,10 +259,10 @@ }, "PERMISSIONS": { "DIALOG": { - "TITLE": "Manage Permissons", + "TITLE": "Manage Permissions", "CLOSE": "Close", - "INHERIT_PERMISSIONS_BUTTON": "Inherit Permission", - "INHERITED_PERMISSIONS_BUTTON": "Permission Inherited" + "INHERIT_PERMISSIONS_BUTTON": "Inherit Permissions", + "INHERITED_PERMISSIONS_BUTTON": "Permissions Inherited" } }, "SHARED_LINK": { @@ -296,7 +296,7 @@ }, "ERRORS": { "GENERIC": "We hit a problem", - "EXISTENT_SITE": "This Library ID isn't available. Try a different Library.", + "EXISTENT_SITE": "This Library ID isn't available. Try a different Library ID.", "CONFLICT": "This Library ID is already used. Check the trashcan.", "ID_TOO_LONG": "Use 72 characters or less for the URL name", "DESCRIPTION_TOO_LONG": "Use 512 characters or less for description",