mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[AAE-3177] Fix tests that are using attach file widget (#5939)
* Fix few tests with alfresco content type * Fix start-task-form-cloud suite: make tests independent * no message * Add new candidatebaseapp.zip - fix attach file widget with alfresco content & local type to have destination folder empty * Fix json
This commit is contained in:
parent
4ea73ec8f3
commit
dc912aea5b
@ -36,7 +36,8 @@ import {
|
||||
ContentNodeSelectorDialogPage,
|
||||
ProcessInstancesService,
|
||||
ProcessDefinitionsService,
|
||||
FileBrowserUtil, ProcessCloudWidgetPage
|
||||
FileBrowserUtil, ProcessCloudWidgetPage,
|
||||
QueryService
|
||||
} from '@alfresco/adf-testing';
|
||||
import { StartProcessCloudConfiguration } from './config/start-process-cloud.config';
|
||||
import { ProcessCloudDemoPage } from './pages/process-cloud-demo.page';
|
||||
@ -66,6 +67,8 @@ describe('Start Task Form', () => {
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const queryService = new QueryService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
||||
const startProcessCloudConfiguration = new StartProcessCloudConfiguration();
|
||||
const startProcessCloudConfig = startProcessCloudConfiguration.getConfiguration();
|
||||
@ -115,6 +118,8 @@ describe('Start Task Form', () => {
|
||||
'name': StringUtil.generateRandomString(),
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
const task = await queryService.getProcessInstanceTasks(uploadContentFileProcess.entry.id, candidateBaseApp);
|
||||
await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp);
|
||||
|
||||
uploadDefaultFileProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp, {
|
||||
'name': StringUtil.generateRandomString(),
|
||||
@ -148,7 +153,6 @@ describe('Start Task Form', () => {
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
const tasksService = new TasksService(apiService);
|
||||
const standaloneTaskId = await tasksService.getTaskId(standaloneTaskName, candidateBaseApp);
|
||||
await tasksService.deleteTask(standaloneTaskId, candidateBaseApp);
|
||||
|
||||
@ -313,18 +317,10 @@ describe('Start Task Form', () => {
|
||||
await processCloudDemoPage.processListCloudComponent().selectRow(uploadContentFileProcess.entry.name);
|
||||
await processDetailsCloudDemoPage.checkTaskIsDisplayed('UploadFileTask');
|
||||
await processDetailsCloudDemoPage.selectProcessTaskByName('UploadFileTask');
|
||||
await taskFormCloudComponent.clickClaimButton();
|
||||
|
||||
const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile');
|
||||
await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile');
|
||||
await contentNodeSelectorDialogPage.checkDialogIsDisplayed();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name);
|
||||
|
||||
await contentNodeSelectorDialogPage.clickMoveCopyButton();
|
||||
await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed();
|
||||
await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name);
|
||||
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
await contentFileWidget.removeFile(testFileModel.name);
|
||||
@ -389,15 +385,8 @@ describe('Start Task Form', () => {
|
||||
|
||||
const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile');
|
||||
await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile');
|
||||
await contentNodeSelectorDialogPage.checkDialogIsDisplayed();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name);
|
||||
|
||||
await contentNodeSelectorDialogPage.clickMoveCopyButton();
|
||||
await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed();
|
||||
|
||||
await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name);
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile');
|
||||
});
|
||||
@ -411,14 +400,8 @@ describe('Start Task Form', () => {
|
||||
|
||||
const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile');
|
||||
await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile');
|
||||
await contentNodeSelectorDialogPage.checkDialogIsDisplayed();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name);
|
||||
|
||||
await contentNodeSelectorDialogPage.clickMoveCopyButton();
|
||||
await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed();
|
||||
await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name);
|
||||
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile');
|
||||
@ -437,13 +420,9 @@ describe('Start Task Form', () => {
|
||||
|
||||
const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile');
|
||||
await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile');
|
||||
await contentNodeSelectorDialogPage.checkDialogIsDisplayed();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.clickMoveCopyButton();
|
||||
await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed();
|
||||
|
||||
await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name);
|
||||
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile');
|
||||
await taskFormCloudComponent.clickSaveButton();
|
||||
@ -463,13 +442,9 @@ describe('Start Task Form', () => {
|
||||
|
||||
const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile');
|
||||
await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile');
|
||||
await contentNodeSelectorDialogPage.checkDialogIsDisplayed();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name);
|
||||
await contentNodeSelectorDialogPage.clickMoveCopyButton();
|
||||
await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed();
|
||||
|
||||
await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name);
|
||||
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile');
|
||||
const taskId = await taskHeaderCloudPage.getId();
|
||||
|
@ -5,18 +5,11 @@
|
||||
"C362241": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||
"C362242": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||
"C362265": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||
"C311290": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311287": "https://issues.alfresco.com/jira/browse/AAE-3200",
|
||||
"C260140": "https://issues.alfresco.com/jira/browse/AAE-3200",
|
||||
"C261160": "https://issues.alfresco.com/jira/browse/AAE-3200",
|
||||
"C246534": "https://issues.alfresco.com/jira/browse/AAE-3200",
|
||||
"C310358": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311285": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311287": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311288": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311289": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311292": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311293": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C311295": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C315292": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C260140": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C261160": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177",
|
||||
"C246534": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177"
|
||||
"C311290": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177"
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -101,6 +101,7 @@ export class ContentNodeSelectorDialogPage {
|
||||
|
||||
async clickContentNodeSelectorResult(name: string): Promise<void> {
|
||||
await this.dataTable.clickRowByContent(name);
|
||||
await this.dataTable.checkRowByContentIsSelected(name);
|
||||
}
|
||||
|
||||
async doubleClickContentNodeSelectorResult(name: string): Promise<void> {
|
||||
|
@ -35,7 +35,7 @@ export class AttachFileWidgetCloudPage {
|
||||
|
||||
async attachLocalFile(fileLocation: string): Promise<void> {
|
||||
await browser.setFileDetector(new remote.FileDetector());
|
||||
const uploadButton = this.widget.element(by.css(`a input`));
|
||||
const uploadButton = element(by.css('adf-upload-button input'));
|
||||
await BrowserVisibility.waitUntilElementIsPresent(uploadButton);
|
||||
await uploadButton.sendKeys(fileLocation);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(uploadButton);
|
||||
@ -44,8 +44,6 @@ export class AttachFileWidgetCloudPage {
|
||||
async clickAttachContentFile(fileId: string): Promise<void> {
|
||||
const uploadButton = this.widget.element(by.css(`button[id=${fileId}]`));
|
||||
await BrowserActions.click(uploadButton);
|
||||
await browser.sleep(1000);
|
||||
await BrowserActions.clickExecuteScript('button[id="attach-Alfresco Content"]');
|
||||
}
|
||||
|
||||
async checkUploadContentButtonIsDisplayed(fileId: string): Promise<void> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user