mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
eliminate dead code in e2e tests (#3220)
* reduce shared testing dependency * dead code cleanup * eliminate dead code * fix export
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser, by, By } from 'protractor';
|
||||
import { by } from 'protractor';
|
||||
import { BrowsingPage } from './browsing-page';
|
||||
import { SearchSortingPicker } from '../components/search/search-sorting-picker';
|
||||
import { SearchFilters } from '../components/search/search-filters';
|
||||
@@ -30,9 +30,6 @@ import { BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class SearchResultsPage extends BrowsingPage {
|
||||
root = this.byCss('aca-search-results');
|
||||
chipList = this.root.element(by.css('.adf-search-chip-list'));
|
||||
infoText = this.root.element(by.css('.adf-search-results--info-text'));
|
||||
|
||||
sortingPicker = new SearchSortingPicker('aca-search-results');
|
||||
filters = new SearchFilters('aca-search-results');
|
||||
|
||||
@@ -40,10 +37,6 @@ export class SearchResultsPage extends BrowsingPage {
|
||||
await this.dataTable.waitForBody();
|
||||
}
|
||||
|
||||
async getResultsFoundText(): Promise<string> {
|
||||
return this.infoText.getText();
|
||||
}
|
||||
|
||||
async getName(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Name"] div.search-file-name')).getText();
|
||||
}
|
||||
@@ -67,17 +60,4 @@ export class SearchResultsPage extends BrowsingPage {
|
||||
async getLocation(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Name"] a')).getText();
|
||||
}
|
||||
|
||||
async getResultsChipsValues(): Promise<string[]> {
|
||||
const chips = this.chipList.all(by.css('.mat-chip'));
|
||||
return chips.map(async (elem) => {
|
||||
return (await elem.getText()).replace(`\ncancel`, '');
|
||||
});
|
||||
}
|
||||
|
||||
async removeChip(chipName: string): Promise<void> {
|
||||
const chip = browser.element(By.cssContainingText('.mat-chip', chipName));
|
||||
const closeChip = chip.element(by.css('.mat-chip-remove'));
|
||||
await BrowserActions.click(closeChip);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user