mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5146] Upgrade to Angular 10 (#5834)
* remove useless module * upgrade to angular 8 * upgrade material to v8 * upgrade adf libs * migrate demo shell to v8 * upgrade to angular 9 * upgrade material to v9 * remove hammer * upgrade nx * upgrade datetime picker * upgrade flex layout * update core api * remove entry components * code fixes * upgrade testbed usage * code fixes * remove unnecessary core-js from tests * upgrade CLI * ts config fixes * fix builds * fix testing config * compile fixes * fix demo shell dev setup * fix core tests * fix card view import * upgrade nx * disable smart builds for now * remove fdescribe * restore smart builds * fix issues * unify tsconfigs and fix newly found issues * fix configuration and cleanup package scripts * improved production build from the same config * use ADF libs directly instead of node_modules * disable smart build * single app configuration (angular) * fix core build * fix build scripts * lint fixes * fix linting setup * fix linting rules * various fixes * disable affected libs for unit tests * cleanup insights package.json * simplify smart-build * fix content tests * fix tests * test fixes * fix tests * fix test * fix tests * disable AppExtensionsModule (monaco example) * remove monaco extension module * upgrade bundle check rules * fix insights tests and karma config * fix protractor config * e2e workaround * upgrade puppeteer and split linting and build * reusable resources config * update protractor config * fix after rebase * fix protractor config * fix e2e tsconfig * update e2e setup * Save demoshell artifact on S3 and remove travis cache * Push the libs on S3 and fetch before releasing it * Add deps * Add dependencies among libs and run only affected unit test and build * fix the travis stage name * fix after renaming dev to demoshell * force the order of the projects * remove unused dependencies * fix content e2e script * exit codes fix * add extra exit codes to core e2e * postinstall hook and package cleanup * cleanup packages * remove deprecated code and dependency on router * improve bundle analyzer script * minor code fixes * update spec * fix code after rebase * upgrade protractor after rebase * fix e2e mapping lib * Update tsconfig.e2e.json * update e2e tsconfig * fix angular config * fix protractor runs * cache dist folder for libs * update material selectors for dropdowns * selector fixes * remove duplicated e2e that have unit tests already * fix login selector * fix e2e * fix test * fix import issues * fix selector * cleanup old monaco extension files * cleanup demo shell login * add protractor max retries * disable customisations of protractor * fix login validation * fix after rebase * fix after rebase, disable latest versions of libs * Hide the report tab and rollback the localstorage * rename protractor config back to js * restore lint as part of build * cleanup code * do not copy anything to node_modules on dist test * fix unit tests * config fixes * fix code * fix code after rebase * fix tests * remove existing words from spellcheck * remove useless directive decorators * update package.json after rebase * add js-api back * code fixes * add missing export * update configs * fix code * try fix the sso login test * fix * remove puppeteer unit * fix e2e script * fix * make provider easy * fix routes module before upgrade * fix unit tests * upgrade angular cli * upgrade to angular 10 Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com> Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
|
@@ -6,8 +6,11 @@
|
||||
"flatModuleFile": "adf-testing",
|
||||
"umdModuleIds": {
|
||||
"@alfresco/js-api": "@alfresco/js-api",
|
||||
"@alfresco/adf-core": "@alfresco/adf-core",
|
||||
"moment-es6": "moment-es6"
|
||||
"moment-es6": "moment-es6",
|
||||
"protractor": "protractor",
|
||||
"selenium-webdriver/remote": "selenium-webdriver/remote",
|
||||
"fs": "fs",
|
||||
"path": "path"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -11,10 +11,7 @@
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^7.1.0",
|
||||
"@angular/core": "^7.1.0",
|
||||
"@alfresco/js-api": "3.9.0",
|
||||
"moment-es6": "^1.0.0"
|
||||
"@alfresco/js-api": ">=3.8.0"
|
||||
},
|
||||
"keywords": [
|
||||
"testing",
|
||||
|
@@ -25,7 +25,7 @@ export class ContentNodeSelectorDialogPage {
|
||||
dialog = element(by.css(`adf-content-node-selector`));
|
||||
header = this.dialog.element(by.css(`header[data-automation-id='content-node-selector-title']`));
|
||||
searchInputElement = this.dialog.element(by.css(`input[data-automation-id='content-node-selector-search-input']`));
|
||||
searchLabel = this.searchInputElement.element(by.xpath("ancestor::div[@class='mat-form-field-infix']/span/label"));
|
||||
searchLabel = this.dialog.element(by.css('.adf-content-node-selector-content-input .mat-form-field-label'));
|
||||
selectedRow = this.dialog.element(by.css(`adf-datatable-row[class*="adf-is-selected"]`));
|
||||
cancelButton = element(by.css(`button[data-automation-id='content-node-selector-actions-cancel']`));
|
||||
moveCopyButton = element(by.css(`button[data-automation-id='content-node-selector-actions-choose']`));
|
||||
|
@@ -30,7 +30,7 @@ export class DocumentListPage {
|
||||
constructor(rootElement = element.all(by.css('adf-document-list')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
this.dataTable = new DataTableComponentPage(this.rootElement);
|
||||
this.tableBody = rootElement.all(by.css('div[class="adf-datatable-body"]')).first();
|
||||
this.tableBody = rootElement.all(by.css('.adf-datatable-body')).first();
|
||||
}
|
||||
|
||||
async checkLockedIcon(content: string): Promise<void> {
|
||||
|
@@ -21,8 +21,8 @@ import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
export class LikePage {
|
||||
|
||||
likeCounter = element(by.css(`div[id="adf-like-counter"]`));
|
||||
likeButton = element(by.css(`span[class="adf-like-grey"]`));
|
||||
unlikeButton = element(by.css(`span[class="adf-like-select"]`));
|
||||
likeButton = element(by.css(`.adf-like-grey`));
|
||||
unlikeButton = element(by.css(`.adf-like-select`));
|
||||
|
||||
async getLikeCounter(): Promise<string> {
|
||||
return BrowserActions.getText(this.likeCounter);
|
||||
|
@@ -15,17 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder, Locator, browser } from 'protractor';
|
||||
import { element, by, ElementFinder, browser } from 'protractor';
|
||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||
|
||||
export class SearchCheckListPage {
|
||||
|
||||
filter: ElementFinder;
|
||||
inputBy: Locator = by.css('div[class*="mat-expansion-panel-content"] input');
|
||||
showMoreBy: Locator = by.css('button[title="Show more"]');
|
||||
showLessBy: Locator = by.css('button[title="Show less"]');
|
||||
clearAllButton: Locator = by.css('button');
|
||||
inputBy = by.css('div[class*="mat-expansion-panel-content"] input');
|
||||
showMoreBy = by.css('button[title="Show more"]');
|
||||
showLessBy = by.css('button[title="Show less"]');
|
||||
clearAllButton = by.css('button');
|
||||
|
||||
constructor(filter: ElementFinder) {
|
||||
this.filter = filter;
|
||||
@@ -142,7 +142,7 @@ export class SearchCheckListPage {
|
||||
|
||||
async getCheckListOptionsNumberOnPage(): Promise<number> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
const checkListOptions = this.filter.all(by.css('div[class="checklist"] mat-checkbox'));
|
||||
const checkListOptions = this.filter.all(by.css('.checklist mat-checkbox'));
|
||||
return checkListOptions.count();
|
||||
}
|
||||
|
||||
|
@@ -15,16 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, ElementFinder, Locator } from 'protractor';
|
||||
import { browser, by, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||
|
||||
export class SearchSliderPage {
|
||||
|
||||
filter: ElementFinder;
|
||||
slider: Locator = by.css('mat-slider[data-automation-id="slider-range"]');
|
||||
clearButton: Locator = by.css('button[data-automation-id="slider-btn-clear"]');
|
||||
sliderWithThumbLabel: Locator = by.css('mat-slider[data-automation-id="slider-range"][class*="mat-slider-thumb-label-showing"]');
|
||||
slider = by.css('mat-slider[data-automation-id="slider-range"]');
|
||||
clearButton = by.css('button[data-automation-id="slider-btn-clear"]');
|
||||
sliderWithThumbLabel = by.css('mat-slider[data-automation-id="slider-range"][class*="mat-slider-thumb-label-showing"]');
|
||||
|
||||
constructor(filter: ElementFinder) {
|
||||
this.filter = filter;
|
||||
@@ -43,7 +43,7 @@ export class SearchSliderPage {
|
||||
}
|
||||
|
||||
async setValue(value: number): Promise<void> {
|
||||
const elem = this.filter.element(this.slider).element(by.css('div[class="mat-slider-wrapper"]'));
|
||||
const elem = this.filter.element(this.slider).element(by.css('.mat-slider-wrapper'));
|
||||
await browser.actions().mouseMove(elem, { x: 0, y: 0 }).perform();
|
||||
await browser.actions().mouseDown().mouseMove({x: value * 10, y: 0}).mouseUp().perform();
|
||||
}
|
||||
|
@@ -15,19 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||
import { DropdownPage } from '../../../core/pages/material/dropdown.page';
|
||||
|
||||
export class SearchSortingPickerPage {
|
||||
|
||||
sortingDropdown = new DropdownPage(element(by.css('adf-sorting-picker div[class="mat-select-arrow"]')));
|
||||
orderArrow: ElementFinder = element(by.css('adf-sorting-picker button mat-icon'));
|
||||
sortingDropdown = new DropdownPage(element(by.css('.adf-sorting-picker .mat-select-arrow')));
|
||||
orderArrow = element(by.css('adf-sorting-picker button mat-icon'));
|
||||
|
||||
async sortBy(sortOrder: string, sortType: string | RegExp): Promise<void> {
|
||||
await this.sortingDropdown.clickDropdown();
|
||||
const selectedSortingOption = element(by.cssContainingText('span[class="mat-option-text"]', sortType));
|
||||
const selectedSortingOption = element(by.cssContainingText('.mat-option-text', sortType));
|
||||
await BrowserActions.click(selectedSortingOption);
|
||||
await this.sortByOrder(sortOrder);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export class SearchSortingPickerPage {
|
||||
}
|
||||
|
||||
async clickSortingOption(option: string): Promise<void> {
|
||||
const selectedSortingOption = element(by.cssContainingText('span[class="mat-option-text"]', option));
|
||||
const selectedSortingOption = element(by.cssContainingText('.mat-option-text', option));
|
||||
await BrowserActions.click(selectedSortingOption);
|
||||
}
|
||||
|
||||
|
@@ -35,8 +35,8 @@ export class DataTableComponentPage {
|
||||
constructor(rootElement = element.all(by.css('adf-datatable')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
this.list = this.rootElement.all(by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`));
|
||||
this.contents = this.rootElement.all(by.css('div[class="adf-datatable-body"] span'));
|
||||
this.tableBody = this.rootElement.all(by.css(`div[class='adf-datatable-body']`)).first();
|
||||
this.contents = this.rootElement.all(by.css('.adf-datatable-body span'));
|
||||
this.tableBody = this.rootElement.all(by.css(`.adf-datatable-body`)).first();
|
||||
this.allColumns = this.rootElement.all(by.css('div[data-automation-id*="auto_id_entry."]'));
|
||||
this.selectedRowNumber = this.rootElement.element(by.css(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`));
|
||||
this.allSelectedRows = this.rootElement.all(by.css(`adf-datatable-row[class*='is-selected']`));
|
||||
|
@@ -34,7 +34,7 @@ export class FormFields {
|
||||
cancelButton = element(by.css('#adf-no-form-cancel-button'));
|
||||
errorMessage = by.css('.adf-error-text-container .adf-error-text');
|
||||
|
||||
selectFormDropdown = new DropdownPage(element.all(by.css('adf-attach-form div[class*="mat-select-arrow"]')).first());
|
||||
selectFormDropdown = new DropdownPage(element.all(by.css('.adf-attach-form .mat-select-arrow')).first());
|
||||
|
||||
async setFieldValue(locator, field, value: string): Promise<void> {
|
||||
const fieldElement = element(locator(field));
|
||||
|
@@ -21,44 +21,44 @@ import { FormFields } from '../form-fields';
|
||||
|
||||
export class AmountWidgetPage {
|
||||
|
||||
currency: Locator = by.css('span[class="adf-amount-widget__prefix-spacing"]');
|
||||
currency: Locator = by.css('.adf-amount-widget__prefix-spacing');
|
||||
formFields: FormFields = new FormFields();
|
||||
|
||||
async getAmountFieldLabel(fieldId): Promise<string> {
|
||||
async getAmountFieldLabel(fieldId: string): Promise<string> {
|
||||
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
|
||||
return BrowserActions.getText(label);
|
||||
}
|
||||
|
||||
async getAmountFieldCurrency(fieldId): Promise<string> {
|
||||
async getAmountFieldCurrency(fieldId: string): Promise<string> {
|
||||
const widget = await this.formFields.getWidget(fieldId);
|
||||
return BrowserActions.getText(widget.element(this.currency));
|
||||
}
|
||||
|
||||
async setFieldValue(fieldId, value): Promise<void> {
|
||||
async setFieldValue(fieldId: string, value: any): Promise<void> {
|
||||
await this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
||||
async removeFromAmountWidget(fieldId) {
|
||||
async removeFromAmountWidget(fieldId: string) {
|
||||
const amountWidgetInput = element(by.id(fieldId));
|
||||
await BrowserActions.clearWithBackSpace(amountWidgetInput);
|
||||
}
|
||||
|
||||
async clearFieldValue(fieldId): Promise<void> {
|
||||
async clearFieldValue(fieldId: string): Promise<void> {
|
||||
const numberField = element(by.id(fieldId));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(numberField);
|
||||
await numberField.clear();
|
||||
}
|
||||
|
||||
async checkWidgetIsVisible(fieldId): Promise<void> {
|
||||
async checkWidgetIsVisible(fieldId: string): Promise<void> {
|
||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||
}
|
||||
|
||||
async getErrorMessage(fieldId): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||
async getErrorMessage(fieldId: string): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] .adf-error-text`));
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
async getPlaceholder(fieldId): Promise<string> {
|
||||
async getPlaceholder(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldPlaceHolder(fieldId);
|
||||
}
|
||||
}
|
||||
|
@@ -24,20 +24,20 @@ export class DateTimeWidgetPage {
|
||||
formFields = new FormFields();
|
||||
outsideLayer = element(by.css('div[class*="cdk-overlay-container"]'));
|
||||
|
||||
async checkWidgetIsVisible(fieldId): Promise<void> {
|
||||
async checkWidgetIsVisible(fieldId: string): Promise<void> {
|
||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||
}
|
||||
|
||||
async getDateTimeLabel(fieldId): Promise<string> {
|
||||
async getDateTimeLabel(fieldId: string): Promise<string> {
|
||||
const label = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`));
|
||||
return BrowserActions.getText(label);
|
||||
}
|
||||
|
||||
async setDateTimeInput(fieldId, value): Promise<void> {
|
||||
async setDateTimeInput(fieldId: string, value: string): Promise<void> {
|
||||
await this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
||||
async clickOutsideWidget(fieldId): Promise<void> {
|
||||
async clickOutsideWidget(fieldId: string): Promise<void> {
|
||||
const form = await this.formFields.getWidget(fieldId);
|
||||
await BrowserActions.click(form);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export class DateTimeWidgetPage {
|
||||
}
|
||||
|
||||
async getErrorMessage(fieldId: string): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] .adf-error-text`));
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export class DateTimeWidgetPage {
|
||||
return this.formFields.getFieldPlaceHolder(fieldId);
|
||||
}
|
||||
|
||||
async removeFromDatetimeWidget(fieldId): Promise<void> {
|
||||
async removeFromDatetimeWidget(fieldId: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(await this.formFields.getWidget(fieldId));
|
||||
const amountWidgetInput = element(by.id(fieldId));
|
||||
await BrowserActions.clearWithBackSpace(amountWidgetInput);
|
||||
|
@@ -21,51 +21,51 @@ import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class DateWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
formFields = new FormFields();
|
||||
|
||||
async checkWidgetIsVisible(fieldId): Promise<void> {
|
||||
async checkWidgetIsVisible(fieldId: string): Promise<void> {
|
||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||
}
|
||||
|
||||
async checkLabelIsVisible(fieldId): Promise<void> {
|
||||
async checkLabelIsVisible(fieldId: string): Promise<void> {
|
||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||
}
|
||||
|
||||
async getDateLabel(fieldId): Promise<string> {
|
||||
async getDateLabel(fieldId: string): Promise<string> {
|
||||
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
|
||||
return BrowserActions.getText(label);
|
||||
}
|
||||
|
||||
async setDateInput(fieldId, value): Promise<void> {
|
||||
async setDateInput(fieldId: string, value: string): Promise<void> {
|
||||
await this.removeFromDatetimeWidget(fieldId);
|
||||
await this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
||||
async getDateInput(fieldId): Promise<string> {
|
||||
async getDateInput(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldValue(fieldId);
|
||||
}
|
||||
|
||||
async clearDateInput(fieldId): Promise<void> {
|
||||
async clearDateInput(fieldId: string): Promise<void> {
|
||||
const dateInput = element(by.id(fieldId));
|
||||
await BrowserActions.clearWithBackSpace(dateInput);
|
||||
}
|
||||
|
||||
async clickOutsideWidget(fieldId): Promise<void> {
|
||||
async clickOutsideWidget(fieldId: string): Promise<void> {
|
||||
const form = await this.formFields.getWidget(fieldId);
|
||||
await BrowserActions.click(form);
|
||||
}
|
||||
|
||||
async checkErrorMessageIsNotDisplayed(fieldId): Promise<void> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||
async checkErrorMessageIsNotDisplayed(fieldId: string): Promise<void> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] .adf-error-text`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(errorMessage);
|
||||
}
|
||||
|
||||
async getErrorMessage(fieldId): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||
async getErrorMessage(fieldId: string): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] .adf-error-text`));
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
async removeFromDatetimeWidget(fieldId): Promise<void> {
|
||||
async removeFromDatetimeWidget(fieldId: string): Promise<void> {
|
||||
const widget = await this.formFields.getWidget(fieldId);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(widget);
|
||||
await BrowserActions.clearSendKeys(element(by.id(fieldId)), '');
|
||||
|
@@ -29,18 +29,18 @@ export class DynamicTableWidgetPage {
|
||||
editButton = element(by.cssContainingText('button span', 'edit'));
|
||||
columnDateTime = element(by.id('columnDateTime'));
|
||||
columnDate = element(by.id('columnDate'));
|
||||
calendarHeader = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
|
||||
calendarContent = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
|
||||
calendarHeader = element(by.css('.mat-datetimepicker-calendar-header-date-time'));
|
||||
calendarContent = element(by.css('.mat-datetimepicker-calendar-content'));
|
||||
saveButton = element(by.cssContainingText('button span', 'Save'));
|
||||
errorMessage = element(by.css('div[class="adf-error-text"]'));
|
||||
errorMessage = element(by.css('.adf-error-text'));
|
||||
dateWidget = element.all(by.css('mat-datepicker-toggle button')).first();
|
||||
tableRow = element.all(by.css('tbody tr'));
|
||||
|
||||
getFieldLabel(fieldId): Promise<string> {
|
||||
getFieldLabel(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
||||
}
|
||||
|
||||
getColumnName(fieldId): Promise<string> {
|
||||
getColumnName(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldText(fieldId, this.columnNameLocator);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export class DynamicTableWidgetPage {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
}
|
||||
|
||||
async addRandomStringOnDateTime(randomText): Promise<string> {
|
||||
async addRandomStringOnDateTime(randomText: string): Promise<string> {
|
||||
await BrowserActions.click(this.columnDateTime);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await this.columnDateTime.sendKeys(randomText);
|
||||
@@ -93,7 +93,7 @@ export class DynamicTableWidgetPage {
|
||||
return this.columnDateTime.getAttribute('value');
|
||||
}
|
||||
|
||||
async addRandomStringOnDate(randomText): Promise<void> {
|
||||
async addRandomStringOnDate(randomText: string): Promise<void> {
|
||||
await BrowserActions.click(this.columnDate);
|
||||
await this.columnDate.sendKeys(randomText);
|
||||
}
|
||||
|
@@ -16,24 +16,23 @@
|
||||
*/
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { by, element, Locator } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class HyperlinkWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
formFields = new FormFields();
|
||||
fieldLocator = by.css('.adf-hyperlink-widget a');
|
||||
|
||||
fieldLocator: Locator = by.css('div[class="adf-hyperlink-widget "] a');
|
||||
|
||||
async getFieldText(fieldId): Promise<string> {
|
||||
async getFieldText(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldText(fieldId, this.fieldLocator);
|
||||
}
|
||||
|
||||
async getFieldHref(fieldId): Promise<string> {
|
||||
async getFieldHref(fieldId: string): Promise<string> {
|
||||
return this.formFields.getWidget(fieldId).element(this.fieldLocator).getAttribute('href');
|
||||
}
|
||||
|
||||
async getFieldLabel(fieldId): Promise<string> {
|
||||
async getFieldLabel(fieldId: string): Promise<string> {
|
||||
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
|
||||
return BrowserActions.getText(label);
|
||||
}
|
||||
|
@@ -21,37 +21,37 @@ import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class NumberWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
formFields = new FormFields();
|
||||
|
||||
async getNumberFieldLabel(fieldId): Promise<string> {
|
||||
async getNumberFieldLabel(fieldId: string): Promise<string> {
|
||||
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
|
||||
return BrowserActions.getText(label);
|
||||
}
|
||||
|
||||
getFieldValue(fieldId): Promise<string> {
|
||||
getFieldValue(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldValue(fieldId);
|
||||
}
|
||||
|
||||
setFieldValue(fieldId, value): Promise<void> {
|
||||
setFieldValue(fieldId: string, value: any): Promise<void> {
|
||||
return this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
||||
async clearFieldValue(fieldId): Promise<void> {
|
||||
async clearFieldValue(fieldId: string): Promise<void> {
|
||||
const numberField = element(by.id(fieldId));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(numberField);
|
||||
await numberField.clear();
|
||||
}
|
||||
|
||||
checkWidgetIsVisible(fieldId): Promise<void> {
|
||||
checkWidgetIsVisible(fieldId: string): Promise<void> {
|
||||
return this.formFields.checkWidgetIsVisible(fieldId);
|
||||
}
|
||||
|
||||
async getErrorMessage(fieldId): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||
async getErrorMessage(fieldId: string): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] .adf-error-text`));
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
getPlaceholder(fieldId): Promise<string> {
|
||||
getPlaceholder(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldPlaceHolder(fieldId);
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ export class LoginSSOPage {
|
||||
usernameField = element(by.id('username'));
|
||||
passwordField = element(by.id('password'));
|
||||
loginButton = element(by.css('input[type="submit"]'));
|
||||
header = element(by.tagName('adf-layout-header'));
|
||||
header = element(by.id('adf-header'));
|
||||
loginError = element(by.css(`div[data-automation-id="login-error"]`));
|
||||
visibilityLabel = element(by.id('v'));
|
||||
|
||||
|
@@ -23,12 +23,12 @@ export class PaginationPage {
|
||||
|
||||
pageSelectorDropDown = element(by.css('div[class*="adf-pagination__page-selector"]'));
|
||||
pageSelectorArrow = element(by.css('button[data-automation-id="page-selector"]'));
|
||||
itemsPerPage = element(by.css('span[class="adf-pagination__max-items"]'));
|
||||
itemsPerPage = element(by.css('.adf-pagination__max-items'));
|
||||
itemsPerPageOpenDropdown = element(by.css('.adf-pagination__perpage-block button'));
|
||||
itemsPerPageOptions = by.css('.adf-pagination__page-selector .mat-menu-item');
|
||||
currentPage = element(by.css('span[class="adf-pagination__current-page"]'));
|
||||
totalPages = element(by.css('span[class="adf-pagination__total-pages"]'));
|
||||
paginationRange = element(by.css('span[class="adf-pagination__range"]'));
|
||||
currentPage = element(by.css('.adf-pagination__current-page'));
|
||||
totalPages = element(by.css('.adf-pagination__total-pages'));
|
||||
paginationRange = element(by.css('.adf-pagination__range'));
|
||||
nextPageButton = element(by.css('button[class*="adf-pagination__next-button"]'));
|
||||
nextButtonDisabled = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
|
||||
previousButtonDisabled = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
|
||||
@@ -36,7 +36,7 @@ export class PaginationPage {
|
||||
pageDropDownOptions = by.css('div[class*="mat-menu-content"] button');
|
||||
paginationSection = element(by.css('adf-pagination'));
|
||||
paginationSectionEmpty = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||
totalFiles = element(by.css('span[class="adf-pagination__range"]'));
|
||||
totalFiles = element(by.css('.adf-pagination__range'));
|
||||
|
||||
async selectItemsPerPage(numberOfItem: string): Promise<void> {
|
||||
await browser.executeScript(`document.querySelector('div[class*="adf-pagination__perpage-block"] button').click();`);
|
||||
|
@@ -22,7 +22,7 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||
|
||||
export class SettingsPage {
|
||||
|
||||
settingsURL = browser.baseUrl + '/settings';
|
||||
settingsURL: string = browser.baseUrl + '/settings';
|
||||
ecmText = element(by.css('input[data-automation-id*="ecmHost"]'));
|
||||
bpmText = element(by.css('input[data-automation-id*="bpmHost"]'));
|
||||
clientIdText = element(by.css('input[id="clientId"]'));
|
||||
@@ -36,7 +36,7 @@ export class SettingsPage {
|
||||
implicitFlowLabel = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
|
||||
implicitFlowElement = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
|
||||
applyButton = element(by.css('button[data-automation-id*="host-button"]'));
|
||||
backButton = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
|
||||
backButton = element(by.cssContainingText('button .mat-button-wrapper', 'Back'));
|
||||
validationMessage = element(by.cssContainingText('mat-error', 'This field is required'));
|
||||
|
||||
providerDropdown = new DropdownPage(element(by.css('mat-select[id="adf-provider-selector"]')));
|
||||
|
@@ -31,7 +31,7 @@ export class UserInfoPage {
|
||||
userInfoProcessHeaderTitle = element(by.css('div[id="bpm-username"]'));
|
||||
userInfoProcessTitle = element(by.css('mat-card-content span[id="bpm-full-name"]'));
|
||||
processEmail = element(by.css('span[id="bpm-email"]'));
|
||||
processTenant = element(by.css('span[class="detail-profile"]'));
|
||||
processTenant = element(by.css('.detail-profile'));
|
||||
apsImage = element(by.css('img[id="bpm-user-detail-image"]'));
|
||||
acsImage = element(by.css('img[id="ecm-user-detail-image"]'));
|
||||
initialImage = element.all(by.css('div[id="user-initials-image"]')).first();
|
||||
@@ -39,11 +39,7 @@ export class UserInfoPage {
|
||||
userInfoSsoTitle = element(by.css('.adf-userinfo__detail-title'));
|
||||
ssoEmail = element(by.id('identity-email'));
|
||||
userProfileButton = element(by.css('button[data-automation-id="adf-user-profile"]'));
|
||||
tabsPage: TabsPage;
|
||||
|
||||
constructor() {
|
||||
this.tabsPage = new TabsPage();
|
||||
}
|
||||
tabsPage = new TabsPage();
|
||||
|
||||
async dialogIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
|
||||
|
@@ -42,7 +42,7 @@ export class ViewerPage {
|
||||
fileThumbnail = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
|
||||
pageSelectorInput = element(by.css('input[data-automation-id="adf-page-selector"]'));
|
||||
imgContainer = element(by.css('div[data-automation-id="adf-image-container"]'));
|
||||
mediaContainer = element(by.css('adf-media-player[class="adf-media-player ng-star-inserted"]'));
|
||||
mediaContainer = element(by.css('.adf-media-player'));
|
||||
percentage = element(by.css('div[data-automation-id="adf-page-scale"'));
|
||||
thumbnailsBtn = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
|
||||
thumbnailsContent = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
|
||||
@@ -65,7 +65,7 @@ export class ViewerPage {
|
||||
toolbar = element(by.id('adf-viewer-toolbar'));
|
||||
lastButton = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
||||
goBackSwitch = element(by.id('adf-switch-goback'));
|
||||
canvasLayer = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
||||
canvasLayer = element.all(by.css('.canvasWrapper > canvas')).first();
|
||||
|
||||
openWithSwitch = element(by.id('adf-switch-openwith'));
|
||||
openWith = element(by.id('adf-viewer-openwith'));
|
||||
@@ -106,7 +106,7 @@ export class ViewerPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.codeViewer);
|
||||
}
|
||||
|
||||
async viewFile(fileName): Promise<void> {
|
||||
async viewFile(fileName: string): Promise<void> {
|
||||
const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
|
||||
await BrowserActions.click(fileView);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
@@ -138,7 +138,7 @@ export class ViewerPage {
|
||||
await browser.executeScript(jsCode);
|
||||
}
|
||||
|
||||
async enterPassword(password): Promise<void> {
|
||||
async enterPassword(password: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.passwordInput, password);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async checkCurrentThumbnailIsSelected(): Promise<void> {
|
||||
const selectedThumbnail = element(by.css('adf-pdf-thumb[class="adf-pdf-thumbnails__thumb ng-star-inserted adf-pdf-thumbnails__thumb--selected"] > img'));
|
||||
const selectedThumbnail = element(by.css('adf-pdf-thumb.adf-pdf-thumbnails__thumb.adf-pdf-thumbnails__thumb--selected > img'));
|
||||
const pageNumber = await this.pageSelectorInput.getAttribute('value');
|
||||
|
||||
await expect('Page ' + pageNumber).toEqual(await selectedThumbnail.getAttribute('title'));
|
||||
@@ -275,8 +275,8 @@ export class ViewerPage {
|
||||
async checkFileContent(pageNumber: string, text: string): Promise<void> {
|
||||
const allPages = this.canvasLayer;
|
||||
const pageLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
|
||||
const textLayerLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
|
||||
const specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
|
||||
const textLayerLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"] .textLayer')).first();
|
||||
const specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] .textLayer', text)).first();
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsVisible(allPages);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(pageLoaded);
|
||||
@@ -341,11 +341,11 @@ export class ViewerPage {
|
||||
await BrowserActions.clickExecuteScript('button[data-automation-id="adf-toolbar-sidebar"]');
|
||||
}
|
||||
|
||||
async clickOnTab(tabName): Promise<void> {
|
||||
async clickOnTab(tabName: string): Promise<void> {
|
||||
await this.tabsPage.clickTabByTitle(tabName);
|
||||
}
|
||||
|
||||
async checkTabIsActive(tabName): Promise<void> {
|
||||
async checkTabIsActive(tabName: string): Promise<void> {
|
||||
const tab = element(by.cssContainingText('.adf-info-drawer-layout-content div.mat-tab-labels div.mat-tab-label-active .mat-tab-label-content', tabName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(tab);
|
||||
}
|
||||
@@ -594,7 +594,6 @@ export class ViewerPage {
|
||||
|
||||
async enterCustomName(text: string): Promise<void> {
|
||||
const textField = element(by.css('input[data-automation-id="adf-text-custom-name"]'));
|
||||
// await BrowserVisibility.waitUntilElementIsVisible(textField);
|
||||
await BrowserActions.clearSendKeys(textField, text);
|
||||
}
|
||||
|
||||
@@ -611,22 +610,22 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async checkTabHasNoIcon(index: number): Promise<void> {
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content mat-icon`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
|
||||
}
|
||||
|
||||
async checkTabHasNoLabel(index: number): Promise<void> {
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content span`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
|
||||
}
|
||||
|
||||
async getTabLabelById(index: number): Promise<string> {
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content span`));
|
||||
return BrowserActions.getText(tab);
|
||||
}
|
||||
|
||||
async getTabIconById(index: number): Promise<string> {
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] .mat-tab-label-content mat-icon`));
|
||||
return BrowserActions.getText(tab);
|
||||
}
|
||||
|
||||
|
@@ -15,8 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './testing-alfresco-api.service';
|
||||
export * from './testing-app-config.service';
|
||||
export * from './process-definitions.service';
|
||||
export * from './process-instances.service';
|
||||
export * from './message-events.service';
|
||||
|
@@ -1,54 +0,0 @@
|
||||
/*!
|
||||
* @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 { AlfrescoApiCompatibility, AlfrescoApiConfig } from '@alfresco/js-api';
|
||||
import { AlfrescoApiService, AppConfigValues, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
export class TestingAlfrescoApiService extends AlfrescoApiService {
|
||||
|
||||
protected alfrescoApi: AlfrescoApiCompatibility;
|
||||
|
||||
config = {
|
||||
};
|
||||
|
||||
constructor(public appConfig: AppConfigService, public storageService: StorageService) {
|
||||
super(null, null);
|
||||
const oauth = Object.assign({}, this.appConfig.get<any>(AppConfigValues.OAUTHCONFIG, null));
|
||||
this.storageService.prefix = this.appConfig.get<string>(AppConfigValues.STORAGE_PREFIX, '');
|
||||
this.config = new AlfrescoApiConfig({
|
||||
provider: this.appConfig.get<string>(AppConfigValues.PROVIDERS),
|
||||
hostEcm: this.appConfig.get<string>(AppConfigValues.ECMHOST),
|
||||
hostBpm: this.appConfig.get<string>(AppConfigValues.BPMHOST),
|
||||
authType: this.appConfig.get<string>(AppConfigValues.AUTHTYPE, 'BASIC'),
|
||||
contextRootBpm: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTBPM),
|
||||
contextRoot: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTECM),
|
||||
disableCsrf: this.appConfig.get<boolean>(AppConfigValues.DISABLECSRF),
|
||||
withCredentials: this.appConfig.get<boolean>(AppConfigValues.AUTH_WITH_CREDENTIALS, false),
|
||||
domainPrefix: this.storageService.prefix,
|
||||
oauth2: oauth
|
||||
});
|
||||
}
|
||||
|
||||
getInstance(): AlfrescoApiCompatibility {
|
||||
if (this.alfrescoApi) {
|
||||
this.alfrescoApi.configureJsApi(this.config);
|
||||
} else {
|
||||
this.alfrescoApi = new AlfrescoApiCompatibility(this.config);
|
||||
}
|
||||
return this.alfrescoApi;
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
/*!
|
||||
* @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 { AppConfigService } from '@alfresco/adf-core';
|
||||
|
||||
export class TestingAppConfigService extends AppConfigService {
|
||||
|
||||
config = {
|
||||
};
|
||||
|
||||
constructor(config?) {
|
||||
super(null);
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
getLocationHostname(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
getLocationPort(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
getLocationProtocol(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
@@ -28,11 +28,11 @@ export class ProcessListCloudComponentPage {
|
||||
};
|
||||
|
||||
processList = element(by.css('adf-cloud-process-list'));
|
||||
noProcessFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||
noProcessFound = element.all(by.css('.adf-empty-content__title')).first();
|
||||
actionMenu = element(by.css('*[role="menu"]'));
|
||||
optionButton = by.css('button[data-automation-id*="action_menu_"]');
|
||||
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage(this.processList);
|
||||
dataTable = new DataTableComponentPage(this.processList);
|
||||
|
||||
getDataTable(): DataTableComponentPage {
|
||||
return this.dataTable;
|
||||
|
@@ -33,7 +33,7 @@ export class TaskHeaderCloudPage {
|
||||
endDateField = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
|
||||
idCardTextItem = new CardTextItemPage('id');
|
||||
descriptionCardTextItem = new CardTextItemPage('description');
|
||||
taskPropertyList = element(by.css('adf-cloud-task-header adf-card-view div[class="adf-property-list"]'));
|
||||
taskPropertyList = element(by.css('adf-cloud-task-header adf-card-view .adf-property-list'));
|
||||
|
||||
async getAssignee(): Promise<string> {
|
||||
return this.assigneeCardTextItem.getFieldValue();
|
||||
|
@@ -35,7 +35,7 @@ const column = {
|
||||
export class TaskListCloudComponentPage {
|
||||
|
||||
taskList = element(by.css('adf-cloud-task-list'));
|
||||
noTasksFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||
noTasksFound = element.all(by.css('.adf-empty-content__title')).first();
|
||||
actionMenu = element(by.css('*[role="menu"]'));
|
||||
optionButton = by.css('button[data-automation-id*="action_menu_"]');
|
||||
|
||||
|
@@ -0,0 +1,201 @@
|
||||
{
|
||||
"CANDIDATE_BASE_APP": {
|
||||
"name": "candidatebaseapp",
|
||||
"file_location": "https://github.com/Alfresco/alfresco-ng2-components/blob/develop/e2e/resources/activiti7/candidatebaseapp.zip?raw=true",
|
||||
"processes": {
|
||||
"candidateUserProcess": "candidateuserprocess",
|
||||
"candidateGroupProcess": "candidategroupprocess",
|
||||
"anotherCandidateGroupProcess": "anothercandidategroup",
|
||||
"uploadFileProcess": "uploadfileprocess",
|
||||
"processwithstarteventform": "processwithstarteventform",
|
||||
"processwithjsonfilemapping": "processwithjsonfilemapping",
|
||||
"assigneeProcess": "assigneeprocess",
|
||||
"errorStartEventProcess": {
|
||||
"process_name": "errorstartevent",
|
||||
"error_id": "Error_END_EVENT",
|
||||
"error_code": "123"
|
||||
},
|
||||
"errorBoundaryEventProcess": {
|
||||
"process_name": "errorboundaryevent",
|
||||
"error_id": "Error_END_EVENT",
|
||||
"error_code": "567"
|
||||
},
|
||||
"errorExclusiveGateProcess": {
|
||||
"process_name": "errorexclusivegate",
|
||||
"error_id": "Error_OK",
|
||||
"error_code": "200"
|
||||
}
|
||||
},
|
||||
"forms": {
|
||||
"starteventform": "starteventform",
|
||||
"formtotestvalidations": "formtotestvalidations",
|
||||
"uploadfileform": "uploadfileform",
|
||||
"inputform": "inputform",
|
||||
"outputform": "outputform"
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"role": "ACTIVITI_ADMIN",
|
||||
"groups": [],
|
||||
"users": ["superadminuser", "processadminuser"]
|
||||
},
|
||||
{
|
||||
"role": "ACTIVITI_USER",
|
||||
"groups": ["hr", "testgroup"],
|
||||
"users": ["hruser", "salesuser"]
|
||||
}
|
||||
],
|
||||
"tasks": {
|
||||
"uploadFileTask": "UploadFileTask",
|
||||
"candidateUserTask": "candidateUserTask"
|
||||
}
|
||||
},
|
||||
"SIMPLE_APP": {
|
||||
"name": "simpleapp",
|
||||
"file_location": "https://github.com/Alfresco/alfresco-ng2-components/blob/develop/e2e/resources/activiti7/simpleapp.zip?raw=true",
|
||||
"processes": {
|
||||
"processwithvariables": "processwithvariables",
|
||||
"simpleProcess": "simpleprocess",
|
||||
"dropdownrestprocess": "dropdownrestprocess",
|
||||
"multilingualprocess": "multilingualprocess",
|
||||
"processWithTabVisibility": "processwithtabvisibility",
|
||||
"startmessageevent": "start-message-event",
|
||||
"intermediatemessageevent": "intermediate-message-event",
|
||||
"intboundaryevent": "int-boundary-event",
|
||||
"nonintboundaryevent": "nonint-boundary-event",
|
||||
"intboundarysubprocess": "int-boundary-subprocess",
|
||||
"intstartmessageevent": "int-start-message-event",
|
||||
"nonintstartmessageevent": "nonint-start-message-event",
|
||||
"siblingtaskprocess": "siblingtaskprocess",
|
||||
"startTaskVisibilityForm": "start-task-visibility-form",
|
||||
"startVisibilityForm": "start-visibility-form",
|
||||
"processstring": "processstring",
|
||||
"processinteger": "processinteger",
|
||||
"processboolean": "processboolean",
|
||||
"processdate": "processdate",
|
||||
"multiprocess": "multiprocess",
|
||||
"terminateexclusive": "terminate-exclusive",
|
||||
"terminatesubprocess": "terminate-subprocess",
|
||||
"multiinstancedmnparallel": "multiinstance-dmnparallel",
|
||||
"multiinstancecallactivity": "multiinstance-callactivity",
|
||||
"multiinstancecollection": "multiinstance-collection",
|
||||
"multiinstancecompletion": "multiinstance-completion",
|
||||
"multiinstancesequential": "multiinstance-sequential",
|
||||
"multiinstanceservicetask": "multiinstance-servicetask",
|
||||
"multiinstanceusertask": "multiinstance-usertask",
|
||||
"multiinstancedmnsequence": "multiinstance-dmnsequence",
|
||||
"multiinstancemanualtask": "multiinstance-manualtask",
|
||||
"multiinstancesubprocess": "multiinstance-subprocess",
|
||||
"calledprocess": "calledprocess",
|
||||
"booleanvisibilityprocess": "booleanvisibilityprocess",
|
||||
"numbervisibilityprocess": "numbervisibilityprocess",
|
||||
"processformoutcome": "outcomebuttons",
|
||||
"uploadSingleMultipleFiles": "upload-single-multiple-pro",
|
||||
"processDisplayRestJson": "process-display-rest-json",
|
||||
"poolStartEndMessageThrow": "pool-start-end-mess-throw",
|
||||
"poolStartEndMessageCatch": "pool-start-end-mess-catch",
|
||||
"poolProcessCalled": "pool-process-called",
|
||||
"poolProcessCalling": "pool-process-calling",
|
||||
"poolNonIntBoundaryThrown": "pool-nonint-boundary-throw",
|
||||
"poolNonIntBoundaryCatch": "pool-nonint-boundary-catch",
|
||||
"poolIntermediateMessageThrow": "pool-interm-message-throw",
|
||||
"poolIntermediateMessageCatch": "pool-interm-message-catch",
|
||||
"poolInterruptingBoundarySubprocessThrow": "pool-int-bound-subpr-throw",
|
||||
"poolInterruptingBoundarySubprocessCatch": "pool-int-bound-subpr-catch",
|
||||
"poolInterruptingBoundaryThrow": "pool-int-boundary-throw",
|
||||
"poolInterruptingBoundaryCatch": "pool-int-boundary-catch"
|
||||
},
|
||||
"forms": {
|
||||
"tabVisibilityFields": {
|
||||
"name": "tabvisibilitywithfields"
|
||||
},
|
||||
"tabVisibilityVars": {
|
||||
"name": "tabvisibilitywithvars"
|
||||
},
|
||||
"usertaskform": {
|
||||
"name": "usertaskform"
|
||||
},
|
||||
"dropdownform": {
|
||||
"name": "dropdownform"
|
||||
},
|
||||
"formVisibility": {
|
||||
"name": "form-visibility"
|
||||
},
|
||||
"multilingualform": {
|
||||
"name": "multilingualform"
|
||||
},
|
||||
"inputform": {
|
||||
"name": "inputform"
|
||||
},
|
||||
"outputform": {
|
||||
"name": "outputform"
|
||||
},
|
||||
"exclusiveconditionform": {
|
||||
"name": "exclusive-condition-form"
|
||||
},
|
||||
"uploadlocalfileform": {
|
||||
"name": "upload-localfile-form"
|
||||
},
|
||||
"booleanvisibility": {
|
||||
"name": "booleanvisibility"
|
||||
},
|
||||
"requirednumbervisibility": {
|
||||
"name": "requirednumbervisibility"
|
||||
},
|
||||
"mealform": {
|
||||
"name": "mealform"
|
||||
},
|
||||
"resultcollectionform": {
|
||||
"name": "resultcollectionform"
|
||||
},
|
||||
"uploadSingleMultiple": {
|
||||
"name": "upload-single-multiple",
|
||||
"widgets": {
|
||||
"contentMultipleAttachFileId": "UploadMultipleFileFromContentId"
|
||||
}
|
||||
},
|
||||
"formWithJsonWidget": {
|
||||
"name": "form-with-json-widget"
|
||||
},
|
||||
"formWithAllWidgets": {
|
||||
"name": "form-with-all-widgets"
|
||||
},
|
||||
"poolForm": {
|
||||
"name": "pool-usertaskform"
|
||||
}
|
||||
},
|
||||
"tasks": {
|
||||
"processstring": "inputtask",
|
||||
"uploadSingleMultipleFiles": "UploadSingleMultipleFiles"
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"role": "ACTIVITI_ADMIN",
|
||||
"groups": [],
|
||||
"users": ["superadminuser", "processadminuser"]
|
||||
},
|
||||
{
|
||||
"role": "ACTIVITI_USER",
|
||||
"groups": ["hr", "sales", "testgroup"],
|
||||
"users": ["hruser"]
|
||||
}
|
||||
],
|
||||
"infrastructure": { "connectors": { "restconnector": {} }, "bridges": {} }
|
||||
},
|
||||
"SUB_PROCESS_APP": {
|
||||
"name": "subprocessapp",
|
||||
"file_location": "https://github.com/Alfresco/alfresco-ng2-components/blob/develop/e2e/resources/activiti7/subprocessapp.zip?raw=true",
|
||||
"processes": {
|
||||
"processchild": "processchild",
|
||||
"processparent": "processparent"
|
||||
},
|
||||
"security": [
|
||||
{ "role": "ACTIVITI_ADMIN", "groups": [], "users": ["superadminuser"] },
|
||||
{
|
||||
"role": "ACTIVITI_USER",
|
||||
"groups": ["hr", "testgroup"],
|
||||
"users": ["hruser"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -15,213 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* cSpell:disable */
|
||||
export const ACTIVITI_CLOUD_APPS: any = {
|
||||
CANDIDATE_BASE_APP: {
|
||||
name: 'candidatebaseapp',
|
||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/develop/e2e/resources/activiti7/candidatebaseapp.zip?raw=true',
|
||||
processes: {
|
||||
candidateUserProcess: 'candidateuserprocess',
|
||||
candidateGroupProcess: 'candidategroupprocess',
|
||||
anotherCandidateGroupProcess: 'anothercandidategroup',
|
||||
uploadFileProcess: 'uploadfileprocess',
|
||||
processwithstarteventform: 'processwithstarteventform',
|
||||
processwithjsonfilemapping: 'processwithjsonfilemapping',
|
||||
assigneeProcess: 'assigneeprocess',
|
||||
errorStartEventProcess: {
|
||||
process_name: 'errorstartevent',
|
||||
error_id: 'Error_END_EVENT',
|
||||
error_code: '123'
|
||||
},
|
||||
errorBoundaryEventProcess: {
|
||||
process_name: 'errorboundaryevent',
|
||||
error_id: 'Error_END_EVENT',
|
||||
error_code: '567'
|
||||
},
|
||||
errorExclusiveGateProcess: {
|
||||
process_name: 'errorexclusivegate',
|
||||
error_id: 'Error_OK',
|
||||
error_code: '200'
|
||||
}
|
||||
},
|
||||
forms: {
|
||||
starteventform: 'starteventform',
|
||||
formtotestvalidations: 'formtotestvalidations',
|
||||
uploadfileform: 'uploadfileform',
|
||||
inputform: 'inputform',
|
||||
outputform: 'outputform'
|
||||
},
|
||||
security: [
|
||||
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser', 'processadminuser'] },
|
||||
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] }
|
||||
],
|
||||
tasks: {
|
||||
uploadFileTask: 'UploadFileTask',
|
||||
candidateUserTask: 'candidateUserTask'
|
||||
}
|
||||
},
|
||||
SIMPLE_APP: {
|
||||
name: 'simpleapp',
|
||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/develop/e2e/resources/activiti7/simpleapp.zip?raw=true',
|
||||
processes: {
|
||||
processwithvariables: 'processwithvariables',
|
||||
simpleProcess: 'simpleprocess',
|
||||
dropdownrestprocess: 'dropdownrestprocess',
|
||||
multilingualprocess: 'multilingualprocess',
|
||||
processWithTabVisibility: 'processwithtabvisibility',
|
||||
startmessageevent: 'start-message-event',
|
||||
intermediatemessageevent: 'intermediate-message-event',
|
||||
intboundaryevent: 'int-boundary-event',
|
||||
nonintboundaryevent: 'nonint-boundary-event',
|
||||
intboundarysubprocess: 'int-boundary-subprocess',
|
||||
intstartmessageevent: 'int-start-message-event',
|
||||
nonintstartmessageevent: 'nonint-start-message-event',
|
||||
siblingtaskprocess: 'siblingtaskprocess',
|
||||
startTaskVisibilityForm: 'start-task-visibility-form',
|
||||
startVisibilityForm: 'start-visibility-form',
|
||||
processstring: 'processstring',
|
||||
processinteger: 'processinteger',
|
||||
processboolean: 'processboolean',
|
||||
processdate: 'processdate',
|
||||
multiprocess: 'multiprocess',
|
||||
terminateexclusive: 'terminate-exclusive',
|
||||
terminatesubprocess: 'terminate-subprocess',
|
||||
multiinstancedmnparallel: 'multiinstance-dmnparallel',
|
||||
multiinstancecallactivity: 'multiinstance-callactivity',
|
||||
multiinstancecollection: 'multiinstance-collection',
|
||||
multiinstancecompletion: 'multiinstance-completion',
|
||||
multiinstancesequential: 'multiinstance-sequential',
|
||||
multiinstanceservicetask: 'multiinstance-servicetask',
|
||||
multiinstanceusertask: 'multiinstance-usertask',
|
||||
multiinstancedmnsequence: 'multiinstance-dmnsequence',
|
||||
multiinstancemanualtask: 'multiinstance-manualtask',
|
||||
multiinstancesubprocess: 'multiinstance-subprocess',
|
||||
calledprocess: 'calledprocess',
|
||||
booleanvisibilityprocess: 'booleanvisibilityprocess',
|
||||
numbervisibilityprocess: 'numbervisibilityprocess',
|
||||
processformoutcome: 'outcomebuttons',
|
||||
uploadSingleMultipleFiles: 'upload-single-multiple-pro',
|
||||
processDisplayRestJson: 'process-display-rest-json',
|
||||
poolStartEndMessageThrow: 'pool-start-end-mess-throw',
|
||||
poolStartEndMessageCatch: 'pool-start-end-mess-catch',
|
||||
poolProcessCalled: 'pool-process-called',
|
||||
poolProcessCalling: 'pool-process-calling',
|
||||
poolNonIntBoundaryThrown: 'pool-nonint-boundary-throw',
|
||||
poolNonIntBoundaryCatch: 'pool-nonint-boundary-catch',
|
||||
poolIntermediateMessageThrow: 'pool-interm-message-throw',
|
||||
poolIntermediateMessageCatch: 'pool-interm-message-catch',
|
||||
poolInterruptingBoundarySubprocessThrow: 'pool-int-bound-subpr-throw',
|
||||
poolInterruptingBoundarySubprocessCatch: 'pool-int-bound-subpr-catch',
|
||||
poolInterruptingBoundaryThrow: 'pool-int-boundary-throw',
|
||||
poolInterruptingBoundaryCatch: 'pool-int-boundary-catch',
|
||||
attachFilesProcess: 'attach-files-process',
|
||||
attachFileVisible: 'attach-file-visible',
|
||||
attachFileInvisible: 'attach-file-invisible',
|
||||
attachLocalFile: 'attach-local-file'
|
||||
},
|
||||
forms: {
|
||||
tabVisibilityFields: {
|
||||
name: 'tabvisibilitywithfields'
|
||||
},
|
||||
tabVisibilityVars: {
|
||||
name: 'tabvisibilitywithvars'
|
||||
},
|
||||
usertaskform: {
|
||||
name: 'usertaskform'
|
||||
},
|
||||
dropdownform: {
|
||||
name: 'dropdownform'
|
||||
},
|
||||
formVisibility: {
|
||||
name: 'form-visibility'
|
||||
},
|
||||
multilingualform: {
|
||||
name: 'multilingualform'
|
||||
},
|
||||
inputform: {
|
||||
name: 'inputform'
|
||||
},
|
||||
outputform: {
|
||||
name: 'outputform'
|
||||
},
|
||||
exclusiveconditionform: {
|
||||
name: 'exclusive-condition-form'
|
||||
},
|
||||
uploadlocalfileform: {
|
||||
name: 'upload-localfile-form'
|
||||
},
|
||||
booleanvisibility: {
|
||||
name: 'booleanvisibility'
|
||||
},
|
||||
requirednumbervisibility: {
|
||||
name: 'requirednumbervisibility'
|
||||
},
|
||||
mealform: {
|
||||
name: 'mealform'
|
||||
},
|
||||
resultcollectionform: {
|
||||
name: 'resultcollectionform'
|
||||
},
|
||||
uploadSingleMultiple: {
|
||||
name: 'upload-single-multiple',
|
||||
widgets: {
|
||||
contentMultipleAttachFileId: 'UploadMultipleFileFromContentId'
|
||||
}
|
||||
},
|
||||
formWithJsonWidget: {
|
||||
name: 'form-with-json-widget'
|
||||
},
|
||||
formWithAllWidgets: {
|
||||
name: 'form-with-all-widgets'
|
||||
},
|
||||
poolForm: {
|
||||
name: 'pool-usertaskform'
|
||||
},
|
||||
attachFilesForm: {
|
||||
name: 'attach-files',
|
||||
/* cSpell:disable */
|
||||
attachFileWidget1: 'Attachfile09lgsk',
|
||||
attachFileWidget2: 'Attachfile0wopvy'
|
||||
},
|
||||
attachFileVisible: {
|
||||
name: 'attach-file-visible',
|
||||
textField: 'Text0t9anw',
|
||||
attachFileWidget1: 'Attachfile0tccnd',
|
||||
attachFileWidget2: 'Attachfile08cfo7'
|
||||
},
|
||||
attachFileInvisible: {
|
||||
name: 'attach-file-invisible',
|
||||
textField: 'Text0nmwr7',
|
||||
attachFileWidget1: 'Attachfile0l72dj',
|
||||
attachFileWidget2: 'Attachfile0lccsg'
|
||||
},
|
||||
attachLocalFile: {
|
||||
name: 'attach-local-file',
|
||||
attachFileWidget1: 'Attachfile0ku0bu',
|
||||
attachFileWidget2: 'Attachfile04mfeb'
|
||||
/* cSpell:enable */
|
||||
}
|
||||
},
|
||||
tasks: {
|
||||
processstring: 'inputtask',
|
||||
uploadSingleMultipleFiles: 'UploadSingleMultipleFiles'
|
||||
},
|
||||
security: [
|
||||
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser', 'processadminuser'] },
|
||||
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'sales', 'testgroup'], 'users': ['hruser'] }
|
||||
],
|
||||
infrastructure: {connectors: {restconnector: {}}, bridges: {}}
|
||||
},
|
||||
SUB_PROCESS_APP: {
|
||||
name: 'subprocessapp',
|
||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/develop/e2e/resources/activiti7/subprocessapp.zip?raw=true',
|
||||
processes: {
|
||||
processchild: 'processchild',
|
||||
processparent: 'processparent'
|
||||
},
|
||||
security: [
|
||||
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
|
||||
]
|
||||
}
|
||||
};
|
||||
import * as ResourcesData from './resources.json';
|
||||
|
||||
export const ACTIVITI_CLOUD_APPS = ResourcesData;
|
||||
|
@@ -34,7 +34,7 @@ export class FormFieldsPage {
|
||||
completeButton = element(by.id('adf-form-complete'));
|
||||
errorMessage = by.css('.adf-error-text-container .adf-error-text');
|
||||
|
||||
selectFormDropdown = new DropdownPage(element.all(by.css('adf-attach-form div[class*="mat-select-arrow"]')).first());
|
||||
selectFormDropdown = new DropdownPage(element.all(by.css('.adf-attach-form .mat-select-arrow')).first());
|
||||
|
||||
async setFieldValue(locator: (id: string) => By, field: string, value: string): Promise<void> {
|
||||
const fieldElement = element(locator(field));
|
||||
|
@@ -22,7 +22,7 @@ import { element, by } from 'protractor';
|
||||
|
||||
export class ProcessListPage {
|
||||
|
||||
processListEmptyTitle = element(by.css('div[class="adf-empty-content__title"]'));
|
||||
processListEmptyTitle = element(by.css('.adf-empty-content__title'));
|
||||
processInstanceList = element(by.css('adf-process-instance-list'));
|
||||
dataTable = new DataTableComponentPage(this.processInstanceList);
|
||||
|
||||
|
@@ -35,7 +35,7 @@ export class StartProcessPage {
|
||||
processDefinitionOptionsPanel = element(by.css('div[class*="mat-autocomplete-panel"]'));
|
||||
|
||||
processDefinitionDropdown = new DropdownPage(element(by.id('adf-select-process-dropdown')));
|
||||
applicationDropdown = new DropdownPage(element(by.css('[data-automation-id*="start-process-app"] div[class="mat-select-arrow"]')));
|
||||
applicationDropdown = new DropdownPage(element(by.css('[data-automation-id*="start-process-app"] .mat-select-arrow')));
|
||||
|
||||
async checkNoProcessMessage(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noProcess);
|
||||
|
@@ -31,7 +31,7 @@ export class TaskListPage {
|
||||
this.rootElement = rootElement;
|
||||
this.dataTable = new DataTableComponentPage(this.rootElement);
|
||||
this.noTasksFound = this.rootElement.element(
|
||||
by.css('div[class="adf-empty-content__title"]')
|
||||
by.css('.adf-empty-content__title')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class TaskListPage {
|
||||
return this.dataTable;
|
||||
}
|
||||
|
||||
getRowsDisplayedWithSameName(taskName): Promise<string> {
|
||||
getRowsDisplayedWithSameName(taskName: string): Promise<string> {
|
||||
return this.dataTable.getRowsWithSameColumnValues('Name', taskName);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export class TaskListPage {
|
||||
return BrowserActions.getText(this.noTasksFound);
|
||||
}
|
||||
|
||||
checkRowIsSelected(taskName): Promise<void> {
|
||||
checkRowIsSelected(taskName: string): Promise<void> {
|
||||
return this.dataTable.checkRowIsSelected('Name', taskName);
|
||||
}
|
||||
|
||||
|
@@ -1,26 +0,0 @@
|
||||
/*!
|
||||
* @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 { NgModule } from '@angular/core';
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [
|
||||
],
|
||||
exports: []
|
||||
})
|
||||
export class TestingModule { }
|
@@ -19,6 +19,5 @@ export * from './lib/core/public-api';
|
||||
export * from './lib/content-services/public-api';
|
||||
export * from './lib/process-services/public-api';
|
||||
export * from './lib/process-services-cloud/public-api';
|
||||
export * from './lib/testing.module';
|
||||
|
||||
export * from './lib/test.configuration';
|
||||
|
@@ -1,37 +0,0 @@
|
||||
/*!
|
||||
* @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 'core-js/es7/reflect';
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../dist/testing/"
|
||||
"outDir": "../dist/testing/",
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
6
lib/testing/tsconfig.lib.prod.json
Normal file
6
lib/testing/tsconfig.lib.prod.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user