diff --git a/e2e/protractor.excludes.json b/e2e/protractor.excludes.json new file mode 100644 index 000000000..b6eb2373d --- /dev/null +++ b/e2e/protractor.excludes.json @@ -0,0 +1,3 @@ +{ + "C280632" : "https://issues.alfresco.com/jira/browse/ACA-3805" +} diff --git a/e2e/suites/actions-available/files-folders/search-results.ts b/e2e/suites/actions-available/files-folders/search-results.ts index 1ce4fde00..862d54895 100755 --- a/e2e/suites/actions-available/files-folders/search-results.ts +++ b/e2e/suites/actions-available/files-folders/search-results.ts @@ -49,12 +49,12 @@ export function searchResultsTests() { await searchResultsPage.waitForResults(); }); - it('File Office - [C297637]', async () => { + it('[C297637] File Office', async () => { await testUtil.checkToolbarActions(testData.fileDocx.name, testData.fileDocx.searchToolbarPrimary, testData.fileDocx.searchToolbarMore); await testUtil.checkContextMenu(testData.fileDocx.name, testData.fileDocx.searchContextMenu); }); - it('File Office, favorite - [C291827]', async () => { + it('[C291827] File Office, favorite', async () => { await testUtil.checkToolbarActions( testData.fileDocxFav.name, testData.fileDocxFav.searchToolbarPrimary, @@ -63,17 +63,17 @@ export function searchResultsTests() { await testUtil.checkContextMenu(testData.fileDocxFav.name, testData.fileDocxFav.searchContextMenu); }); - it('File simple - [C297638]', async () => { + it('[C297638] File simple', async () => { await testUtil.checkToolbarActions(testData.file.name, testData.file.searchToolbarPrimary, testData.file.searchToolbarMore); await testUtil.checkContextMenu(testData.file.name, testData.file.searchContextMenu); }); - it('File favorite - [C280661]', async () => { + it('[C280661] File favorite', async () => { await testUtil.checkToolbarActions(testData.fileFav.name, testData.fileFav.searchToolbarPrimary, testData.fileFav.searchToolbarMore); await testUtil.checkContextMenu(testData.fileFav.name, testData.fileFav.searchContextMenu); }); - it('File Office, shared - [C297627]', async () => { + it('[C297627] File Office, shared', async () => { await testUtil.checkToolbarActions( testData.fileDocxShared.name, testData.fileDocxShared.searchToolbarPrimary, @@ -82,7 +82,7 @@ export function searchResultsTests() { await testUtil.checkContextMenu(testData.fileDocxShared.name, testData.fileDocxShared.searchContextMenu); }); - it('File Office, shared, favorite - [C280631]', async () => { + it('[C280631] File Office, shared, favorite', async () => { await testUtil.checkToolbarActions( testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.searchToolbarPrimary, @@ -91,12 +91,12 @@ export function searchResultsTests() { await testUtil.checkContextMenu(testData.fileDocxSharedFav.name, testData.fileDocxSharedFav.searchContextMenu); }); - it('File shared - [C280632]', async () => { + it('[C280632] File shared', async () => { await testUtil.checkToolbarActions(testData.fileShared.name, testData.fileShared.searchToolbarPrimary, testData.fileShared.searchToolbarMore); await testUtil.checkContextMenu(testData.fileShared.name, testData.fileShared.searchContextMenu); }); - it('File shared, favorite - [C280641]', async () => { + it('[C280641] File shared, favorite', async () => { await testUtil.checkToolbarActions( testData.fileSharedFav.name, testData.fileSharedFav.searchToolbarPrimary, @@ -105,12 +105,12 @@ export function searchResultsTests() { await testUtil.checkContextMenu(testData.fileSharedFav.name, testData.fileSharedFav.searchContextMenu); }); - it('File locked - [C297628]', async () => { + it('[C297628] File locked', async () => { await testUtil.checkToolbarActions(testData.fileLocked.name, testData.fileLocked.searchToolbarPrimary, testData.fileLocked.searchToolbarMore); await testUtil.checkContextMenu(testData.fileLocked.name, testData.fileLocked.searchContextMenu); }); - it('File favorite, locked - [C280648]', async () => { + it('[C280648] File favorite, locked', async () => { await testUtil.checkToolbarActions( testData.fileFavLocked.name, testData.fileFavLocked.searchToolbarPrimary, @@ -119,7 +119,7 @@ export function searchResultsTests() { await testUtil.checkContextMenu(testData.fileFavLocked.name, testData.fileFavLocked.searchContextMenu); }); - it('File shared, locked - [C280574]', async () => { + it('[C280574] File shared, locked', async () => { await testUtil.checkToolbarActions( testData.fileSharedLocked.name, testData.fileSharedLocked.searchToolbarPrimary, @@ -128,7 +128,7 @@ export function searchResultsTests() { await testUtil.checkContextMenu(testData.fileSharedLocked.name, testData.fileSharedLocked.searchContextMenu); }); - it('File shared, favorite, locked - [C280642]', async () => { + it('[C280642] File shared, favorite, locked', async () => { await testUtil.checkToolbarActions( testData.fileSharedFavLocked.name, testData.fileSharedFavLocked.searchToolbarPrimary, @@ -146,12 +146,12 @@ export function searchResultsTests() { await searchResultsPage.waitForResults(); }); - it('Folder not favorite - [C280609]', async () => { + it('[C280609] Folder not favorite', async () => { await testUtil.checkToolbarActions(testData.folder.name, testData.folder.searchToolbarPrimary, testData.folder.searchToolbarMore); await testUtil.checkContextMenu(testData.folder.name, testData.folder.searchContextMenu); }); - it('Folder favorite - [C291828]', async () => { + it('[C291828] Folder favorite', async () => { await testUtil.checkToolbarActions(testData.folderFav.name, testData.folderFav.searchToolbarPrimary, testData.folderFav.searchToolbarMore); await testUtil.checkContextMenu(testData.folderFav.name, testData.folderFav.searchContextMenu); }); @@ -165,7 +165,7 @@ export function searchResultsTests() { await searchResultsPage.waitForResults(); }); - it('multiple files - [C291820]', async () => { + it('[C291820] multiple files', async () => { await testUtil.checkMultipleSelContextMenu([testData.file.name, testData.fileDocxShared.name], testData.multipleSel.searchContextMenu); await testUtil.checkMultipleSelToolbarActions( [testData.file.name, testData.fileDocxShared.name], @@ -174,7 +174,7 @@ export function searchResultsTests() { ); }); - it('multiple files - all favorite - [C326690]', async () => { + it('[C326690] multiple files - all favorite', async () => { await testUtil.checkMultipleSelContextMenu( [testData.fileDocxFav.name, testData.fileSharedFav.name], testData.multipleSelAllFav.searchContextMenu @@ -186,7 +186,7 @@ export function searchResultsTests() { ); }); - it('multiple locked files - [C297626]', async () => { + it('[C297626] multiple locked files', async () => { await testUtil.checkMultipleSelContextMenu( [testData.fileLocked.name, testData.fileSharedFavLocked.name], testData.multipleSel.searchContextMenu @@ -198,7 +198,7 @@ export function searchResultsTests() { ); }); - it('multiple folders - [C291821]', async () => { + it('[C291821] multiple folders', async () => { await searchInput.clickSearchButton(); await searchInput.searchFor('folder-'); await searchResultsPage.waitForResults(); @@ -211,7 +211,7 @@ export function searchResultsTests() { ); }); - it('both files and folders - [C291822]', async () => { + it('[C291822] both files and folders', async () => { await searchInput.clickSearchButton(); await searchInput.searchFor(`=${testData.file.name} or =${testData.folderFav.name}`); await searchResultsPage.waitForResults(); diff --git a/package-lock.json b/package-lock.json index 354329b2b..9436b59a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7342,6 +7342,23 @@ "dev": true, "optional": true }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true + }, + "filenamify": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.1.0.tgz", + "integrity": "sha512-KQV/uJDI9VQgN7sHH1Zbk6+42cD6mnQ2HONzkXUfPJ+K2FC8GZ1dpewbbHw0Sz8Tf5k3EVdHVayM4DoAwWlmtg==", + "dev": true, + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.1", + "trim-repeated": "^1.0.0" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -13327,6 +13344,38 @@ } } }, + "protractor-smartrunner": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/protractor-smartrunner/-/protractor-smartrunner-0.1.1.tgz", + "integrity": "sha512-t5L6AM2mRnpOEkg3Ib0C5pLGgWu2rOzjutF/UAEevBgwwil5M1m/E6bv/uUn+kAyImJJCCI000ssrz7JcVP/dw==", + "dev": true, + "requires": { + "filenamify": "4.1.0", + "fs-extra": "8.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, "proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -15855,6 +15904,15 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "style-loader": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.2.1.tgz", @@ -16414,6 +16472,15 @@ "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", "dev": true }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "ts-node": { "version": "8.10.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", diff --git a/package.json b/package.json index 4d6f92708..fb232e47f 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "node-stream-zip": "^1.9.1", "prettier": "^2.0.5", "protractor": "^7.0.0", + "protractor-smartrunner": "^0.1.1", "rxjs-tslint": "^0.1.8", "rxjs-tslint-rules": "^4.34.0", "selenium-webdriver": "^4.0.0-alpha.7", diff --git a/protractor.conf.js b/protractor.conf.js index 23305b93a..c6980bc5f 100755 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -1,13 +1,13 @@ // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts -const AlfrescoApi = require('@alfresco/js-api').AlfrescoApiCompatibility; const path = require('path'); const { SpecReporter } = require('jasmine-spec-reporter'); const afterLaunch = require('./e2e/e2e-config/hooks/after-launch'); const fs = require('fs'); require('dotenv').config(); +const SmartRunner = require('protractor-smartrunner'); const projectRoot = path.resolve(__dirname); const downloadFolder = `${projectRoot}/e2e-downloads`; const e2eFolder = path.resolve(projectRoot, 'e2e'); @@ -137,7 +137,10 @@ exports.config = { jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 100000, - print: function() {} + print: function() {}, + ...SmartRunner.withOptionalExclusions( + path.resolve(__dirname, 'e2e/protractor.excludes.json') + ), }, plugins: [ diff --git a/src/app.config.json b/src/app.config.json index 6258104a7..ab4d58b0d 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -396,6 +396,7 @@ "pattern": "cm:name:'(.*?)'", "field": "cm:name", "placeholder": "Enter the name", + "searchPrefix" : "*", "searchSuffix" : "*" } }