mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-3209]Fix e2e about attach file from local (#5944)
* Fix attach file from local * Exclude test * no message * Change hruser to new user * Use hruser * no message
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element } from 'protractor';
|
||||
import { by, element, browser } from 'protractor';
|
||||
import * as remote from 'selenium-webdriver/remote';
|
||||
import { DocumentListPage } from '../pages/document-list.page';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
@@ -129,6 +130,23 @@ export class ContentNodeSelectorDialogPage {
|
||||
await this.clickMoveCopyButton();
|
||||
}
|
||||
|
||||
async attachFileFromLocal(fileName: string, fileLocation: string): Promise<void> {
|
||||
await this.checkDialogIsDisplayed();
|
||||
|
||||
await browser.setFileDetector(new remote.FileDetector());
|
||||
const uploadButton = element(by.css('adf-upload-button input'));
|
||||
await BrowserVisibility.waitUntilElementIsPresent(uploadButton);
|
||||
await uploadButton.sendKeys(fileLocation);
|
||||
|
||||
await this.dataTable.waitForTableBody();
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
await this.dataTable.checkRowContentIsDisplayed(fileName);
|
||||
|
||||
await this.clickContentNodeSelectorResult(fileName);
|
||||
await this.checkCopyMoveButtonIsEnabled();
|
||||
await this.clickMoveCopyButton();
|
||||
}
|
||||
|
||||
async searchAndSelectResult(searchText: string, name: string) {
|
||||
await this.typeIntoNodeSelectorSearchField(searchText);
|
||||
try {
|
||||
|
@@ -65,7 +65,7 @@ export class InfoDrawerPage {
|
||||
}
|
||||
}
|
||||
|
||||
async getNoOfTabs(): Promise<Number> {
|
||||
async getNoOfTabs(): Promise<number> {
|
||||
return this.tabsPage.getNoOfTabs();
|
||||
}
|
||||
|
||||
|
@@ -38,6 +38,7 @@ export class AttachFileWidgetCloudPage {
|
||||
const uploadButton = element(by.css('adf-upload-button input'));
|
||||
await BrowserVisibility.waitUntilElementIsPresent(uploadButton);
|
||||
await uploadButton.sendKeys(fileLocation);
|
||||
await BrowserActions.click(uploadButton);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(uploadButton);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user