diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html
index 7cffcaf3d4..4e2b6165e8 100644
--- a/demo-shell/src/app/components/files/files.component.html
+++ b/demo-shell/src/app/components/files/files.component.html
@@ -88,6 +88,7 @@
diff --git a/e2e/content-services/directives/create-library-directive.e2e.ts b/e2e/content-services/directives/create-library-directive.e2e.ts
new file mode 100644
index 0000000000..b76d15be5e
--- /dev/null
+++ b/e2e/content-services/directives/create-library-directive.e2e.ts
@@ -0,0 +1,264 @@
+/*!
+ * @license
+ * Copyright 2016 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 { LoginPage } from '../../pages/adf/loginPage';
+import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
+import { CreateLibraryDialog } from '../../pages/adf/dialog/createLibraryDialog';
+import { CustomSources } from '../../pages/adf/demo-shell/customSourcesPage';
+
+import { AcsUserModel } from '../../models/ACS/acsUserModel';
+import TestConfig = require('../../test.config');
+import AlfrescoApi = require('alfresco-js-api-node');
+import { browser, Key } from 'protractor';
+import { Util } from '../../util/util';
+
+describe('Create library directive', function () {
+
+ let loginPage = new LoginPage();
+ let contentServicesPage = new ContentServicesPage();
+ let createLibraryDialog = new CreateLibraryDialog();
+ let customSourcesPage = new CustomSources();
+
+ let visibility = {
+ public: 'Public',
+ private: 'Private',
+ moderated: 'Moderated'
+ };
+
+ let createSite;
+
+ let acsUser = new AcsUserModel();
+
+ beforeAll(async (done) => {
+ this.alfrescoJsApi = new AlfrescoApi({
+ provider: 'ECM',
+ hostEcm: TestConfig.adf.url
+ });
+
+ await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
+
+ await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
+
+ loginPage.loginToContentServicesUsingUserModel(acsUser);
+
+ createSite = await this.alfrescoJsApi.core.sitesApi.createSite({
+ 'title': Util.generateRandomString(20).toLowerCase(),
+ 'visibility': 'PUBLIC'
+ });
+
+ done();
+ });
+
+ beforeEach( (done) => {
+ contentServicesPage.goToDocumentList();
+ contentServicesPage.openCreateLibraryDialog();
+ done();
+ });
+
+ afterEach(async (done) => {
+ await browser.actions().sendKeys(Key.ESCAPE).perform();
+ done();
+ });
+
+ it('[C290158] Should display the Create Library defaults', () => {
+ expect(createLibraryDialog.getTitle()).toMatch('Create Library');
+ expect(createLibraryDialog.isNameDisplayed()).toBe(true, 'Name input field is not displayed');
+ expect(createLibraryDialog.isLibraryIdDisplayed()).toBe(true, 'Library ID field is not displayed');
+ expect(createLibraryDialog.isDescriptionDisplayed()).toBe(true, 'Library description is not displayed');
+ expect(createLibraryDialog.isPublicDisplayed()).toBe(true, 'Public radio button is not displayed');
+ expect(createLibraryDialog.isPrivateDisplayed()).toBe(true, 'Private radio button is not displayed');
+ expect(createLibraryDialog.isModeratedDisplayed()).toBe(true, 'Moderated radio button is not displayed');
+ expect(createLibraryDialog.isCreateEnabled()).toBe(false, 'Create button is not disabled');
+ expect(createLibraryDialog.isCancelEnabled()).toBe(true, 'Cancel button is disabled');
+ expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.public, 'The default visibility is not public');
+ });
+
+ it('[C290159] Should close the dialog when clicking Cancel button', () => {
+ let libraryName = 'cancelLibrary';
+
+ createLibraryDialog.typeLibraryName(libraryName);
+
+ createLibraryDialog.clickCancel();
+
+ createLibraryDialog.waitForDialogToClose();
+ });
+
+ it('[C290160] Should create a public library', () => {
+ let libraryName = Util.generateRandomString();
+ let libraryDescription = Util.generateRandomString();
+ createLibraryDialog.typeLibraryName(libraryName);
+ createLibraryDialog.typeLibraryDescription(libraryDescription);
+ createLibraryDialog.selectPublic();
+
+ expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.public, 'The visibility is not public');
+
+ createLibraryDialog.clickCreate();
+ createLibraryDialog.waitForDialogToClose();
+
+ expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
+
+ customSourcesPage.navigateToCustomSources();
+ customSourcesPage.selectMySitesSourceType();
+ customSourcesPage.checkRowIsDisplayed(libraryName);
+
+ expect(customSourcesPage.getStatusCell(libraryName)).toMatch('PUBLIC', 'Wrong library status.');
+ });
+
+ it('[C290173] Should create a private library', () => {
+ let libraryName = Util.generateRandomString();
+ let libraryDescription = Util.generateRandomString();
+ createLibraryDialog.typeLibraryName(libraryName);
+ createLibraryDialog.typeLibraryDescription(libraryDescription);
+ createLibraryDialog.selectPrivate();
+
+ expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.private, 'The visibility is not private');
+
+ createLibraryDialog.clickCreate();
+ createLibraryDialog.waitForDialogToClose();
+
+ expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
+
+ customSourcesPage.navigateToCustomSources();
+ customSourcesPage.selectMySitesSourceType();
+ customSourcesPage.checkRowIsDisplayed(libraryName);
+
+ expect(customSourcesPage.getStatusCell(libraryName)).toMatch('PRIVATE', 'Wrong library status.');
+ });
+
+ it('[C290174, C290175] Should create a moderated library with a given Library ID', () => {
+ let libraryName = Util.generateRandomString();
+ let libraryId = Util.generateRandomString();
+ let libraryDescription = Util.generateRandomString();
+ createLibraryDialog.typeLibraryName(libraryName);
+ createLibraryDialog.typeLibraryId(libraryId);
+ createLibraryDialog.typeLibraryDescription(libraryDescription);
+ createLibraryDialog.selectModerated();
+
+ expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.moderated, 'The visibility is not moderated');
+
+ createLibraryDialog.clickCreate();
+ createLibraryDialog.waitForDialogToClose();
+
+ expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
+
+ customSourcesPage.navigateToCustomSources();
+ customSourcesPage.selectMySitesSourceType();
+ customSourcesPage.checkRowIsDisplayed(libraryName);
+
+ expect(customSourcesPage.getStatusCell(libraryName)).toMatch('MODERATED', 'Wrong library status.');
+ });
+
+ it('[C290163] Should disable Create button when a mandatory field is not filled in', () => {
+ let inputValue = Util.generateRandomString();
+
+ createLibraryDialog.typeLibraryName(inputValue);
+ createLibraryDialog.clearLibraryId();
+ expect(createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
+ createLibraryDialog.clearLibraryName();
+
+ createLibraryDialog.typeLibraryId(inputValue);
+ expect(createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
+ createLibraryDialog.clearLibraryId();
+
+ createLibraryDialog.typeLibraryDescription(inputValue);
+ expect(createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
+ });
+
+ it('[C290164] Should auto-fill in the Library Id built from library name', () => {
+ let name: string[] = ['abcd1234', 'ab cd 12 34', 'ab cd&12+34_@link/*'];
+ let libraryId: string[] = ['abcd1234', 'ab-cd-12-34', 'ab-cd1234link'];
+
+ for (let _i = 0; _i < 3; _i++) {
+ createLibraryDialog.typeLibraryName(name[_i]);
+ expect(createLibraryDialog.getLibraryIdText()).toMatch(libraryId[_i]);
+ createLibraryDialog.clearLibraryName();
+ }
+ });
+
+ it('[C290176] Should not accept special characters for Library Id', () => {
+ let name = 'My Library';
+ let libraryId: string[] = ['My New Library', 'My+New+Library123!', '<>'];
+
+ createLibraryDialog.typeLibraryName(name);
+
+ for (let _i = 0; _i < 3; _i++) {
+ createLibraryDialog.typeLibraryId(libraryId[_i]);
+ expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
+ expect(createLibraryDialog.getErrorMessage()).toMatch('Use numbers and letters only');
+ }
+ });
+
+ it('[C291793] Should display error for Name field filled in with spaces only', () => {
+ let name = ' ';
+ let libraryId = Util.generateRandomString();
+
+ createLibraryDialog.typeLibraryName(name);
+ createLibraryDialog.typeLibraryId(libraryId);
+
+ expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
+ expect(createLibraryDialog.getErrorMessage()).toMatch("Library name can't contain only spaces");
+ });
+
+ it('[C290177] Should not accept a duplicate Library Id', () => {
+ let name = 'My Library';
+ let libraryId = Util.generateRandomString();
+
+ createLibraryDialog.typeLibraryName(name);
+ createLibraryDialog.typeLibraryId(libraryId);
+ createLibraryDialog.clickCreate();
+ createLibraryDialog.waitForDialogToClose();
+
+ contentServicesPage.openCreateLibraryDialog();
+
+ createLibraryDialog.typeLibraryName(name);
+ createLibraryDialog.typeLibraryId(libraryId);
+ expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
+ expect(createLibraryDialog.getErrorMessage()).toMatch("This Library ID isn't available. Try a different Library ID.");
+ });
+
+ it('[C290178] Should accept the same library name but different Library Ids', () => {
+ let name = createSite.entry.title;
+ let libraryId = Util.generateRandomString();
+
+ createLibraryDialog.typeLibraryName(name.toUpperCase());
+ createLibraryDialog.typeLibraryId(libraryId);
+
+ createLibraryDialog.waitForLibraryNameHint();
+ expect(createLibraryDialog.getLibraryNameHint()).toMatch('Library name already in use', 'The library name hint is wrong');
+
+ createLibraryDialog.clickCreate();
+ createLibraryDialog.waitForDialogToClose();
+
+ expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create library dialog remained open');
+ });
+
+ it('[C290179] Should not accept more than the expected characters for input fields', () => {
+ let name = Util.generateRandomString(257);
+ let libraryId = Util.generateRandomString(73);
+ let libraryDescription = Util.generateRandomString(513);
+
+ createLibraryDialog.typeLibraryName(name);
+ createLibraryDialog.typeLibraryId(libraryId);
+ createLibraryDialog.typeLibraryDescription(libraryDescription);
+
+ createLibraryDialog.selectPublic();
+
+ expect(createLibraryDialog.getErrorMessages(0)).toMatch('Use 256 characters or less for title');
+ expect(createLibraryDialog.getErrorMessages(1)).toMatch('Use 72 characters or less for the URL name');
+ expect(createLibraryDialog.getErrorMessages(2)).toMatch('Use 512 characters or less for description');
+ });
+});
diff --git a/e2e/pages/adf/contentServicesPage.ts b/e2e/pages/adf/contentServicesPage.ts
index 4c80bdfb3b..af790da728 100644
--- a/e2e/pages/adf/contentServicesPage.ts
+++ b/e2e/pages/adf/contentServicesPage.ts
@@ -19,6 +19,7 @@ import TestConfig = require('../../test.config');
import { Util } from '../../util/util';
import { ContentListPage } from './dialog/contentListPage';
import { CreateFolderDialog } from './dialog/createFolderDialog';
+import { CreateLibraryDialog } from './dialog/createLibraryDialog';
import { NavigationBarPage } from './navigationBarPage';
import { NodeActions } from '../../actions/ACS/node.actions';
import { by, element, protractor, $$, browser } from 'protractor';
@@ -30,11 +31,13 @@ export class ContentServicesPage {
contentList = new ContentListPage();
createFolderDialog = new CreateFolderDialog();
nodeActions = new NodeActions();
+ createLibraryDialog = new CreateLibraryDialog();
uploadBorder = element(by.id('document-list-container'));
tableBody = element.all(by.css('adf-document-list div[class="adf-datatable-body"]')).first();
contentServices = element(by.css('a[data-automation-id="Content Services"]'));
currentFolder = element(by.css('div[class*="adf-breadcrumb-item adf-active"] div'));
createFolderButton = element(by.css('button[data-automation-id="create-new-folder"]'));
+ createLibraryButton = element(by.css('button[data-automation-id="create-new-library"]'));
activeBreadcrumb = element(by.css('div[class*="active"]'));
tooltip = by.css('div[class*="--text adf-full-width"] span');
uploadFileButton = element(by.css('input[data-automation-id="upload-single-file"]'));
@@ -360,6 +363,13 @@ export class ContentServicesPage {
return this;
}
+ openCreateLibraryDialog() {
+ Util.waitUntilElementIsVisible(this.createLibraryButton);
+ this.createLibraryButton.click();
+ this.createLibraryDialog.waitForDialogToOpen();
+ return this.createLibraryDialog;
+ }
+
createNewFolder(folder) {
this.clickOnCreateNewFolder();
this.createFolderDialog.addFolderName(folder);
diff --git a/e2e/pages/adf/demo-shell/customSourcesPage.ts b/e2e/pages/adf/demo-shell/customSourcesPage.ts
new file mode 100644
index 0000000000..946f97fafd
--- /dev/null
+++ b/e2e/pages/adf/demo-shell/customSourcesPage.ts
@@ -0,0 +1,79 @@
+/*!
+ * @license
+ * Copyright 2016 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 { Util } from '../../../util/util';
+import { element, by } from 'protractor';
+import { ContentListPage } from '../dialog/contentListPage';
+import { NavigationBarPage } from '../navigationBarPage';
+
+let source = {
+ favorites: 'Favorites',
+ recent: 'Recent',
+ sharedLinks: 'Shared Links',
+ sites: 'Sites',
+ mySites: 'My Sites',
+ trashcan: 'Trashcan',
+ root: 'Root',
+ my: 'My',
+ shared: 'Shared'
+};
+
+let column = {
+ status: 'Status'
+};
+
+export class CustomSources {
+
+ contentList = new ContentListPage();
+ navigationBarPage = new NavigationBarPage();
+
+ toolbar = element(by.css('app-custom-sources .adf-toolbar-title'));
+ sourceTypeDropdown = element(by.css('div[class*="select-arrow"]>div'));
+
+ getSourceType(option) {
+ return element(by.cssContainingText('.cdk-overlay-pane span', `${option}`));
+ }
+
+ waitForToolbarToBeVisible() {
+ Util.waitUntilElementIsVisible(this.toolbar);
+ return this;
+ }
+
+ navigateToCustomSources() {
+ this.navigationBarPage.navigateToCustomSources();
+ this.waitForToolbarToBeVisible();
+ }
+ clickOnSourceType() {
+ return this.sourceTypeDropdown.click();
+ }
+
+ selectMySitesSourceType() {
+ this.clickOnSourceType();
+ this.getSourceType(source.mySites).click();
+ }
+
+ checkRowIsDisplayed(rowName) {
+ let row = this.contentList.getRowsName(rowName);
+ Util.waitUntilElementIsVisible(row);
+ }
+
+ getStatusCell(rowName) {
+ Util.waitUntilElementIsVisible(this.contentList.getCellByNameAndColumn(rowName, column.status));
+ return this.contentList.getCellByNameAndColumn(rowName, column.status).getText();
+ }
+
+}
diff --git a/e2e/pages/adf/dialog/contentListPage.ts b/e2e/pages/adf/dialog/contentListPage.ts
index 1e0edfb09d..b9d4facce8 100644
--- a/e2e/pages/adf/dialog/contentListPage.ts
+++ b/e2e/pages/adf/dialog/contentListPage.ts
@@ -47,11 +47,11 @@ export class ContentListPage {
}
getTooltip(nodeName) {
- return this.getRowByRowName(nodeName).element(by.css(`#document-list-container span[title="${nodeName}"]`)).getAttribute('title');
+ return this.getRowByRowName(nodeName).element(by.css(`adf-document-list span[title="${nodeName}"]`)).getAttribute('title');
}
getRowsName(content) {
- let row = element.all(by.css(`#document-list-container span[title='${content}']`)).first();
+ let row = element.all(by.css(`adf-document-list span[title='${content}']`)).first();
Util.waitUntilElementIsVisible(row);
return row;
}
@@ -61,6 +61,10 @@ export class ContentListPage {
return this.getRowsName(content).element(this.rowByRowName);
}
+ getCellByNameAndColumn(content, columnName) {
+ return this.getRowByRowName(content).element(by.css(`div[title='${columnName}']`));
+ }
+
getAllDisplayedRows() {
return element.all(this.rows).count();
}
diff --git a/e2e/pages/adf/dialog/createLibraryDialog.ts b/e2e/pages/adf/dialog/createLibraryDialog.ts
new file mode 100644
index 0000000000..75f15bfee6
--- /dev/null
+++ b/e2e/pages/adf/dialog/createLibraryDialog.ts
@@ -0,0 +1,169 @@
+/*!
+ * @license
+ * Copyright 2016 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, browser, protractor } from 'protractor';
+import { Util } from '../../../util/util';
+
+export class CreateLibraryDialog {
+ libraryDialog = element(by.css('[role="dialog"]'));
+ libraryTitle = element(by.css('.adf-library-dialog>h2'));
+ libraryNameField = element(by.css('input[formcontrolname="title"]'));
+ libraryIdField = element(by.css('input[formcontrolname="id"]'));
+ libraryDescriptionField = element(by.css('textarea[formcontrolname="description"]'));
+ publicRadioButton = element(by.css('[data-automation-id="PUBLIC"]>label'));
+ privateRadioButton = element(by.css('[data-automation-id="PRIVATE"]>label'));
+ moderatedRadioButton = element(by.css('[data-automation-id="MODERATED"]>label'));
+ cancelButton = element(by.css('button[data-automation-id="cancel-library-id"]'));
+ createButton = element(by.css('button[data-automation-id="create-library-id"]'));
+ errorMessage = element(by.css('.mat-dialog-content .mat-error'));
+ errorMessages = element.all(by.css('.mat-dialog-content .mat-error'));
+ libraryNameHint = element(by.css('adf-library-dialog .mat-hint'));
+
+ getSelectedRadio() {
+ let radio = element(by.css('.mat-radio-button[class*="checked"]'));
+ Util.waitUntilElementIsVisible(radio);
+ return radio.getText();
+ }
+
+ waitForDialogToOpen() {
+ Util.waitUntilElementIsPresent(this.libraryDialog);
+ return this;
+ }
+
+ waitForDialogToClose() {
+ Util.waitUntilElementIsNotOnPage(this.libraryDialog);
+ return this;
+ }
+
+ isDialogOpen() {
+ return browser.isElementPresent(this.libraryDialog);
+ }
+
+ getTitle() {
+ return this.libraryTitle.getText();
+ }
+
+ getLibraryIdText() {
+ return this.libraryIdField.getAttribute('value');
+ }
+
+ isErrorMessageDisplayed() {
+ return this.errorMessage.isDisplayed();
+ }
+
+ getErrorMessage() {
+ Util.waitUntilElementIsVisible(this.errorMessage);
+ return this.errorMessage.getText();
+ }
+
+ getErrorMessages(position) {
+ Util.waitUntilElementIsVisible(this.errorMessages);
+ return this.errorMessages.get(position).getText();
+ }
+
+ waitForLibraryNameHint() {
+ Util.waitUntilElementIsVisible(this.libraryNameHint);
+ return this;
+ }
+ getLibraryNameHint() {
+ Util.waitUntilElementIsVisible(this.libraryNameHint);
+ return this.libraryNameHint.getText();
+ }
+
+ isNameDisplayed() {
+ return this.libraryNameField.isDisplayed();
+ }
+
+ isLibraryIdDisplayed() {
+ return this.libraryIdField.isDisplayed();
+ }
+
+ isDescriptionDisplayed() {
+ return this.libraryDescriptionField.isDisplayed();
+ }
+
+ isPublicDisplayed() {
+ return this.publicRadioButton.isDisplayed();
+ }
+
+ isModeratedDisplayed() {
+ return this.moderatedRadioButton.isDisplayed();
+ }
+
+ isPrivateDisplayed() {
+ return this.privateRadioButton.isDisplayed();
+ }
+
+ isCreateEnabled() {
+ return this.createButton.isEnabled();
+ }
+
+ isCancelEnabled() {
+ return this.cancelButton.isEnabled();
+ }
+
+ clickCreate() {
+ Util.waitUntilElementIsClickable(this.createButton);
+ this.createButton.click();
+ }
+
+ clickCancel() {
+ this.cancelButton.click();
+ }
+
+ typeLibraryName(libraryName: string) {
+ this.libraryNameField.clear();
+ this.libraryNameField.sendKeys(libraryName);
+ }
+
+ typeLibraryId(libraryId) {
+ this.libraryIdField.clear();
+ this.libraryIdField.sendKeys(libraryId);
+ }
+
+ typeLibraryDescription(libraryDescription) {
+ this.libraryDescriptionField.clear();
+ this.libraryDescriptionField.sendKeys(libraryDescription);
+ }
+
+ clearLibraryName() {
+ this.libraryNameField.clear();
+ this.libraryNameField.sendKeys(' ', protractor.Key.CONTROL, 'a', protractor.Key.NULL, protractor.Key.BACK_SPACE);
+ }
+
+ clearLibraryId() {
+ this.libraryIdField.clear();
+ this.libraryIdField.sendKeys(' ', protractor.Key.CONTROL, 'a', protractor.Key.NULL, protractor.Key.BACK_SPACE);
+ }
+
+ clearLibraryDescription() {
+ this.libraryDescriptionField.clear();
+ this.libraryDescriptionField.sendKeys(' ', protractor.Key.CONTROL, 'a', protractor.Key.NULL, protractor.Key.BACK_SPACE);
+ }
+
+ selectPublic() {
+ this.publicRadioButton.click();
+ }
+
+ selectPrivate() {
+ this.privateRadioButton.click();
+ }
+
+ selectModerated() {
+ this.moderatedRadioButton.click();
+ }
+}
diff --git a/e2e/pages/adf/navigationBarPage.ts b/e2e/pages/adf/navigationBarPage.ts
index 900219b23c..47bb6598b0 100644
--- a/e2e/pages/adf/navigationBarPage.ts
+++ b/e2e/pages/adf/navigationBarPage.ts
@@ -46,6 +46,7 @@ export class NavigationBarPage {
processListButton = element(by.css('a[data-automation-id="Process List"]'));
treeViewButton = element(by.css('a[data-automation-id="Tree View"]'));
iconsButton = element(by.css('a[data-automation-id="Icons"]'));
+ customSourcesButton = element(by.css('a[data-automation-id="Custom Sources"]'));
navigateToDatatable() {
Util.waitUntilElementIsVisible(this.dataTableButton);
@@ -221,4 +222,9 @@ export class NavigationBarPage {
Util.waitUntilElementIsVisible(this.processListButton);
return this;
};
+
+ navigateToCustomSources() {
+ Util.waitUntilElementIsVisible(this.customSourcesButton);
+ this.customSourcesButton.click();
+ }
}
diff --git a/lib/content-services/dialogs/library/library.dialog.html b/lib/content-services/dialogs/library/library.dialog.html
index 092661cb58..3d304b8d32 100644
--- a/lib/content-services/dialogs/library/library.dialog.html
+++ b/lib/content-services/dialogs/library/library.dialog.html
@@ -68,6 +68,7 @@
color="primary"
[disabled]="option.disabled"
*ngFor="let option of visibilityOptions"
+ [attr.data-automation-id]="option.value"
[value]="option.value"
[checked]="visibilityOption.value === option.value"
>
@@ -78,7 +79,7 @@
-