Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACA-4487] support search forms layout #2195

Merged
merged 6 commits into from
Jun 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/extending/application-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ Below is the list of public actions types you can use in the plugin definitions
| 1.7.0 | FULLSCREEN_VIEWER | n/a | Enters fullscreen mode to view the file opened in the Viewer. |
| 1.7.0 | LOGOUT | n/a | Log out and redirect to Login screen. |
| 1.7.0 | RELOAD_DOCUMENT_LIST | n/a | Reload active document list |
| 1.7.0 | TOGGLE_SEARCH_FILTER | n/a | Toggle Filter component visibility in Search Results. |
| 1.7.0 | SHOW_SEARCH_FILTER | n/a | Show Filter component in Search Results. |
| 1.7.0 | HIDE_SEARCH_FILTER | n/a | Hide Filter component in Search Results |
| 1.8.0 | VIEW_NODE | NodeId<`string`> , [ViewNodeExtras](../features/file-viewer.md#details)<`any`> | Lightweight preview of a node by id. Can be invoked from extensions. For details also see [File Viewer](../features/file-viewer.md#details) |
| 1.8.0 | CLOSE_PREVIEW | n/a | Closes the viewer ( preview of the item ) |
| 1.9.0 | RESET_SELECTION | n/a | Resets active document list selection |
Expand Down
3 changes: 0 additions & 3 deletions docs/ja/extending/application-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ export class MyService {
| 1.7.0 | FULLSCREEN_VIEWER | n/a | ビューアで開いたファイルを表示するために、フルスクリーンモードを開始します。 |
| 1.7.0 | LOGOUT | n/a | ログアウトして、ログイン画面にリダイレクトします。 |
| 1.7.0 | RELOAD_DOCUMENT_LIST | n/a | アクティブなドキュメントリストを再読み込みします。 |
| 1.7.0 | TOGGLE_SEARCH_FILTER | n/a | 検索結果のフィルターコンポーネントの表示を切り替えます。 |
| 1.7.0 | SHOW_SEARCH_FILTER | n/a | 検索結果にフィルターコンポーネントを表示します。 |
| 1.7.0 | HIDE_SEARCH_FILTER | n/a | 検索結果でフィルターコンポーネントを非表示にします |
| 1.8.0 | VIEW_NODE | string | ID によるノードの軽量プレビュー。拡張機能から呼び出すことができます。 |
| 1.8.0 | CLOSE_PREVIEW | n/a | ビューア (アイテムのプレビュー) を閉じます。 |
| 1.9.0 | RESET_SELECTION | n/a | アクティブなドキュメントリストの選択をリセットします |
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/context-submenus-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
dhrn marked this conversation as resolved.
Show resolved Hide resolved
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
dhrn marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/document-presets-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/header-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,18 +289,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/info-drawer-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/info-drawer-no-tabs-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/metadata-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
12 changes: 0 additions & 12 deletions e2e/resources/extensibility-configs/viewer-ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@
}
],
"toolbar": [
{
"id": "app.toolbar.searchFilter",
"order": 50,
"title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
"icon": "view_list",
"actions": {
"click": "TOGGLE_SEARCH_FILTER"
},
"rules": {
"visible": "app.navigation.isSearchResults"
}
},
{
"id": "app.toolbar.share",
"type": "custom",
Expand Down
2 changes: 1 addition & 1 deletion e2e/suites/actions-available/files-folders/generic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('Generic tests : ', () => {
await searchInput.clickSearchButton();
await searchInput.searchFor('*');

expect(await toolbar.getButtons()).toEqual(['Toggle search filter']);
expect(await toolbar.isEmpty()).toEqual(true);
});
});

