[ACA-4337]Move APW tests: claim/release standalone task, json widget

* Move APW tests: claim/release standalone task, json widget

* Modify the form id

* Fix lint

* Fix lint

* Change test rail id

* no message
This commit is contained in:
Cristina Jalba
2021-03-25 10:27:19 +02:00
committed by GitHub
parent 6ec9833b36
commit 09834a1a70
4 changed files with 227 additions and 10 deletions

View File

@@ -0,0 +1,36 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FormFields } from '../form-fields';
import { BrowserActions } from '../../../utils/public-api';
import { Locator, by } from 'protractor';
export class JsonWidgetPage {
formFields = new FormFields();
jsonButtonLocator: Locator = by.css('button');
async clickJsonButton(fieldId): Promise<void> {
const widget = await this.formFields.getWidget(fieldId);
const uploadButton = await widget.element(this.jsonButtonLocator);
await BrowserActions.click(uploadButton);
}
async checkWidgetIsVisible(fieldId: string): Promise<void> {
await this.formFields.checkWidgetIsVisible(fieldId);
}
}

View File

@@ -37,6 +37,7 @@ import { DocumentWidgetPage } from './document-widget.page';
import { GroupWidgetPage } from './group-widget.page';
import { TypeaheadWidgetPage } from './typeahead-widget.page';
import { AttachFolderWidgetPage } from './attach-folder-widget.page';
import { JsonWidgetPage } from './json-widget.page';
export class Widget {
@@ -127,4 +128,8 @@ export class Widget {
tab(): TabPage {
return new TabPage();
}
json(): JsonWidgetPage {
return new JsonWidgetPage();
}
}