mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
added edit-json-dialog definition to be used in process workspace.
This commit is contained in:
parent
5c1aff4187
commit
1260e779ad
45
lib/testing/src/lib/core/dialog/edit-json-dialog.ts
Normal file
45
lib/testing/src/lib/core/dialog/edit-json-dialog.ts
Normal file
@ -0,0 +1,45 @@
|
||||
/*!
|
||||
* @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 { by, element, ElementFinder } from 'protractor';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
|
||||
export class EditJsonDialog {
|
||||
|
||||
dialog: ElementFinder = element(by.css(`.adf-edit-json-dialog`));
|
||||
closeButton: ElementFinder = element(by.cssContainingText(`button span`, 'Close'));
|
||||
dialogContent: ElementFinder = this.dialog.element(by.css(`mat-dialog-content textarea`));
|
||||
|
||||
async checkDialogIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
|
||||
}
|
||||
|
||||
async checkDialogIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.dialog);
|
||||
}
|
||||
|
||||
async clickCloseButton(): Promise<void> {
|
||||
await BrowserActions.click(this.closeButton);
|
||||
}
|
||||
|
||||
async getDialogContent(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.dialogContent);
|
||||
return this.dialogContent.getAttribute('value');
|
||||
}
|
||||
|
||||
}
|
18
lib/testing/src/lib/core/dialog/public-api.ts
Normal file
18
lib/testing/src/lib/core/dialog/public-api.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
export * from './edit-json-dialog';
|
Loading…
x
Reference in New Issue
Block a user