Expand Down
8 changes: 4 additions & 4 deletions e2e/suites/actions-available/files-folders/test-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ const searchDocxContextMenu = [
'Edit Aspects',
'Permissions'
];
const searchToolbarPrimary = ['Toggle search filter', 'Share', 'Download', 'View', 'View Details', 'More Actions'];
const searchSharedToolbarPrimary = ['Toggle search filter', 'Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const searchToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
const searchSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const searchFavLockedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions', 'Permissions'];
const searchSharedFavLockedContextMenu = [
'Shared Link Settings',
Expand Down Expand Up @@ -818,7 +818,7 @@ const favoritesFolderFavContextMenu = ['Download', 'Edit', 'Remove Favorite', 'M
const favoritesFolderFavToolbarMore = ['Edit', 'Remove Favorite', 'Move', 'Copy', 'Delete'];

const searchFolderContextMenu = ['Download', 'Edit', 'Favorite', 'Copy', 'Edit Aspects', 'Permissions'];
const searchFolderToolbarPrimary = ['Toggle search filter', 'Download', 'View Details', 'More Actions'];
const searchFolderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
const searchFolderToolbarMore = ['Edit', 'Favorite', 'Copy', 'Edit Aspects', 'Permissions'];
const searchFolderFavContextMenu = ['Download', 'Edit', 'Remove Favorite', 'Copy', 'Edit Aspects', 'Permissions'];
const searchFolderFavToolbarMore = ['Edit', 'Remove Favorite', 'Copy', 'Edit Aspects', 'Permissions'];
Expand Down Expand Up @@ -887,7 +887,7 @@ const favoritesMultipleSelAllFavToolbarMore = ['Remove Favorite', 'Move', 'Copy'
const searchMultipleSelContextMenu = ['Download', 'Favorite', 'Copy', 'Permissions'];
// TODO: raise issue to remove 'Permissions'
const searchMultipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Copy', 'Permissions'];
const searchMultipleSelToolbarPrimary = ['Toggle search filter', 'Download', 'View Details', 'More Actions'];
const searchMultipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];
// TODO: raise issue to remove 'Permissions'
const searchMultipleSelToolbarMore = ['Favorite', 'Copy', 'Permissions'];
// TODO: raise issue to remove 'Permissions'
Expand Down
6 changes: 3 additions & 3 deletions e2e/suites/actions-available/libraries/test-data-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const memberNotFavContextMenu = ['Leave Library', 'Delete', 'Favorite'];
const memberToolbarPrimary = ['Leave Library', 'View Details', 'More Actions'];
const favToolbarMore = ['Delete', 'Remove Favorite'];
const notFavToolbarMore = ['Delete', 'Favorite'];
const searchMemberToolbarPrimary = ['Toggle search filter', 'Leave Library', 'View Details', 'More Actions'];
const searchReqJoinToolbarPrimary = ['Toggle search filter', 'Cancel Join Request', 'More Actions'];
const searchNotMemberToolbarPrimary = ['Toggle search filter', 'Join', 'More Actions'];
const searchMemberToolbarPrimary = ['Leave Library', 'View Details', 'More Actions'];
const searchReqJoinToolbarPrimary = ['Cancel Join Request', 'More Actions'];
const searchNotMemberToolbarPrimary = ['Join', 'More Actions'];
const reqJoinToolbarMore = ['Cancel Join Request', 'More Actions'];
const notMemberFavContextMenu = ['Join', 'Delete', 'Remove Favorite'];
const notMemberNotFavContextMenu = ['Join', 'Delete', 'Favorite'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function collaboratorTests(siteName?: string) {
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileSharedFav.name);

const expectedToolbarPrimary = ['Toggle search filter', 'Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const expectedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const expectedToolbarMore = ['Edit Offline', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions', 'Edit Aspects', 'Permissions'];

await testUtil.checkToolbarActions(testData.fileSharedFav.name, expectedToolbarPrimary, expectedToolbarMore);
Expand Down Expand Up @@ -208,7 +208,7 @@ export function filesLockedByCurrentUser(siteName?: string) {
await searchInput.searchFor(testData.fileLockedByUser);
await searchResultsPage.waitForResults();

const expectedToolbarPrimary = ['Toggle search filter', 'Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const expectedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const expectedToolbarMore = ['Cancel Editing', 'Upload New Version', 'Remove Favorite', 'Copy', 'Manage Versions'];

await testUtil.checkToolbarActions(testData.fileLockedByUser, expectedToolbarPrimary, expectedToolbarMore);
Expand Down Expand Up @@ -314,7 +314,7 @@ export function filesLockedByOtherUser(siteName?: string) {
await searchInput.searchFor(testData.fileLockedByUser);
await searchResultsPage.waitForResults();

const expectedToolbarPrimary = ['Toggle search filter', 'Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const expectedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const expectedToolbarMore = ['Cancel Editing', 'Remove Favorite', 'Copy', 'Manage Versions', 'Permissions'];

await testUtil.checkToolbarActions(testData.fileLockedByUser, expectedToolbarPrimary, expectedToolbarMore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const consumerSharedFavContextMenu = ['Shared Link Settings', 'Download', 'View'
const consumerToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
const consumerSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];

const searchConsumerToolbarPrimary = ['Toggle search filter', 'Share', 'Download', 'View', 'View Details', 'More Actions'];
const searchConsumerSharedToolbarPrimary = ['Toggle search filter', 'Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];
const searchConsumerToolbarPrimary = ['Share', 'Download', 'View', 'View Details', 'More Actions'];
const searchConsumerSharedToolbarPrimary = ['Shared Link Settings', 'Download', 'View', 'View Details', 'More Actions'];

const consumerToolbarMore = ['Favorite', 'Copy', 'Manage Versions'];
const consumerFavToolbarMore = ['Remove Favorite', 'Copy', 'Manage Versions'];
Expand Down Expand Up @@ -323,7 +323,7 @@ export const fileLockedByUser = `file-${random}-my-locked.txt`;
const consumerFolderContextMenu = ['Download', 'Favorite', 'Copy'];
const consumerFolderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
const consumerFolderToolbarMore = ['Favorite', 'Copy'];
const searchConsumerFolderToolbarPrimary = ['Toggle search filter', 'Download', 'View Details', 'More Actions'];
const searchConsumerFolderToolbarPrimary = ['Download', 'View Details', 'More Actions'];
const consumerFolderFavContextMenu = ['Download', 'Remove Favorite', 'Copy'];
const consumerFolderFavToolbarMore = ['Remove Favorite', 'Copy'];

Expand Down Expand Up @@ -369,7 +369,7 @@ const multipleSelAllFavContextMenu = ['Download', 'Remove Favorite', 'Copy'];
const multipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];
const multipleSelToolbarMore = ['Favorite', 'Copy'];
const multipleSelAllFavToolbarMore = ['Remove Favorite', 'Copy'];
const searchMultipleSelToolbarPrimary = ['Toggle search filter', 'Download', 'View Details', 'More Actions'];
const searchMultipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];

// ---- FAVORITES workarounds ----

Expand Down
12 changes: 1 addition & 11 deletions e2e/suites/list-views/empty-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/

import { AdminActions, LoginPage, BrowsingPage, SearchResultsPage, Utils } from '@alfresco/aca-testing-shared';
import { AdminActions, BrowsingPage, LoginPage, Utils } from '@alfresco/aca-testing-shared';

describe('Empty list views', () => {
const username = `user-${Utils.random()}`;
const loginPage = new LoginPage();
const page = new BrowsingPage();
const searchResultsPage = new SearchResultsPage();
const { dataTable, pagination } = page;
const { searchInput } = page.header;
const adminApiActions = new AdminActions();
Expand Down Expand Up @@ -150,15 +149,6 @@ describe('Empty list views', () => {
expect(await pagination.isNextButtonPresent()).toBe(false, 'Next button is present');
});

it('[C279189] Search filters panel is displayed on empty Search Results page', async () => {
await searchInput.clickSearchButton();
/* cspell:disable-next-line */
await searchInput.searchFor('qwertyuiop');
await dataTable.waitForBody();

expect(await searchResultsPage.filters.isSearchFiltersPanelDisplayed()).toBe(true, 'Search filters panel is not present');
});

it('[C290020] Empty Search results - Libraries', async () => {
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
Expand Down
Loading