From e39a2b149b4f1ce18ae708fd1e1daaf0742f1e4b Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 23 Oct 2018 15:05:38 +0100 Subject: [PATCH] [ADF-3591] spellcheck support for code (#3827) * setup spellcheck --- .travis.yml | 4 +- README.md | 1 + cspell.json | 140 ++++++++ demo-shell/e2e/app.e2e-spec.e2e.ts | 8 +- demo-shell/e2e/app.po.ts | 2 +- demo-shell/src/app/app.routes.ts | 1 + .../app-layout/app-layout.component.html | 2 +- .../app-layout/app-layout.component.ts | 11 +- .../card-view/card-view.component.html | 2 +- .../app/components/files/files.component.html | 6 +- .../app/components/files/files.component.ts | 7 +- .../src/app/components/form/demo-form.ts | 6 +- .../app/components/form/fake-form.service.ts | 2 +- .../components/form/form-loading.component.ts | 2 +- .../app/components/login/login.component.html | 10 +- .../app/components/login/login.component.ts | 12 +- .../process-service.component.html | 10 +- .../process-service.component.ts | 50 +-- .../components/theme-picker/theme-picker.ts | 2 + .../node-permission.service.md | 2 +- docs/core/form.service.md | 4 +- docs/core/highlight-transform.service.md | 8 +- docs/core/login.component.md | 14 +- docs/core/logout.directive.md | 2 +- docs/release-notes/RelNote170.md | 2 +- .../working-with-nodes-api-service.md | 2 +- .../document_list_actions.e2e.ts | 10 +- .../document_list_component.e2e.ts | 11 +- .../document_list_pagination.e2e.ts | 8 +- .../search/search_page_component.e2e.ts | 4 +- .../trashcan_pagination.e2e.ts | 2 +- .../upload/excluded_file.e2e.ts | 2 +- .../upload/uploader_component.e2e.ts | 6 +- .../upload/user_permission.e2e.ts | 4 +- .../version/version-actions.e2e.ts | 12 +- .../version/version-permissions.e2e.ts | 64 ++-- .../version/version-properties.e2e.ts | 2 +- .../version/version-smoke-tests.e2e.ts | 12 +- .../card-view/aspect-oriented-config.e2e.ts | 60 ++-- e2e/core/card-view/card-view-component.e2e.ts | 4 +- .../card-view/metadata-permissions.e2e.ts | 6 +- e2e/core/card-view/metadata-properties.e2e.ts | 44 +-- .../card-view/metadata-smoke-tests.e2e.ts | 8 +- e2e/core/error_component.e2e.ts | 2 +- e2e/core/infinite_scrolling.e2e.ts | 2 +- e2e/core/pagination_empty_current_page.e2e.ts | 2 +- e2e/core/viewer/viewer_component.e2e.ts | 6 +- e2e/core/viewer/viewer_properties.e2e.ts | 4 +- e2e/pages/adf/cardViewPageComponent.js | 2 +- e2e/pages/adf/contentServicesPage.ts | 4 +- e2e/pages/adf/loginPage.ts | 10 +- e2e/pages/adf/metadataViewPage.js | 16 +- .../adf/process_services/processListPage.ts | 2 +- .../adf/process_services/taskDetailsPage.ts | 6 +- e2e/pages/adf/searchFiltersPage.ts | 6 +- e2e/pages/adf/versionManagerPage.ts | 4 +- e2e/process-services/apps-section.e2e.ts | 16 +- .../attach-file-widget.e2e.ts | 6 +- .../attach_form_component.e2e.ts | 8 +- .../checklist_component.e2e.ts | 16 +- .../comment_component_tasks.e2e.ts | 6 +- .../empty_process_list_component.e2e.ts | 4 +- .../form_widgets_component.e2e.ts | 42 +-- .../pagination_tasklist_addingTasks.e2e.ts | 2 +- e2e/process-services/people_component.e2e.ts | 24 +- .../sort_tasklist_pagination.e2e.ts | 4 +- e2e/process-services/standalone_task.e2e.ts | 16 +- .../start_process_component.e2e.ts | 14 +- .../start_task_custom_app.e2e.ts | 38 +-- .../start_task_task_app.e2e.ts | 36 +-- e2e/process-services/task-audit.e2e.ts | 12 +- .../task_attachmentList_actionMenu.e2e.ts | 20 +- .../task_list_pagination.e2e.ts | 14 +- e2e/util/constants.js | 20 +- e2e/util/resources.js | 14 +- e2e/util/util.js | 4 +- .../breadcrumb/breadcrumb.component.spec.ts | 2 +- .../dropdown-breadcrumb.component.spec.ts | 4 +- .../content-metadata-config.interface.ts | 2 +- ...property-groups-translator.service.spec.ts | 4 +- .../content-node-dialog.service.ts | 2 +- ...tent-node-selector-panel.component.spec.ts | 6 +- .../content-node-selector-panel.component.ts | 6 +- .../content-node-selector.component.spec.ts | 6 +- .../dialogs/folder.dialog.spec.ts | 2 +- lib/content-services/dialogs/folder.dialog.ts | 2 +- .../dialogs/node-lock.dialog.spec.ts | 2 +- .../data/share-datatable-adapter.spec.ts | 4 +- .../data/share-datatable-adapter.ts | 6 +- .../services/custom-resources.service.ts | 4 +- .../services/document-actions.service.spec.ts | 4 +- .../services/document-actions.service.ts | 8 +- .../services/folder-actions.service.spec.ts | 4 +- .../services/folder-actions.service.ts | 8 +- .../folder-create.directive.spec.ts | 4 +- lib/content-services/i18n/de.json | 4 +- lib/content-services/i18n/en.json | 2 +- lib/content-services/i18n/es.json | 4 +- lib/content-services/i18n/fr.json | 4 +- lib/content-services/i18n/it.json | 4 +- lib/content-services/i18n/ja.json | 4 +- lib/content-services/i18n/nb.json | 4 +- lib/content-services/i18n/nl.json | 4 +- lib/content-services/i18n/pt-BR.json | 4 +- lib/content-services/i18n/ru.json | 4 +- lib/content-services/i18n/zh-CN.json | 4 +- .../mock/add-permission.component.mock.ts | 2 + .../add-permission.component.spec.ts | 4 +- .../permission-list.component.spec.ts | 4 +- .../services/node-permission.service.spec.ts | 4 +- .../services/node-permission.service.ts | 6 +- .../search-date-range.component.spec.ts | 4 +- .../search-date-range.component.ts | 2 +- .../sites-dropdown.component.spec.ts | 10 +- .../tag/services/tag.service.ts | 8 +- .../base-upload/upload-base.spec.ts | 4 +- .../file-uploading-dialog.component.spec.ts | 10 +- .../file-uploading-dialog.component.ts | 16 +- .../file-uploading-list.component.spec.ts | 4 +- .../upload-button.component.spec.ts | 2 +- .../components/upload-drag-area.component.ts | 2 +- .../file-draggable.directive.spec.ts | 2 +- .../webscript/webscript.component.ts | 10 +- .../app-config/app-config.service.spec.ts | 4 +- lib/core/app-config/app-config.service.ts | 2 + .../card-view-boolitem.component.spec.ts | 4 +- .../card-view-dateitem.component.spec.ts | 14 +- .../card-view-dateitem.component.ts | 2 +- ...ard-view-item-dispatcher.component.spec.ts | 8 +- .../card-view-item-dispatcher.component.ts | 6 +- .../card-view-textitem.component.spec.ts | 2 +- .../accordion-group.component.spec.ts | 8 +- lib/core/collapsable/collapsable.module.ts | 2 +- .../comments/comment-list.component.spec.ts | 6 +- .../context-menu-holder.component.spec.ts | 12 +- .../datatable/datatable.component.spec.ts | 4 +- lib/core/datatable/data/data-table.schema.ts | 4 +- .../directives/highlight.directive.spec.ts | 19 +- lib/core/directives/highlight.directive.ts | 4 +- lib/core/directives/logout.directive.spec.ts | 6 +- lib/core/directives/logout.directive.ts | 4 +- .../directives/node-permission.directive.ts | 2 +- lib/core/directives/node-restore.directive.ts | 4 +- lib/core/directives/upload.directive.ts | 8 +- .../form/components/form.component.spec.ts | 2 +- .../components/start-form.component.spec.ts | 11 +- .../form/components/start-form.component.ts | 2 +- .../widgets/content/content.widget.spec.ts | 10 +- .../widgets/core/form-field.model.ts | 9 +- .../widgets/date-time/date-time.widget.ts | 2 +- .../components/widgets/date/date.widget.ts | 2 +- .../dynamic-table.widget.spec.ts | 2 +- .../dynamic-table/dynamic-table.widget.ts | 4 +- .../dynamic-table/editors/date/date.editor.ts | 2 +- .../editors/datetime/datetime.editor.ts | 2 +- .../editors/dropdown/dropdown.editor.spec.ts | 2 +- .../widgets/text/text.widget.spec.ts | 10 +- .../typeahead/typeahead.widget.spec.ts | 30 +- .../widgets/upload/upload.widget.spec.ts | 6 + .../components/widgets/widget.component.ts | 2 +- lib/core/form/services/ecm-model.service.ts | 4 +- .../services/form-rendering.service.spec.ts | 2 +- lib/core/form/services/form.service.spec.ts | 6 +- lib/core/form/services/form.service.ts | 6 +- .../form/services/process-content.service.ts | 4 +- .../widget-visibility.service.spec.ts | 4 +- .../language-menu/language-menu.component.ts | 6 +- .../header/header.component.spec.ts | 4 +- .../sidenav-layout.component.spec.ts | 4 +- .../login/components/login.component.spec.ts | 4 +- lib/core/login/components/login.component.ts | 4 - ...ck.ts => formDefinitionVisibility.mock.ts} | 0 .../mock/form/start-form.component.mock.ts | 8 +- lib/core/mock/public-api.ts | 2 +- lib/core/mock/renditionsService.mock.ts | 153 +++++---- lib/core/models/permissions.enum.ts | 1 + lib/core/pipes/text-highlight.pipe.ts | 4 +- lib/core/pipes/time-ago.pipe.spec.ts | 1 + lib/core/pipes/user-initial.pipe.spec.ts | 6 +- .../services/authentication.service.spec.ts | 3 + lib/core/services/content.service.ts | 2 +- .../services/deleted-nodes-api.service.ts | 2 +- lib/core/services/favorites-api.service.ts | 2 +- .../services/highlight-transform.service.ts | 4 +- lib/core/services/nodes-api.service.ts | 12 +- lib/core/services/page-title.service.spec.ts | 4 + lib/core/services/renditions.service.spec.ts | 10 +- lib/core/services/shared-links-api.service.ts | 4 +- lib/core/services/sites.service.ts | 4 +- lib/core/services/thumbnail.service.ts | 1 + lib/core/services/upload.service.spec.ts | 7 +- .../services/user-preferences.service.spec.ts | 2 +- .../error-content.component.spec.ts | 2 +- .../components/user-info.component.spec.ts | 4 +- lib/core/utils/file-utils.ts | 4 +- lib/core/utils/momentDateAdapter.ts | 6 +- lib/core/utils/object-utils.spec.ts | 2 +- .../pdfViewer-thumbnails.component.spec.ts | 2 + .../pdfViewer-thumbnails.component.ts | 2 + .../components/pdfViewer.component.spec.ts | 10 +- .../viewer/components/pdfViewer.component.ts | 16 +- .../components/txtViewer.component.spec.ts | 2 +- .../components/viewer.component.spec.ts | 2 +- .../analytics-process.module.ts | 18 +- .../analytics-generator.component.spec.ts | 2 +- ...nalytics-report-heat-map.component.spec.ts | 18 +- .../components/analytics.component.html | 2 +- .../components/analytics.component.ts | 10 +- .../widgets/checkbox/checkbox.widget.ts | 2 +- .../widgets/date-range/date-range.widget.ts | 2 +- .../widgets/dropdown/dropdown.widget.ts | 2 +- .../widgets/duration/duration.widget.ts | 4 +- .../widgets/number/number.widget.ts | 2 +- .../diagram.component.activities.spec.ts | 1 + .../diagram.component.gateways.spec.ts | 32 +- .../components/diagram.component.swim.spec.ts | 4 +- .../raphael/raphael-flow-arrow.component.ts | 8 +- .../raphael-multiline-text.component.ts | 4 +- .../raphael/raphael-pentagon.component.ts | 4 +- .../components/raphael/raphael.service.ts | 2 - .../tooltip/diagram-tooltip.component.ts | 4 +- .../mock/analytics/analyticsComponent.mock.ts | 2 + .../mock/diagram/diagramGateways.mock.ts | 24 +- .../mock/diagram/diagramSwimlanes.mock.ts | 2 +- .../app-list/apps-list.component.spec.ts | 4 +- lib/process-services/app-list/icon.model.ts | 1 + .../process-attachment-list.component.ts | 2 +- .../task-attachment-list.component.spec.ts | 8 +- .../task-attachment-list.component.ts | 4 +- .../attach-file-widget.component.ts | 8 +- .../process/process-instances-list.mock.ts | 86 +++-- .../mock/process/process.model.mock.ts | 1 + .../process/start-process.component.mock.ts | 2 +- .../mock/task/task-list.mock.ts | 61 ++-- .../people-selector.component.spec.ts | 2 +- .../components/people/people.component.html | 2 +- .../people/people.component.spec.ts | 4 +- .../components/people/people.component.ts | 2 +- .../process-instance-details.component.html | 2 +- .../process-instance-tasks.component.html | 2 +- .../process-instance-tasks.component.ts | 8 +- .../components/process-list.component.spec.ts | 10 +- .../start-process.component.spec.ts | 32 +- .../services/process.service.spec.ts | 1 + .../components/checklist.component.ts | 2 +- .../components/start-task.component.html | 8 +- .../components/start-task.component.spec.ts | 56 ++-- .../components/start-task.component.ts | 10 +- .../components/task-audit.directive.spec.ts | 5 +- .../components/task-details.component.html | 4 +- .../components/task-details.component.spec.ts | 12 +- .../components/task-details.component.ts | 8 +- .../components/task-filters.component.spec.ts | 2 +- .../components/task-header.component.spec.ts | 6 +- .../components/task-header.component.ts | 2 +- .../components/task-list.component.spec.ts | 12 +- .../task-standalone.component.spec.ts | 6 +- .../services/task-filter.service.spec.ts | 6 +- .../services/tasklist.service.spec.ts | 2 +- .../task-list/services/tasklist.service.ts | 2 +- package-lock.json | 304 ++++++++++++++++++ package.json | 4 +- 262 files changed, 1561 insertions(+), 1005 deletions(-) create mode 100644 cspell.json rename lib/core/mock/form/{formDefinitionVisibiity.mock.ts => formDefinitionVisibility.mock.ts} (100%) diff --git a/.travis.yml b/.travis.yml index b3ea007312..5fe01b920c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,9 @@ jobs: (./scripts/update-version.sh -gnu -alpha && ././scripts/npm-build-all.sh -sb --skip-lint || exit 1;); fi - stage: Lint - script: (./scripts/lint.sh) + script: + - ./scripts/lint.sh + - npm run spellcheck - stage: Unit test env: STAGE=core script: (./scripts/npm-build-all.sh -si -sb -t "core" --skip-lint || exit 1;); diff --git a/README.md b/README.md index 0a8ad26ca8..0c76dac03d 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,4 @@ All components are supported in the following browsers: * Due to a [known issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1188880) in Firefox, the Alfresco Upload Component does not currently support folder upload functionality on Firefox. See the [Browser Support](BROWSER-SUPPORT.md) article for more details. + diff --git a/cspell.json b/cspell.json new file mode 100644 index 0000000000..2ad7758df7 --- /dev/null +++ b/cspell.json @@ -0,0 +1,140 @@ +{ + "version": "0.1", + "language": "en", + "words": [ + "activiti", + "CSRF", + "glyphicon", + "sharedlinks", + "Redistributable", + "fullscreen", + "sidenav", + "injectable", + "truthy", + "cryptodoc", + "mysites", + "afts", + "classlist", + "folderlink", + "filelink", + "datatable", + "repo", + "snackbar", + "promisify", + "xdescribe", + "unfavorite", + "devtools", + "gitter", + "jira", + "markdownlint", + "uploader", + "nginx", + "docx", + "SOLR", + "unshare", + "validators", + "guid", + "polyfill", + "polyfills", + "jsonp", + "hammerjs", + "pdfjs", + "xpath", + "tooltip", + "tooltips", + "unindent", + "exif", + "cardview", + "webm", + "keycodes", + "adhoc", + "swimlanes", + "datepicker", + "waypoints", + "waypoint", + "hotfix", + "typeahead", + "gridster", + "Collapsable", + "rowspan", + "typeahead", + "tabindex", + "Arial", + "swsdp", + "Datetimepicker", + "mimetype", + "multiselect", + "arrowup", + "arrowdown", + "dialpad", + "backend", + "Unclaim", + "transclusion", + "transcluded", + "auditable", + "taggable", + "datarow", + "datacolumn", + "textitem", + "boolitem", + "mapitem", + "selectitem", + "keyvaluepairsitem", + "boolitem", + "baseitem", + "checkboxes", + "tasklist", + "dateitem", + "webscript", + "minlength", + "doclib", + "fullname", + "firstname", + "lastname", + "userinfo", + "qshare", + "imgpreview", + "AUTHTYPE", + "ECMHOST", + "BPMHOST", + "OAUTHCONFIG", + "CONTEXTROOTBPM", + "CONTEXTROOTECM", + "DISABLECSRF", + "printf", + "mincount", + "listgrid", + "filesize", + "Theming", + "quicktime", + "Promise", + "Examinate", + "highlightable", + "Droppable", + "UPDATEPERMISSIONS", + "Whitespaces", + "keyvaluepairs", + "datetimeitem", + "floatitem", + "intitem", + "DDTHH", + "MLTEXT", + "penta", + "BASESHAREURL", + "hardend", + "filedata" + ], + "dictionaries": [ + "html", + "en-gb", + "en_US", + "softwareTerms" + ], + "ignorePaths": [ + "lib/{content-services,core,extensions,insights,process-services}/**/*.spec.ts", + "lib/{content-services,core,extensions,insights,process-services}/**/*.mock.ts" + ], + "ignoreRegExpList": [ + "(\"|'|`)((?:\\\\1|(?:(?!\\1).))*)\\1" + ] +} diff --git a/demo-shell/e2e/app.e2e-spec.e2e.ts b/demo-shell/e2e/app.e2e-spec.e2e.ts index 52f4fecef6..5d9529c021 100644 --- a/demo-shell/e2e/app.e2e-spec.e2e.ts +++ b/demo-shell/e2e/app.e2e-spec.e2e.ts @@ -15,13 +15,13 @@ * limitations under the License. */ -import { MyappPage } from './app.po'; +import { MyAppPage } from './app.po'; -describe('myapp App', () => { - let page: MyappPage; +describe('MyApp App', () => { + let page: MyAppPage; beforeEach(() => { - page = new MyappPage(); + page = new MyAppPage(); }); it('should display toolbar', () => { diff --git a/demo-shell/e2e/app.po.ts b/demo-shell/e2e/app.po.ts index 8a4cdf2388..ac7d541367 100644 --- a/demo-shell/e2e/app.po.ts +++ b/demo-shell/e2e/app.po.ts @@ -17,7 +17,7 @@ import { browser, element, by } from 'protractor'; -export class MyappPage { +export class MyAppPage { navigateTo() { return browser.get('/'); } diff --git a/demo-shell/src/app/app.routes.ts b/demo-shell/src/app/app.routes.ts index d432c8ef0a..09e8157b3b 100644 --- a/demo-shell/src/app/app.routes.ts +++ b/demo-shell/src/app/app.routes.ts @@ -239,6 +239,7 @@ export const appRoutes: Routes = [ }, // TODO: check if needed { + /* cspell:disable-next-line */ path: 'activiti/tasksnode/:id', component: FormNodeViewerComponent, canActivate: [AuthGuardBpm] diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.html b/demo-shell/src/app/components/app-layout/app-layout.component.html index b0b28fb9b8..2a8f751734 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.html +++ b/demo-shell/src/app/components/app-layout/app-layout.component.html @@ -48,7 +48,7 @@ {{link.icon}}
{{link.title | translate }}
- exit_to_app
Logout
diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.ts b/demo-shell/src/app/components/app-layout/app-layout.component.ts index 8a1047a152..c0869d8e57 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.ts +++ b/demo-shell/src/app/components/app-layout/app-layout.component.ts @@ -55,6 +55,7 @@ export class AppLayoutComponent implements OnInit { { href: '/settings-layout', icon: 'settings', title: 'APP_LAYOUT.SETTINGS' }, { href: '/config-editor', icon: 'code', title: 'APP_LAYOUT.CONFIG-EDITOR' }, { href: '/extendedSearch', icon: 'search', title: 'APP_LAYOUT.SEARCH' }, + /* cspell:disable-next-line */ { href: '/overlay-viewer', icon: 'pageview', title: 'APP_LAYOUT.OVERLAY_VIEWER' }, { href: '/about', icon: 'info_outline', title: 'APP_LAYOUT.ABOUT' } ]; @@ -66,7 +67,7 @@ export class AppLayoutComponent implements OnInit { hideSidenav = false; showMenu = true; - enabelRedirect = true; + enableRedirect = true; color = 'primary'; title = 'APP_LAYOUT.APP_NAME'; logo: string; @@ -78,7 +79,7 @@ export class AppLayoutComponent implements OnInit { const preserveState = this.config.get('sideNav.preserveState'); if (preserveState && expand) { - this.expandedSidenav = (this.userpreference.get('expandedSidenav', expand.toString()) === 'true'); + this.expandedSidenav = (this.userPreferences.get('expandedSidenav', expand.toString()) === 'true'); } else if (expand) { this.expandedSidenav = expand; } @@ -94,18 +95,18 @@ export class AppLayoutComponent implements OnInit { } constructor( - private userpreference: UserPreferencesService, + private userPreferences: UserPreferencesService, private config: AppConfigService, private alfrescoApiService: AlfrescoApiService, private headerService: HeaderDataService) { if (this.alfrescoApiService.getInstance().isOauthConfiguration()) { - this.enabelRedirect = false; + this.enableRedirect = false; } } setState(state) { if (this.config.get('sideNav.preserveState')) { - this.userpreference.set('expandedSidenav', state); + this.userPreferences.set('expandedSidenav', state); } } } diff --git a/demo-shell/src/app/components/card-view/card-view.component.html b/demo-shell/src/app/components/card-view/card-view.component.html index 8e88131013..b503f79984 100644 --- a/demo-shell/src/app/components/card-view/card-view.component.html +++ b/demo-shell/src/app/components/card-view/card-view.component.html @@ -17,7 +17,7 @@

diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index 34f761f0d6..2f4920d902 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -70,7 +70,7 @@ mat-icon-button data-automation-id="document-list-grid-view" title="{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}" - (click)="toogleGalleryView()"> + (click)="toggleGalleryView()"> view_comfy list @@ -155,7 +155,7 @@ ' + template: '' }) class TestComponent { @ContentChildren(LogoutDirective) @@ -160,7 +160,7 @@ describe('LogoutDirective', () => { fixture.detectChanges(); }); - it('should not redirect if enabelRedirect is false', () => { + it('should not redirect if enableRedirect is false', () => { spyOn(router, 'navigate'); spyOn(authService, 'logout').and.returnValue(of(true)); const button = fixture.nativeElement.querySelector('button'); diff --git a/lib/core/directives/logout.directive.ts b/lib/core/directives/logout.directive.ts index b85f21bb17..50875acb94 100644 --- a/lib/core/directives/logout.directive.ts +++ b/lib/core/directives/logout.directive.ts @@ -30,7 +30,7 @@ export class LogoutDirective implements OnInit { /** Enable redirect after logout */ @Input() - enabelRedirect: boolean = true; + enableRedirect: boolean = true; constructor(private elementRef: ElementRef, private renderer: Renderer2, @@ -55,7 +55,7 @@ export class LogoutDirective implements OnInit { } redirectToUri() { - if (this.enabelRedirect) { + if (this.enableRedirect) { this.router.navigate([this.redirectUri]); } } diff --git a/lib/core/directives/node-permission.directive.ts b/lib/core/directives/node-permission.directive.ts index 2b35b1f05d..a6e943cf0c 100644 --- a/lib/core/directives/node-permission.directive.ts +++ b/lib/core/directives/node-permission.directive.ts @@ -58,7 +58,7 @@ export class NodePermissionDirective implements OnChanges { } /** - * Updates disabled state for the decorated elememtn + * Updates disabled state for the decorated element * * @memberof NodePermissionDirective */ diff --git a/lib/core/directives/node-restore.directive.ts b/lib/core/directives/node-restore.directive.ts index 8947524341..ba6ab8da99 100644 --- a/lib/core/directives/node-restore.directive.ts +++ b/lib/core/directives/node-restore.directive.ts @@ -80,10 +80,10 @@ export class NodeRestoreDirective { mergeMap(() => this.getDeletedNodes()) ) .subscribe(deletedNodesList => { - const { entries: nodelist } = deletedNodesList.list; + const { entries: nodeList } = deletedNodesList.list; const { fail: restoreErrorNodes } = this.restoreProcessStatus; const selectedNodes = this.diff(restoreErrorNodes, selection, false); - const remainingNodes = this.diff(selectedNodes, nodelist); + const remainingNodes = this.diff(selectedNodes, nodeList); if (!remainingNodes.length) { this.notification(); diff --git a/lib/core/directives/upload.directive.ts b/lib/core/directives/upload.directive.ts index 38a178856f..d6c37722ab 100644 --- a/lib/core/directives/upload.directive.ts +++ b/lib/core/directives/upload.directive.ts @@ -140,9 +140,9 @@ export class UploadDirective implements OnInit, OnDestroy { this.element.classList.remove(this.cssClassName); this.isDragging = false; - const dataTranfer = this.getDataTransfer(event); - if (dataTranfer) { - this.getFilesDropped(dataTranfer).then(files => { + const dataTransfer = this.getDataTransfer(event); + if (dataTransfer) { + this.getFilesDropped(dataTransfer).then(files => { this.onUploadFiles(files); }); @@ -211,7 +211,7 @@ export class UploadDirective implements OnInit, OnDestroy { })); } else if (item.isDirectory) { iterations.push(new Promise(resolveFolder => { - FileUtils.flattern(item).then(files => resolveFolder(files)); + FileUtils.flatten(item).then(files => resolveFolder(files)); })); } } diff --git a/lib/core/form/components/form.component.spec.ts b/lib/core/form/components/form.component.spec.ts index 52dc0fa664..b29925e386 100644 --- a/lib/core/form/components/form.component.spec.ts +++ b/lib/core/form/components/form.component.spec.ts @@ -762,7 +762,7 @@ describe('FormComponent', () => { expect(formComponent.isOutcomeButtonEnabled(outcome)).toBeTruthy(); }); - it('should disable oucome buttons for invalid form', () => { + it('should disable outcome buttons for invalid form', () => { let formModel = new FormModel(); let field = new FormFieldModel(formModel, { type: 'text', diff --git a/lib/core/form/components/start-form.component.spec.ts b/lib/core/form/components/start-form.component.spec.ts index 87fa2523af..cec7f0a242 100644 --- a/lib/core/form/components/start-form.component.spec.ts +++ b/lib/core/form/components/start-form.component.spec.ts @@ -126,7 +126,7 @@ describe('StartFormComponent', () => { expect(component.outcomesContainer).toBeTruthy(); }); - it('should fetch start form detasils by processDefinitionId ', () => { + it('should fetch start form details by processDefinitionId ', () => { getStartFormSpy.and.returnValue(of(startMockForm)); component.processDefinitionId = exampleId1; component.showOutcomeButtons = true; @@ -136,7 +136,7 @@ describe('StartFormComponent', () => { expect(getStartFormSpy).toHaveBeenCalled(); }); - describe('Disply widgets', () => { + describe('Display widgets', () => { it('should be able to display a textWidget from a process definition', () => { getStartFormSpy.and.returnValue(of(startFormTextDefinitionMock)); @@ -280,7 +280,7 @@ describe('StartFormComponent', () => { }); }); - it('should disply start form with fields ', async(() => { + it('should display start form with fields ', async(() => { getStartFormSpy.and.returnValue(of(startMockForm)); component.processDefinitionId = exampleId1; component.showOutcomeButtons = true; @@ -315,6 +315,7 @@ describe('StartFormComponent', () => { const refreshElement = fixture.debugElement.nativeElement.querySelector('.mat-card-actions>button'); refreshElement.click(); fixture.detectChanges(); + /* cspell:disable-next-line */ const selectElement = fixture.debugElement.nativeElement.querySelector('#claimtype'); const selectLabelElement = fixture.debugElement.nativeElement.querySelector('.adf-dropdown-widget > .adf-label'); expect(refreshElement).toBeDefined(); @@ -323,7 +324,7 @@ describe('StartFormComponent', () => { }); })); - it('should difine custom-tabs ', async(() => { + it('should define custom-tabs ', async(() => { getStartFormSpy.and.returnValue(of(startMockFormWithTab)); component.processDefinitionId = exampleId1; component.showOutcomeButtons = true; @@ -341,7 +342,7 @@ describe('StartFormComponent', () => { }); })); - it('should difine title and [custom-action-buttons]', async(() => { + it('should define title and [custom-action-buttons]', async(() => { getStartFormSpy.and.returnValue(of(startMockFormWithTab)); component.processDefinitionId = exampleId1; component.showOutcomeButtons = true; diff --git a/lib/core/form/components/start-form.component.ts b/lib/core/form/components/start-form.component.ts index 2c190330a9..e04621570f 100644 --- a/lib/core/form/components/start-form.component.ts +++ b/lib/core/form/components/start-form.component.ts @@ -115,7 +115,7 @@ export class StartFormComponent extends FormComponent implements OnChanges, OnIn } loadStartForm(processId: string) { - this.formService.getProcessIntance(processId) + this.formService.getProcessInstance(processId) .subscribe((instance: any) => { this.formService .getStartFormInstance(processId) diff --git a/lib/core/form/components/widgets/content/content.widget.spec.ts b/lib/core/form/components/widgets/content/content.widget.spec.ts index 3794815b63..ca83ce99b9 100644 --- a/lib/core/form/components/widgets/content/content.widget.spec.ts +++ b/lib/core/form/components/widgets/content/content.widget.spec.ts @@ -133,7 +133,7 @@ describe('ContentWidgetComponent', () => { created: 1490354907883, createdBy: { id: 2, - firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com' + firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com' }, relatedContent: false, contentAvailable: true, @@ -176,7 +176,7 @@ describe('ContentWidgetComponent', () => { created: 1490354907883, createdBy: { id: 2, - firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com' + firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com' }, relatedContent: false, contentAvailable: true, @@ -215,7 +215,7 @@ describe('ContentWidgetComponent', () => { created: 1490354907883, createdBy: { id: 2, - firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com' + firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com' }, relatedContent: false, contentAvailable: false, @@ -239,7 +239,7 @@ describe('ContentWidgetComponent', () => { created: 1490354907883, createdBy: { id: 2, - firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com' + firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com' }, relatedContent: false, contentAvailable: true, @@ -273,7 +273,7 @@ describe('ContentWidgetComponent', () => { created: 1490354907883, createdBy: { id: 2, - firstName: 'dasdas', 'lastName': 'dasads', 'email': 'administrator@admin.com' + firstName: 'admin', 'lastName': 'admin', 'email': 'administrator@admin.com' }, relatedContent: false, contentAvailable: true, diff --git a/lib/core/form/components/widgets/core/form-field.model.ts b/lib/core/form/components/widgets/core/form-field.model.ts index 3c33d30ca3..2d71bfc2b3 100644 --- a/lib/core/form/components/widgets/core/form-field.model.ts +++ b/lib/core/form/components/widgets/core/form-field.model.ts @@ -36,7 +36,7 @@ export class FormFieldModel extends FormWidgetModel { private _required: boolean = false; readonly defaultDateFormat: string = 'D-M-YYYY'; - readonly deafultDateTimeFormat: string = 'D-M-YYYY hh:mm A'; + readonly defaultDateTimeFormat: string = 'D-M-YYYY hh:mm A'; // model members fieldType: string; @@ -209,10 +209,10 @@ export class FormFieldModel extends FormWidgetModel { jsonField.params.field) { originalType = jsonField.params.field.type; } - return originalType === FormFieldTypes.DATETIME ? this.deafultDateTimeFormat : this.defaultDateFormat; + return originalType === FormFieldTypes.DATETIME ? this.defaultDateTimeFormat : this.defaultDateFormat; } - private isTypeaHeadFieldType(type: string): boolean { + private isTypeaheadFieldType(type: string): boolean { return type === 'typeahead' ? true : false; } @@ -222,7 +222,7 @@ export class FormFieldModel extends FormWidgetModel { private getProcessVariableValue(field: any, form: FormModel) { let fieldName = field.name; - if (this.isTypeaHeadFieldType(field.type)) { + if (this.isTypeaheadFieldType(field.type)) { fieldName = this.getFieldNameWithLabel(field.id); } return this.findProcessVariableValue(fieldName, form); @@ -400,6 +400,7 @@ export class FormFieldModel extends FormWidgetModel { case FormFieldTypes.DATETIME: const dateTimeValue = moment(this.value, this.dateDisplayFormat, true); if (dateTimeValue && dateTimeValue.isValid()) { + /* cspell:disable-next-line */ this.form.values[this.id] = dateTimeValue.format('YYYY-MM-DDTHH:mm:ssZ'); } else { this.form.values[this.id] = null; diff --git a/lib/core/form/components/widgets/date-time/date-time.widget.ts b/lib/core/form/components/widgets/date-time/date-time.widget.ts index 9d2dc70896..9fc5d2f6c3 100644 --- a/lib/core/form/components/widgets/date-time/date-time.widget.ts +++ b/lib/core/form/components/widgets/date-time/date-time.widget.ts @@ -58,7 +58,7 @@ export class DateTimeWidgetComponent extends WidgetComponent implements OnInit { this.dateAdapter.setLocale(locale); }); let momentDateAdapter = this.dateAdapter; - momentDateAdapter.overrideDisplyaFormat = this.field.dateDisplayFormat; + momentDateAdapter.overrideDisplayFormat = this.field.dateDisplayFormat; if (this.field) { if (this.field.minValue) { diff --git a/lib/core/form/components/widgets/date/date.widget.ts b/lib/core/form/components/widgets/date/date.widget.ts index 0a59a02f51..f1cb4a2f3b 100644 --- a/lib/core/form/components/widgets/date/date.widget.ts +++ b/lib/core/form/components/widgets/date/date.widget.ts @@ -55,7 +55,7 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit { this.dateAdapter.setLocale(locale); }); let momentDateAdapter = this.dateAdapter; - momentDateAdapter.overrideDisplyaFormat = this.field.dateDisplayFormat; + momentDateAdapter.overrideDisplayFormat = this.field.dateDisplayFormat; if (this.field) { if (this.field.minValue) { diff --git a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.spec.ts b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.spec.ts index 6bfeb116b4..37ba73a3a1 100644 --- a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.spec.ts +++ b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.spec.ts @@ -114,7 +114,7 @@ describe('DynamicTableWidgetComponent', () => { expect(widget.content.selectedRow).toBe(row); }); - it('should requre table to select clicked row', () => { + it('should require table to select clicked row', () => { let row = {selected: false}; widget.content = null; widget.onRowClicked(row); diff --git a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts index 9185b78178..81d6af8221 100644 --- a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts +++ b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts @@ -95,8 +95,8 @@ export class DynamicTableWidgetComponent extends WidgetComponent implements OnIn } } - private isEnterOrSpacePressed(keycode) { - return this.selectArrayCode.indexOf(keycode) !== -1; + private isEnterOrSpacePressed(keyCode) { + return this.selectArrayCode.indexOf(keyCode) !== -1; } hasSelection(): boolean { diff --git a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts index 97c3443e36..71614c8570 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts @@ -63,7 +63,7 @@ export class DateEditorComponent implements OnInit { this.dateAdapter.setLocale(locale); }); let momentDateAdapter = this.dateAdapter; - momentDateAdapter.overrideDisplyaFormat = this.DATE_FORMAT; + momentDateAdapter.overrideDisplayFormat = this.DATE_FORMAT; this.value = moment(this.table.getCellValue(this.row, this.column), 'YYYY-MM-DD'); } diff --git a/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts b/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts index 32f1f32b26..a5851fe3a8 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts @@ -68,7 +68,7 @@ export class DateTimeEditorComponent implements OnInit { this.dateAdapter.setLocale(locale); }); let momentDateAdapter = this.dateAdapter; - momentDateAdapter.overrideDisplyaFormat = this.DATE_FORMAT; + momentDateAdapter.overrideDisplayFormat = this.DATE_FORMAT; this.value = moment(this.table.getCellValue(this.row, this.column), this.DATE_FORMAT); } diff --git a/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts b/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts index 107d297586..e2c45208ce 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts @@ -140,7 +140,7 @@ describe('DropdownEditorComponent', () => { expect(component.value).toBe(row.value[column.id]); }); - it('should handle REST error gettig options with task id', () => { + it('should handle REST error getting options with task id', () => { column.optionType = 'rest'; const error = 'error'; diff --git a/lib/core/form/components/widgets/text/text.widget.spec.ts b/lib/core/form/components/widgets/text/text.widget.spec.ts index 9ac1852cde..f62d3f0de0 100644 --- a/lib/core/form/components/widgets/text/text.widget.spec.ts +++ b/lib/core/form/components/widgets/text/text.widget.spec.ts @@ -117,7 +117,7 @@ describe('TextWidgetComponent', () => { params: {inputMask: '##-##0,00%'}, type: FormFieldTypes.TEXT, readOnly: false, - placeholder: 'simple palceholder' + placeholder: 'simple placeholder' }); fixture.detectChanges(); @@ -132,7 +132,7 @@ describe('TextWidgetComponent', () => { it('should show the field placeholder', () => { expect(inputElement).toBeDefined(); expect(inputElement).not.toBeNull(); - expect(inputElement.placeholder).toBe('simple palceholder'); + expect(inputElement.placeholder).toBe('simple placeholder'); }); it('should show the field placeholder when clicked', async(() => { @@ -142,7 +142,7 @@ describe('TextWidgetComponent', () => { fixture.detectChanges(); expect(inputElement).toBeDefined(); expect(inputElement).not.toBeNull(); - expect(inputElement.placeholder).toBe('simple palceholder'); + expect(inputElement.placeholder).toBe('simple placeholder'); }); })); @@ -194,7 +194,7 @@ describe('TextWidgetComponent', () => { }); })); - it('should autofill masked configured value on keyUp event', async(() => { + it('should auto-fill masked configured value on keyUp event', async(() => { expect(element.querySelector('#text-id')).not.toBeNull(); inputElement.value = '12345678'; @@ -263,7 +263,7 @@ describe('TextWidgetComponent', () => { params: {inputMask: '##-##0,00%', inputMaskPlaceholder: 'Phone : (__) ___-___'}, type: FormFieldTypes.TEXT, readOnly: false, - placeholder: 'simple palceholder' + placeholder: 'simple placeholder' }); fixture.detectChanges(); diff --git a/lib/core/form/components/widgets/typeahead/typeahead.widget.spec.ts b/lib/core/form/components/widgets/typeahead/typeahead.widget.spec.ts index 2c3dac084a..cbc4f5d51d 100644 --- a/lib/core/form/components/widgets/typeahead/typeahead.widget.spec.ts +++ b/lib/core/form/components/widgets/typeahead/typeahead.widget.spec.ts @@ -294,13 +294,13 @@ describe('TypeaheadWidgetComponent', () => { })); it('should show typeahead options', async(() => { - let typeahedElement = fixture.debugElement.query(By.css('#typeahead-id')); - let typeahedHTMLElement: HTMLInputElement = typeahedElement.nativeElement; - typeahedHTMLElement.focus(); + let typeaheadElement = fixture.debugElement.query(By.css('#typeahead-id')); + let typeaheadHTMLElement: HTMLInputElement = typeaheadElement.nativeElement; + typeaheadHTMLElement.focus(); typeaheadWidgetComponent.value = 'F'; - typeahedHTMLElement.value = 'F'; - typeahedHTMLElement.dispatchEvent(new Event('keyup')); - typeahedHTMLElement.dispatchEvent(new Event('input')); + typeaheadHTMLElement.value = 'F'; + typeaheadHTMLElement.dispatchEvent(new Event('keyup')); + typeaheadHTMLElement.dispatchEvent(new Event('input')); fixture.detectChanges(); fixture.whenStable().then(() => { fixture.detectChanges(); @@ -311,21 +311,21 @@ describe('TypeaheadWidgetComponent', () => { })); it('should hide the option when the value is empty', async(() => { - let typeahedElement = fixture.debugElement.query(By.css('#typeahead-id')); - let typeahedHTMLElement: HTMLInputElement = typeahedElement.nativeElement; - typeahedHTMLElement.focus(); + let typeaheadElement = fixture.debugElement.query(By.css('#typeahead-id')); + let typeaheadHTMLElement: HTMLInputElement = typeaheadElement.nativeElement; + typeaheadHTMLElement.focus(); typeaheadWidgetComponent.value = 'F'; - typeahedHTMLElement.value = 'F'; - typeahedHTMLElement.dispatchEvent(new Event('keyup')); - typeahedHTMLElement.dispatchEvent(new Event('input')); + typeaheadHTMLElement.value = 'F'; + typeaheadHTMLElement.dispatchEvent(new Event('keyup')); + typeaheadHTMLElement.dispatchEvent(new Event('input')); fixture.detectChanges(); fixture.whenStable().then(() => { fixture.detectChanges(); expect(fixture.debugElement.query(By.css('[id="typeahead-name_option_1"]'))).not.toBeNull(); - typeahedHTMLElement.focus(); + typeaheadHTMLElement.focus(); typeaheadWidgetComponent.value = ''; - typeahedHTMLElement.dispatchEvent(new Event('keyup')); - typeahedHTMLElement.dispatchEvent(new Event('input')); + typeaheadHTMLElement.dispatchEvent(new Event('keyup')); + typeaheadHTMLElement.dispatchEvent(new Event('input')); fixture.detectChanges(); fixture.whenStable().then(() => { fixture.detectChanges(); diff --git a/lib/core/form/components/widgets/upload/upload.widget.spec.ts b/lib/core/form/components/widgets/upload/upload.widget.spec.ts index 8e254bb237..81c5fe32c9 100644 --- a/lib/core/form/components/widgets/upload/upload.widget.spec.ts +++ b/lib/core/form/components/widgets/upload/upload.widget.spec.ts @@ -301,6 +301,7 @@ describe('UploadWidgetComponent', () => { })); it('should show correctly the file name when is formed with French characters', async(() => { + // cspell: disable-next uploadWidgetComponent.field.value.push(fakeCreationFile('Àâæçéèêëïîôœùûüÿ.jpg', 12)); fixture.detectChanges(); @@ -309,11 +310,13 @@ describe('UploadWidgetComponent', () => { fixture.detectChanges(); let jpegElement = element.querySelector('#file-12'); expect(jpegElement).not.toBeNull(); + // cspell: disable-next expect(jpegElement.textContent).toBe('Àâæçéèêëïîôœùûüÿ.jpg'); }); })); it('should show correctly the file name when is formed with Greek characters', async(() => { + // cspell: disable-next uploadWidgetComponent.field.value.push(fakeCreationFile('άέήίϊϊΐόύϋΰώθωερτψυιοπασδφγηςκλζχξωβνμ.jpg', 13)); fixture.detectChanges(); @@ -322,6 +325,7 @@ describe('UploadWidgetComponent', () => { fixture.detectChanges(); let jpegElement = element.querySelector('#file-13'); expect(jpegElement).not.toBeNull(); + // cspell: disable-next expect(jpegElement.textContent).toBe('άέήίϊϊΐόύϋΰώθωερτψυιοπασδφγηςκλζχξωβνμ.jpg'); }); })); @@ -351,6 +355,7 @@ describe('UploadWidgetComponent', () => { })); it('should show correctly the file name when is formed with Swedish characters', async(() => { + // cspell: disable-next uploadWidgetComponent.field.value.push(fakeCreationFile('Äåéö.jpg', 16)); fixture.detectChanges(); @@ -358,6 +363,7 @@ describe('UploadWidgetComponent', () => { fixture.detectChanges(); let jpegElement = element.querySelector('#file-16'); expect(jpegElement).not.toBeNull(); + // cspell: disable-next expect(jpegElement.textContent).toBe('Äåéö.jpg'); }); })); diff --git a/lib/core/form/components/widgets/widget.component.ts b/lib/core/form/components/widgets/widget.component.ts index 5ca948976d..f8ea0311a1 100644 --- a/lib/core/form/components/widgets/widget.component.ts +++ b/lib/core/form/components/widgets/widget.component.ts @@ -70,7 +70,7 @@ export class WidgetComponent implements AfterViewInit { } // Note for developers: - // returns object to be able binding it to the attribute + // returns object to be able binding it to the attribute isRequired(): any { if (this.field && this.field.required) { return true; diff --git a/lib/core/form/services/ecm-model.service.ts b/lib/core/form/services/ecm-model.service.ts index 62b7a9300b..9e79d160e8 100644 --- a/lib/core/form/services/ecm-model.service.ts +++ b/lib/core/form/services/ecm-model.service.ts @@ -110,8 +110,8 @@ export class EcmModelService { typeCreated => { this.logService.info('type Created', typeCreated); this.addPropertyToAType(EcmModelService.MODEL_NAME, formName, form).subscribe( - properyAdded => { - this.logService.info('property Added', properyAdded); + propertyAdded => { + this.logService.info('property Added', propertyAdded); observer.next(typeCreated); observer.complete(); }, diff --git a/lib/core/form/services/form-rendering.service.spec.ts b/lib/core/form/services/form-rendering.service.spec.ts index cf9b385c55..9881e21aa0 100644 --- a/lib/core/form/services/form-rendering.service.spec.ts +++ b/lib/core/form/services/form-rendering.service.spec.ts @@ -49,7 +49,7 @@ describe('FormRenderingService', () => { expect(type).toBe(UploadWidgetComponent); }); - it('should resolve Uknown widget for unknown field type', () => { + it('should resolve Unknown widget for unknown field type', () => { let resolver = service.getComponentTypeResolver('missing-type'); let type = resolver(null); expect(type).toBe(UnknownWidgetComponent); diff --git a/lib/core/form/services/form.service.spec.ts b/lib/core/form/services/form.service.spec.ts index a4e763a5fb..29ed4ee11c 100644 --- a/lib/core/form/services/form.service.spec.ts +++ b/lib/core/form/services/form.service.spec.ts @@ -328,11 +328,11 @@ describe('Form service', () => { }); it('should search for Form with modelType=2', (done) => { - let response = { data: [{ id: 1, name: 'findme' }, { id: 2, name: 'testform' }] }; + let response = { data: [{ id: 1, name: 'findMe' }, { id: 2, name: 'testForm' }] }; - service.searchFrom('findme').subscribe(result => { + service.searchFrom('findMe').subscribe(result => { expect(jasmine.Ajax.requests.mostRecent().url.endsWith('models?modelType=2')).toBeTruthy(); - expect(result.name).toEqual('findme'); + expect(result.name).toEqual('findMe'); expect(result.id).toEqual(1); done(); }); diff --git a/lib/core/form/services/form.service.ts b/lib/core/form/services/form.service.ts index c4cfd26149..e074e92c92 100644 --- a/lib/core/form/services/form.service.ts +++ b/lib/core/form/services/form.service.ts @@ -193,7 +193,7 @@ export class FormService { ) .pipe( map(function (forms: any) { - return forms.data.find(formdata => formdata.name === name); + return forms.data.find(formData => formData.name === name); }), catchError(err => this.handleError(err)) ); @@ -232,7 +232,7 @@ export class FormService { * @param processInstanceId ID of the target process * @returns List of instance variable information */ - getProcessVarablesById(processInstanceId: string): Observable { + getProcessVariablesById(processInstanceId: string): Observable { return from(this.processInstanceVariablesApi.getProcessInstanceVariables(processInstanceId)) .pipe( map(this.toJson), @@ -363,7 +363,7 @@ export class FormService { * @param processId ID of the process to get * @returns Process instance */ - getProcessIntance(processId: string): Observable { + getProcessInstance(processId: string): Observable { return from(this.processApi.getProcessInstance(processId)) .pipe( map(this.toJson), diff --git a/lib/core/form/services/process-content.service.ts b/lib/core/form/services/process-content.service.ts index faccff8221..60fcb84c21 100644 --- a/lib/core/form/services/process-content.service.ts +++ b/lib/core/form/services/process-content.service.ts @@ -149,7 +149,7 @@ export class ProcessContentService { * Associates an uploaded file with a process instance. * @param processInstanceId ID of the target process instance * @param content File to associate - * @param opts Options supported by JSAPI + * @param opts Options supported by JS-API * @returns Details of created content */ createProcessRelatedContent(processInstanceId: string, content: any, opts?: any): Observable { @@ -161,7 +161,7 @@ export class ProcessContentService { * Associates an uploaded file with a task instance. * @param taskId ID of the target task * @param file File to associate - * @param opts Options supported by JSAPI + * @param opts Options supported by JS-API * @returns Details of created content */ createTaskRelatedContent(taskId: string, file: any, opts?: any) { diff --git a/lib/core/form/services/widget-visibility.service.spec.ts b/lib/core/form/services/widget-visibility.service.spec.ts index e98fce8a51..d0a75fb64c 100644 --- a/lib/core/form/services/widget-visibility.service.spec.ts +++ b/lib/core/form/services/widget-visibility.service.spec.ts @@ -185,7 +185,7 @@ describe('WidgetVisibilityService', () => { }); }); - describe('should retrive the process variables', () => { + describe('should retrieve the process variables', () => { let fakeFormWithField = new FormModel(fakeFormJson); let visibilityObjTest: WidgetVisibilityModel; let chainedVisibilityObj = new WidgetVisibilityModel(); @@ -528,7 +528,7 @@ describe('WidgetVisibilityService', () => { }); it('should return undefined for not existing form variable', () => { - let varValue = service.getVariableValue(fakeForm, 'MISTERY_FORM_VARIABLE', null); + let varValue = service.getVariableValue(fakeForm, 'MYSTERY_FORM_VARIABLE', null); expect(varValue).toBeUndefined(); }); diff --git a/lib/core/language-menu/language-menu.component.ts b/lib/core/language-menu/language-menu.component.ts index e5dcf1ce58..ddec40b5cb 100644 --- a/lib/core/language-menu/language-menu.component.ts +++ b/lib/core/language-menu/language-menu.component.ts @@ -35,9 +35,9 @@ export class LanguageMenuComponent implements OnInit { } ngOnInit() { - const languagesCongifApp = this.appConfig.get>(AppConfigValues.APP_CONFIG_LANGUAGES_KEY); - if (languagesCongifApp) { - this.languages = languagesCongifApp; + const languagesConfigApp = this.appConfig.get>(AppConfigValues.APP_CONFIG_LANGUAGES_KEY); + if (languagesConfigApp) { + this.languages = languagesConfigApp; } } diff --git a/lib/core/layout/components/header/header.component.spec.ts b/lib/core/layout/components/header/header.component.spec.ts index 3854d9c998..da7f430883 100644 --- a/lib/core/layout/components/header/header.component.spec.ts +++ b/lib/core/layout/components/header/header.component.spec.ts @@ -143,7 +143,7 @@ describe('HeaderLayoutComponent', () => { }); }); - describe('Template tranclusion', () => { + describe('Template transclusion', () => { @Component({ selector: 'adf-test-layout-header', @@ -159,7 +159,7 @@ describe('HeaderLayoutComponent', () => { .compileComponents(); })); - it('should transclude the provided nodes into the component', () => { + it('should project the provided nodes into the component', () => { const hostFixture = TestBed.createComponent(HeaderLayoutTesterComponent); hostFixture.detectChanges(); const innerText = hostFixture.nativeElement.querySelector('mat-toolbar>p').innerText; diff --git a/lib/core/layout/components/sidenav-layout/sidenav-layout.component.spec.ts b/lib/core/layout/components/sidenav-layout/sidenav-layout.component.spec.ts index 3888b5724b..077f1c6b5a 100644 --- a/lib/core/layout/components/sidenav-layout/sidenav-layout.component.spec.ts +++ b/lib/core/layout/components/sidenav-layout/sidenav-layout.component.spec.ts @@ -214,7 +214,7 @@ describe('SidenavLayoutComponent', () => { fixture.detectChanges(); }); - it('should pass through input paramters', () => { + it('should pass through input parameters', () => { component.sidenavMin = 1; component.sidenavMax = 2; component.hideSidenav = true; @@ -304,7 +304,7 @@ describe('SidenavLayoutComponent', () => { }); }); - it('should be the same as the expandedSidenav\'s value by default', (done) => { + it('should be the same as the expanded Sidenav value by default', (done) => { component.expandedSidenav = false; fixture.detectChanges(); diff --git a/lib/core/login/components/login.component.spec.ts b/lib/core/login/components/login.component.spec.ts index 2dd93bf357..52516f6afe 100644 --- a/lib/core/login/components/login.component.spec.ts +++ b/lib/core/login/components/login.component.spec.ts @@ -102,7 +102,7 @@ describe('LoginComponent', () => { fixture.detectChanges(); } - it('should be autocompelete off', () => { + it('should be autocomplete off', () => { expect(element.querySelector('#adf-login-form').getAttribute('autocomplete')).toBe('off'); }); @@ -493,7 +493,7 @@ describe('LoginComponent', () => { loginWithCredentials('fake-username-CSRF-error', 'fake-password'); })); - it('should return ECOM read-oly error when error occurs', async(() => { + it('should return ECM read-only error when error occurs', async(() => { spyOn(authService, 'login') .and.returnValue( throwError( diff --git a/lib/core/login/components/login.component.ts b/lib/core/login/components/login.component.ts index 048e6fe307..ef7f536835 100644 --- a/lib/core/login/components/login.component.ts +++ b/lib/core/login/components/login.component.ts @@ -229,10 +229,6 @@ export class LoginComponent implements OnInit { } } - /** - * Performe the login service - * @param values - */ private performLogin(values: any) { this.actualLoginStep = LoginSteps.Checking; this.authService diff --git a/lib/core/mock/form/formDefinitionVisibiity.mock.ts b/lib/core/mock/form/formDefinitionVisibility.mock.ts similarity index 100% rename from lib/core/mock/form/formDefinitionVisibiity.mock.ts rename to lib/core/mock/form/formDefinitionVisibility.mock.ts diff --git a/lib/core/mock/form/start-form.component.mock.ts b/lib/core/mock/form/start-form.component.mock.ts index 89830346bb..e8bc9f8e5e 100644 --- a/lib/core/mock/form/start-form.component.mock.ts +++ b/lib/core/mock/form/start-form.component.mock.ts @@ -346,7 +346,7 @@ export let startMockForm = { 1: [ { fieldType: 'FormFieldRepresentation', - id: 'billamount', + id: 'billAmount', name: 'BillAmount', type: 'integer', value: null, @@ -526,7 +526,7 @@ export let startMockForm = { 2: [ { fieldType: 'FormFieldRepresentation', - id: 'hospitalname', + id: 'hospitalName', name: 'HospitalName', type: 'text', value: null, @@ -769,7 +769,7 @@ export let startMockFormWithTab = { 1: [ { fieldType: 'FormFieldRepresentation', - id: 'billamount', + id: 'billAmount', name: 'BillAmount', type: 'integer', value: null, @@ -949,7 +949,7 @@ export let startMockFormWithTab = { 2: [ { fieldType: 'FormFieldRepresentation', - id: 'hospitalname', + id: 'hospitalName', name: 'HospitalName', type: 'text', value: null, diff --git a/lib/core/mock/public-api.ts b/lib/core/mock/public-api.ts index 7d02c6832c..3f9e626ad4 100644 --- a/lib/core/mock/public-api.ts +++ b/lib/core/mock/public-api.ts @@ -32,7 +32,7 @@ export * from './alfresco-api.service.mock'; export * from './form/form.component.mock'; export * from './form/formDefinition.mock'; export * from './form/formDefinitionReadonly.mock'; -export * from './form/formDefinitionVisibiity.mock'; +export * from './form/formDefinitionVisibility.mock'; export * from './form/start-form.component.mock'; export * from './form/form.service.mock'; export * from './form/widget-visibility.service.mock'; diff --git a/lib/core/mock/renditionsService.mock.ts b/lib/core/mock/renditionsService.mock.ts index a340020192..a5c73eebe5 100644 --- a/lib/core/mock/renditionsService.mock.ts +++ b/lib/core/mock/renditionsService.mock.ts @@ -15,67 +15,98 @@ * limitations under the License. */ -export let fakeRedition = { - 'entry': { - 'id': 'pdf', - 'content': {'mimeType': 'application/pdf', 'mimeTypeName': 'Adobe PDF Document'}, - 'status': 'NOT_CREATED' - } -}; - -export let fakeReditionCreated = { - 'entry': { - 'id': 'pdf', - 'content': {'mimeType': 'application/pdf', 'mimeTypeName': 'Adobe PDF Document'}, - 'status': 'CREATED' - } -}; - -export let fakeReditionsList = { - 'list': { - 'pagination': { - 'count': 6, - 'hasMoreItems': false, - 'totalItems': 6, - 'skipCount': 0, - 'maxItems': 100 +export let fakeRendition = { + entry: { + id: 'pdf', + content: { + mimeType: 'application/pdf', + mimeTypeName: 'Adobe PDF Document' }, - 'entries': [{ - 'entry': { - 'id': 'avatar', - 'content': {'mimeType': 'image/png', 'mimeTypeName': 'PNG Image'}, - 'status': 'NOT_CREATED' - } - }, { - 'entry': { - 'id': 'avatar32', - 'content': {'mimeType': 'image/png', 'mimeTypeName': 'PNG Image'}, - 'status': 'NOT_CREATED' - } - }, { - 'entry': { - 'id': 'doclib', - 'content': {'mimeType': 'image/png', 'mimeTypeName': 'PNG Image'}, - 'status': 'NOT_CREATED' - } - }, { - 'entry': { - 'id': 'imgpreview', - 'content': {'mimeType': 'image/jpeg', 'mimeTypeName': 'JPEG Image'}, - 'status': 'NOT_CREATED' - } - }, { - 'entry': { - 'id': 'medium', - 'content': {'mimeType': 'image/jpeg', 'mimeTypeName': 'JPEG Image'}, - 'status': 'NOT_CREATED' - } - }, { - 'entry': { - 'id': 'pdf', - 'content': {'mimeType': 'application/pdf', 'mimeTypeName': 'Adobe PDF Document'}, - 'status': 'NOT_CREATED' - } - }] + status: 'NOT_CREATED' + } +}; + +export let fakeRenditionCreated = { + entry: { + id: 'pdf', + content: { + mimeType: 'application/pdf', + mimeTypeName: 'Adobe PDF Document' + }, + status: 'CREATED' + } +}; + +export let fakeRenditionsList = { + list: { + pagination: { + count: 6, + hasMoreItems: false, + totalItems: 6, + skipCount: 0, + maxItems: 100 + }, + entries: [ + { + entry: { + id: 'avatar', + content: { + mimeType: 'image/png', + mimeTypeName: 'PNG Image' + }, + status: 'NOT_CREATED' + } + }, + { + entry: { + id: 'avatar32', + content: { + mimeType: 'image/png', + mimeTypeName: 'PNG Image' + }, + status: 'NOT_CREATED' + } + }, + { + entry: { + id: 'doclib', + content: { + mimeType: 'image/png', + mimeTypeName: 'PNG Image' + }, + status: 'NOT_CREATED' + } + }, + { + entry: { + id: 'imgpreview', + content: { + mimeType: 'image/jpeg', + mimeTypeName: 'JPEG Image' + }, + status: 'NOT_CREATED' + } + }, + { + entry: { + id: 'medium', + content: { + mimeType: 'image/jpeg', + mimeTypeName: 'JPEG Image' + }, + status: 'NOT_CREATED' + } + }, + { + entry: { + id: 'pdf', + content: { + mimeType: 'application/pdf', + mimeTypeName: 'Adobe PDF Document' + }, + status: 'NOT_CREATED' + } + } + ] } }; diff --git a/lib/core/models/permissions.enum.ts b/lib/core/models/permissions.enum.ts index 68a7095940..1a901806ec 100644 --- a/lib/core/models/permissions.enum.ts +++ b/lib/core/models/permissions.enum.ts @@ -15,6 +15,7 @@ * limitations under the License. */ + /* spellchecker: disable */ export class PermissionsEnum extends String { static DELETE: string = 'delete'; static UPDATE: string = 'update'; diff --git a/lib/core/pipes/text-highlight.pipe.ts b/lib/core/pipes/text-highlight.pipe.ts index 466ebaac0e..22080ab266 100644 --- a/lib/core/pipes/text-highlight.pipe.ts +++ b/lib/core/pipes/text-highlight.pipe.ts @@ -16,7 +16,7 @@ */ import { Pipe, PipeTransform } from '@angular/core'; -import { HighlightTransformService, HightlightTransformResult } from '../services/highlight-transform.service'; +import { HighlightTransformService, HighlightTransformResult } from '../services/highlight-transform.service'; @Pipe({ name: 'highlight' @@ -26,7 +26,7 @@ export class HighlightPipe implements PipeTransform { constructor(private highlightTransformService: HighlightTransformService) { } transform(text: string, search: string): string { - const result: HightlightTransformResult = this.highlightTransformService.highlight(text, search); + const result: HighlightTransformResult = this.highlightTransformService.highlight(text, search); return result.text; } } diff --git a/lib/core/pipes/time-ago.pipe.spec.ts b/lib/core/pipes/time-ago.pipe.spec.ts index 9676488a24..1934da97af 100644 --- a/lib/core/pipes/time-ago.pipe.spec.ts +++ b/lib/core/pipes/time-ago.pipe.spec.ts @@ -46,6 +46,7 @@ describe('TimeAgoPipe', () => { it('should return a localised message', async(() => { let date = new Date(); const transformedDate = pipe.transform(date, 'de'); + /* cspell:disable-next-line */ expect(transformedDate).toBe('vor ein paar Sekunden'); })); }); diff --git a/lib/core/pipes/user-initial.pipe.spec.ts b/lib/core/pipes/user-initial.pipe.spec.ts index adc5f437b9..63c42741f6 100644 --- a/lib/core/pipes/user-initial.pipe.spec.ts +++ b/lib/core/pipes/user-initial.pipe.spec.ts @@ -19,7 +19,7 @@ import { DomSanitizer } from '@angular/platform-browser'; import { UserProcessModel } from '../models/user-process.model'; import { InitialUsernamePipe } from './user-initial.pipe'; -class FakeSanitazer extends DomSanitizer { +class FakeSanitizer extends DomSanitizer { constructor() { super(); @@ -56,7 +56,7 @@ describe('UserInitialPipe', () => { let fakeUser: UserProcessModel; beforeEach(() => { - pipe = new InitialUsernamePipe(new FakeSanitazer()); + pipe = new InitialUsernamePipe(new FakeSanitizer()); fakeUser = new UserProcessModel(); }); @@ -74,7 +74,7 @@ describe('UserInitialPipe', () => { expect(result).toBe('

FF
'); }); - it('should return a single letter into div when lastname is undefined', () => { + it('should return a single letter into div when lastName is undefined', () => { fakeUser.firstName = 'FAKE-NAME'; fakeUser.lastName = undefined; let result = pipe.transform(fakeUser); diff --git a/lib/core/services/authentication.service.spec.ts b/lib/core/services/authentication.service.spec.ts index a598328dc0..016934ac2a 100644 --- a/lib/core/services/authentication.service.spec.ts +++ b/lib/core/services/authentication.service.spec.ts @@ -273,6 +273,7 @@ describe('AuthenticationService', () => { it('[BPM] should return an BPM ticket after the login done', (done) => { let disposableLogin = authService.login('fake-username', 'fake-password').subscribe((response) => { expect(authService.isLoggedIn()).toBe(true); + // cspell: disable-next expect(authService.getTicketBpm()).toEqual('Basic ZmFrZS11c2VybmFtZTpmYWtlLXBhc3N3b3Jk'); expect(authService.isBpmLoggedIn()).toBe(true); disposableLogin.unsubscribe(); @@ -376,6 +377,7 @@ describe('AuthenticationService', () => { let disposableLogin = authService.login('fake-username', 'fake-password').subscribe(() => { expect(authService.isLoggedIn()).toBe(true); expect(authService.getTicketEcm()).toEqual('fake-post-ticket'); + // cspell: disable-next expect(authService.getTicketBpm()).toEqual('Basic ZmFrZS11c2VybmFtZTpmYWtlLXBhc3N3b3Jk'); expect(authService.isBpmLoggedIn()).toBe(true); expect(authService.isEcmLoggedIn()).toBe(true); @@ -401,6 +403,7 @@ describe('AuthenticationService', () => { (err: any) => { expect(authService.isLoggedIn()).toBe(false, 'isLoggedIn'); expect(authService.getTicketEcm()).toBe(undefined, 'getTicketEcm'); + // cspell: disable-next expect(authService.getTicketBpm()).toBe('Basic ZmFrZS11c2VybmFtZTpmYWtlLXBhc3N3b3Jk', 'getTicketBpm'); expect(authService.isEcmLoggedIn()).toBe(false, 'isEcmLoggedIn'); disposableLogin.unsubscribe(); diff --git a/lib/core/services/content.service.ts b/lib/core/services/content.service.ts index 07b03f4020..24bdf7437b 100644 --- a/lib/core/services/content.service.ts +++ b/lib/core/services/content.service.ts @@ -186,7 +186,7 @@ export class ContentService { /** * Gets a Node via its node ID. * @param nodeId ID of the target node - * @param opts Options supported by JSAPI + * @param opts Options supported by JS-API * @returns Details of the folder */ getNode(nodeId: string, opts?: any): Observable { diff --git a/lib/core/services/deleted-nodes-api.service.ts b/lib/core/services/deleted-nodes-api.service.ts index dc407a5c1c..59b5d867b8 100644 --- a/lib/core/services/deleted-nodes-api.service.ts +++ b/lib/core/services/deleted-nodes-api.service.ts @@ -38,7 +38,7 @@ export class DeletedNodesApiService { /** * Gets a list of nodes in the trash. - * @param options Options for JSAPI call + * @param options Options for JS-API call * @returns List of nodes in the trash */ getDeletedNodes(options?: Object): Observable { diff --git a/lib/core/services/favorites-api.service.ts b/lib/core/services/favorites-api.service.ts index 290f6d8e74..3c54da5bb6 100644 --- a/lib/core/services/favorites-api.service.ts +++ b/lib/core/services/favorites-api.service.ts @@ -68,7 +68,7 @@ export class FavoritesApiService { /** * Gets the favorites for a user. * @param personId ID of the user - * @param options Options supported by JSAPI + * @param options Options supported by JS-API * @returns List of favorites */ getFavorites(personId: string, options?: any): Observable { diff --git a/lib/core/services/highlight-transform.service.ts b/lib/core/services/highlight-transform.service.ts index a39ee7cae8..d4a6860ca6 100644 --- a/lib/core/services/highlight-transform.service.ts +++ b/lib/core/services/highlight-transform.service.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; -export interface HightlightTransformResult { +export interface HighlightTransformResult { text: string; changed: boolean; } @@ -34,7 +34,7 @@ export class HighlightTransformService { * @param wrapperClass CSS class used to provide highlighting style * @returns New text along with boolean value to indicate whether anything was highlighted */ - public highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult { + public highlight(text: string, search: string, wrapperClass: string = 'highlight'): HighlightTransformResult { let isMatching = false, result = text; diff --git a/lib/core/services/nodes-api.service.ts b/lib/core/services/nodes-api.service.ts index aeead801a4..54e1d73788 100644 --- a/lib/core/services/nodes-api.service.ts +++ b/lib/core/services/nodes-api.service.ts @@ -42,7 +42,7 @@ export class NodesApiService { /** * Gets the stored information about a node. * @param nodeId ID of the target node - * @param options Optional parameters supported by JSAPI + * @param options Optional parameters supported by JS-API * @returns Node information */ getNode(nodeId: string, options: any = {}): Observable { @@ -62,7 +62,7 @@ export class NodesApiService { /** * Gets the items contained in a folder node. * @param nodeId ID of the target node - * @param options Optional parameters supported by JSAPI + * @param options Optional parameters supported by JS-API * @returns List of child items from the folder */ getNodeChildren(nodeId: string, options: any = {}): Observable { @@ -84,7 +84,7 @@ export class NodesApiService { * Creates a new document node inside a folder. * @param parentNodeId ID of the parent folder node * @param nodeBody Data for the new node - * @param options Optional parameters supported by JSAPI + * @param options Optional parameters supported by JS-API * @returns Details of the new node */ createNode(parentNodeId: string, nodeBody: any, options: any = {}): Observable { @@ -101,7 +101,7 @@ export class NodesApiService { * Creates a new folder node inside a parent folder. * @param parentNodeId ID of the parent folder node * @param nodeBody Data for the new folder - * @param options Optional parameters supported by JSAPI + * @param options Optional parameters supported by JS-API * @returns Details of the new folder */ createFolder(parentNodeId: string, nodeBody: any, options: any = {}): Observable { @@ -113,7 +113,7 @@ export class NodesApiService { * Updates the information about a node. * @param nodeId ID of the target node * @param nodeBody New data for the node - * @param options Optional parameters supported by JSAPI + * @param options Optional parameters supported by JS-API * @returns Updated node information */ updateNode(nodeId: string, nodeBody: any, options: any = {}): Observable { @@ -134,7 +134,7 @@ export class NodesApiService { /** * Moves a node to the trashcan. * @param nodeId ID of the target node - * @param options Optional parameters supported by JSAPI + * @param options Optional parameters supported by JS-API * @returns Empty result that notifies when the deletion is complete */ deleteNode(nodeId: string, options: any = {}): Observable { diff --git a/lib/core/services/page-title.service.spec.ts b/lib/core/services/page-title.service.spec.ts index c9e1e22084..f9f75dd09c 100644 --- a/lib/core/services/page-title.service.spec.ts +++ b/lib/core/services/page-title.service.spec.ts @@ -65,6 +65,7 @@ describe('AppTitle service', () => { }); it('should update title on language change', () => { + // cspell: disable-next spyOn(translationService, 'instant').and.returnValues('hello', 'привет'); pageTitleService.setTitle('key'); @@ -73,10 +74,12 @@ describe('AppTitle service', () => { ( titleService).setTitle.calls.reset(); translationService.translate.onLangChange.next( {}); + // cspell: disable-next expect(titleServiceSpy).toHaveBeenCalledWith('привет - My application'); }); it('should update title on new content download', () => { + // cspell: disable-next spyOn(translationService, 'instant').and.returnValues('hello', 'привет'); pageTitleService.setTitle('key'); @@ -85,6 +88,7 @@ describe('AppTitle service', () => { ( titleService).setTitle.calls.reset(); translationService.translate.onTranslationChange.next( {}); + // cspell: disable-next expect(titleServiceSpy).toHaveBeenCalledWith('привет - My application'); }); }); diff --git a/lib/core/services/renditions.service.spec.ts b/lib/core/services/renditions.service.spec.ts index 1f3b8cd07c..b0dd21f61a 100644 --- a/lib/core/services/renditions.service.spec.ts +++ b/lib/core/services/renditions.service.spec.ts @@ -16,7 +16,7 @@ */ import { TestBed } from '@angular/core/testing'; -import { fakeRedition, fakeReditionCreated, fakeReditionsList } from '../mock/renditionsService.mock'; +import { fakeRendition, fakeRenditionCreated, fakeRenditionsList } from '../mock/renditionsService.mock'; import { RenditionsService } from './renditions.service'; import { setupTestBed } from '../testing/setupTestBed'; import { CoreModule } from '../core.module'; @@ -55,7 +55,7 @@ describe('RenditionsService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ 'status': 200, contentType: 'application/json', - responseText: JSON.stringify(fakeReditionsList) + responseText: JSON.stringify(fakeRenditionsList) }); }); @@ -107,7 +107,7 @@ describe('RenditionsService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ 'status': 200, contentType: 'application/json', - responseText: JSON.stringify(fakeRedition) + responseText: JSON.stringify(fakeRendition) }); }); @@ -132,7 +132,7 @@ describe('RenditionsService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ 'status': 200, contentType: 'application/json', - responseText: JSON.stringify(fakeReditionCreated) + responseText: JSON.stringify(fakeRenditionCreated) }); }); @@ -145,7 +145,7 @@ describe('RenditionsService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ 'status': 200, contentType: 'application/json', - responseText: JSON.stringify(fakeRedition) + responseText: JSON.stringify(fakeRendition) }); }); diff --git a/lib/core/services/shared-links-api.service.ts b/lib/core/services/shared-links-api.service.ts index c5596fa4b3..656431ec4e 100644 --- a/lib/core/services/shared-links-api.service.ts +++ b/lib/core/services/shared-links-api.service.ts @@ -37,7 +37,7 @@ export class SharedLinksApiService { /** * Gets shared links available to the current user. - * @param options Options supported by JSAPI + * @param options Options supported by JS-API * @returns List of shared links */ getSharedLinks(options: any = {}): Observable { @@ -57,7 +57,7 @@ export class SharedLinksApiService { /** * Creates a shared link available to the current user. * @param nodeId ID of the node to link to - * @param options Options supported by JSAPI + * @param options Options supported by JS-API * @returns The shared link just created */ createSharedLinks(nodeId: string, options: any = {}): Observable { diff --git a/lib/core/services/sites.service.ts b/lib/core/services/sites.service.ts index fcd31ccecf..4419350a4a 100644 --- a/lib/core/services/sites.service.ts +++ b/lib/core/services/sites.service.ts @@ -32,7 +32,7 @@ export class SitesService { /** * Gets a list of all sites in the repository. - * @param opts Options supported by JSAPI + * @param opts Options supported by JS-API * @returns List of sites */ getSites(opts: any = {}): Observable { @@ -50,7 +50,7 @@ export class SitesService { /** * Gets the details for a site. * @param siteId ID of the target site - * @param opts Options supported by JSAPI + * @param opts Options supported by JS-API * @returns Information about the site */ getSite(siteId: string, opts?: any): Observable { diff --git a/lib/core/services/thumbnail.service.ts b/lib/core/services/thumbnail.service.ts index 8acd129012..5f59037e9d 100644 --- a/lib/core/services/thumbnail.service.ts +++ b/lib/core/services/thumbnail.service.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +/* spellchecker: disable */ import { Injectable } from '@angular/core'; import { MatIconRegistry } from '@angular/material'; import { DomSanitizer } from '@angular/platform-browser'; diff --git a/lib/core/services/upload.service.spec.ts b/lib/core/services/upload.service.spec.ts index 7d51c2cef1..8c6689f783 100644 --- a/lib/core/services/upload.service.spec.ts +++ b/lib/core/services/upload.service.spec.ts @@ -43,6 +43,7 @@ describe('UploadService', () => { files: { excluded: ['.DS_Store', 'desktop.ini', '.git', '*.git', '*.SWF'], 'match-options': { + /* cspell:disable-next-line */ nocase: true } } @@ -269,15 +270,15 @@ describe('UploadService', () => { let fileFake1 = new FileModel( { name: 'fake-name1', size: 10 }); let fileFake2 = new FileModel( { name: 'fake-name2', size: 10 }); - let filelist = [fileFake1, fileFake2]; - service.addToQueue(...filelist); + let fileList = [fileFake1, fileFake2]; + service.addToQueue(...fileList); service.uploadFilesInTheQueue(emitter); let file = service.getQueue(); service.cancelUpload(...file); }); - it('should remove from the queue all the files in the exluded list', () => { + it('should remove from the queue all the files in the excluded list', () => { const file1 = new FileModel(new File([''], '.git')); const file2 = new FileModel(new File([''], '.DS_Store')); const file3 = new FileModel(new File([''], 'desktop.ini')); diff --git a/lib/core/services/user-preferences.service.spec.ts b/lib/core/services/user-preferences.service.spec.ts index f4f9c49a7b..ec7a90d160 100644 --- a/lib/core/services/user-preferences.service.spec.ts +++ b/lib/core/services/user-preferences.service.spec.ts @@ -126,7 +126,7 @@ describe('UserPreferencesService', () => { expect(preferences.getDefaultLocale()).toBe('fake-locate-browser'); }); - it('should return as default locale the component propery as third ', () => { + it('should return as default locale the component property as third ', () => { spyOn(translate, 'getBrowserLang').and.stub(); expect(preferences.getDefaultLocale()).toBe('en'); }); diff --git a/lib/core/templates/error-content/error-content.component.spec.ts b/lib/core/templates/error-content/error-content.component.spec.ts index 830e6b7686..c3b0a4fe96 100644 --- a/lib/core/templates/error-content/error-content.component.spec.ts +++ b/lib/core/templates/error-content/error-content.component.spec.ts @@ -111,7 +111,7 @@ describe('ErrorContentComponent', () => { }); })); - it('shoul the default value of return burron be /', async(() => { + it('should the default value of return button be /', async(() => { fixture.detectChanges(); fixture.whenStable().then(() => { expect(errorContentComponent.returnButtonUrl).toBe('/'); diff --git a/lib/core/userinfo/components/user-info.component.spec.ts b/lib/core/userinfo/components/user-info.component.spec.ts index 17f01f150b..c168466d4b 100644 --- a/lib/core/userinfo/components/user-info.component.spec.ts +++ b/lib/core/userinfo/components/user-info.component.spec.ts @@ -29,7 +29,7 @@ import { of } from 'rxjs'; import { setupTestBed } from '../../testing/setupTestBed'; import { CoreTestingModule } from '../../testing/core.testing.module'; -class FakeSanitazer extends DomSanitizer { +class FakeSanitizer extends DomSanitizer { constructor() { super(); @@ -265,7 +265,7 @@ describe('User info component', () => { it('should display the current user Initials if the user dose not have avatarId', async(() => { fixture.whenStable().then(() => { fixture.detectChanges(); - let pipe = new InitialUsernamePipe(new FakeSanitazer()); + let pipe = new InitialUsernamePipe(new FakeSanitizer()); expect(component.ecmUser.avatarId).toBeNull(); expect(pipe.transform({ id: 13, diff --git a/lib/core/utils/file-utils.ts b/lib/core/utils/file-utils.ts index 4aebfb06ad..7b4176f272 100644 --- a/lib/core/utils/file-utils.ts +++ b/lib/core/utils/file-utils.ts @@ -23,7 +23,7 @@ export interface FileInfo { export class FileUtils { - static flattern(folder: any): Promise { + static flatten(folder: any): Promise { let reader = folder.createReader(); let files: FileInfo[] = []; return new Promise(resolve => { @@ -46,7 +46,7 @@ export class FileUtils { }); }); } else { - return FileUtils.flattern(entry).then(result => { + return FileUtils.flatten(entry).then(result => { files.push(...result); }); } diff --git a/lib/core/utils/momentDateAdapter.ts b/lib/core/utils/momentDateAdapter.ts index c0208186d8..82fe862b63 100644 --- a/lib/core/utils/momentDateAdapter.ts +++ b/lib/core/utils/momentDateAdapter.ts @@ -23,7 +23,7 @@ export class MomentDateAdapter extends DateAdapter { private localeData: any = moment.localeData(); - overrideDisplyaFormat: string; + overrideDisplayFormat: string; getYear(date: Moment): number { return date.year(); @@ -109,7 +109,7 @@ export class MomentDateAdapter extends DateAdapter { let m = moment(value, parseFormat, locale, true); if (!m.isValid()) { // use strict parsing because Moment's parser is very forgiving, and this can lead to undesired behavior. - m = moment(value, this.overrideDisplyaFormat, locale, true); + m = moment(value, this.overrideDisplayFormat, locale, true); } if (m.isValid()) { // if user omits year, it defaults to 2001, so check for that issue. @@ -131,7 +131,7 @@ export class MomentDateAdapter extends DateAdapter { format(date: Moment, displayFormat: any): string { date = this.clone(date); - displayFormat = this.overrideDisplyaFormat ? this.overrideDisplyaFormat : displayFormat; + displayFormat = this.overrideDisplayFormat ? this.overrideDisplayFormat : displayFormat; if (date && date.format) { return date.format(displayFormat); diff --git a/lib/core/utils/object-utils.spec.ts b/lib/core/utils/object-utils.spec.ts index f65eab54b5..4d114e7ccc 100644 --- a/lib/core/utils/object-utils.spec.ts +++ b/lib/core/utils/object-utils.spec.ts @@ -106,7 +106,7 @@ describe('ObjectUtils', () => { }); }); - it('shoud overwrite only single property in the object', () => { + it('should overwrite only single property in the object', () => { const obj1 = { child: { prop1: 1, diff --git a/lib/core/viewer/components/pdfViewer-thumbnails.component.spec.ts b/lib/core/viewer/components/pdfViewer-thumbnails.component.spec.ts index 504d5abc31..5e5f73041b 100644 --- a/lib/core/viewer/components/pdfViewer-thumbnails.component.spec.ts +++ b/lib/core/viewer/components/pdfViewer-thumbnails.component.spec.ts @@ -40,6 +40,7 @@ describe('PdfThumbListComponent', () => { _currentPageNumber: null, set currentPageNumber(pageNum) { this._currentPageNumber = pageNum; + /* cspell:disable-next-line */ this.eventBus.dispatch('pagechange', { pageNumber: pageNum }); }, get currentPageNumber() { @@ -123,6 +124,7 @@ describe('PdfThumbListComponent', () => { expect(renderedIds).toContain(12); + /* cspell:disable-next-line */ viewerMock.eventBus.dispatch('pagechange', { pageNumber: 12 }); const newRenderedIds = component.renderItems.map(item => item.id); diff --git a/lib/core/viewer/components/pdfViewer-thumbnails.component.ts b/lib/core/viewer/components/pdfViewer-thumbnails.component.ts index 543802bbb9..bac88ccde1 100644 --- a/lib/core/viewer/components/pdfViewer-thumbnails.component.ts +++ b/lib/core/viewer/components/pdfViewer-thumbnails.component.ts @@ -54,6 +54,7 @@ export class PdfThumbListComponent implements OnInit, AfterViewInit, OnDestroy { } ngOnInit() { + /* cspell:disable-next-line */ this.pdfViewer.eventBus.on('pagechange', this.onPageChange); this.element.nativeElement.addEventListener('scroll', this.calculateItems, true); @@ -69,6 +70,7 @@ export class PdfThumbListComponent implements OnInit, AfterViewInit, OnDestroy { ngOnDestroy() { this.element.nativeElement.removeEventListener('scroll', this.calculateItems, true); + /* cspell:disable-next-line */ this.pdfViewer.eventBus.off('pagechange', this.onPageChange); } diff --git a/lib/core/viewer/components/pdfViewer.component.spec.ts b/lib/core/viewer/components/pdfViewer.component.spec.ts index 366f22e23b..75e2c14a4d 100644 --- a/lib/core/viewer/components/pdfViewer.component.spec.ts +++ b/lib/core/viewer/components/pdfViewer.component.spec.ts @@ -163,7 +163,7 @@ describe('Test PdfViewer component', () => { }); describe('Required values', () => { - it('should thrown an error If urlfile is not present', () => { + it('should thrown an error If urlFile is not present', () => { change = new SimpleChange(null, null, true); expect(() => { @@ -223,6 +223,7 @@ describe('Test PdfViewer component', () => { fixtureUrlTestComponent.detectChanges(); fixtureUrlTestComponent.whenStable().then(() => { + /* cspell:disable-next-line */ expect(elementUrlTestComponent.querySelector('.viewer-pagenumber-input')).toBeDefined(); expect(elementUrlTestComponent.querySelector('.viewer-total-pages')).toBeDefined(); @@ -292,6 +293,7 @@ describe('Test PdfViewer component', () => { fixtureBlobTestComponent.detectChanges(); fixtureBlobTestComponent.whenStable().then(() => { + /* cspell:disable-next-line */ expect(elementBlobTestComponent.querySelector('.viewer-pagenumber-input')).toBeDefined(); expect(elementBlobTestComponent.querySelector('.viewer-total-pages')).toBeDefined(); @@ -486,7 +488,7 @@ describe('Test PdfViewer component', () => { describe('Viewer events', () => { - it('should react on the emit of pagechange event', (done) => { + it('should react on the emit of pageChange event', (done) => { fixtureUrlTestComponent.detectChanges(); fixtureUrlTestComponent.whenStable().then(() => { const args = { @@ -496,6 +498,7 @@ describe('Test PdfViewer component', () => { } }; + /* cspell:disable-next-line */ componentUrlTestComponent.pdfViewerComponent.pdfViewer.eventBus.dispatch('pagechange', args); fixtureUrlTestComponent.detectChanges(); @@ -507,7 +510,7 @@ describe('Test PdfViewer component', () => { }); }, 5000); - it('should react on the emit of pagesloaded event', (done) => { + it('should react on the emit of pagesLoaded event', (done) => { fixtureUrlTestComponent.detectChanges(); fixtureUrlTestComponent.whenStable().then(() => { expect(componentUrlTestComponent.pdfViewerComponent.isPanelDisabled).toBeFalsy(); @@ -519,6 +522,7 @@ describe('Test PdfViewer component', () => { } }; + /* cspell:disable-next-line */ componentUrlTestComponent.pdfViewerComponent.pdfViewer.eventBus.dispatch('pagesloaded', args); fixtureUrlTestComponent.detectChanges(); diff --git a/lib/core/viewer/components/pdfViewer.component.ts b/lib/core/viewer/components/pdfViewer.component.ts index a4ad90feaf..a2230ea260 100644 --- a/lib/core/viewer/components/pdfViewer.component.ts +++ b/lib/core/viewer/components/pdfViewer.component.ts @@ -102,7 +102,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { // needed to preserve "this" context this.onPageChange = this.onPageChange.bind(this); this.onPagesLoaded = this.onPagesLoaded.bind(this); - this.onPagerendered = this.onPagerendered.bind(this); + this.onPageRendered = this.onPageRendered.bind(this); } ngOnChanges(changes) { @@ -165,9 +165,12 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { if (viewer && container) { this.documentContainer = container; + // cspell: disable-next this.documentContainer.addEventListener('pagechange', this.onPageChange, true); + // cspell: disable-next this.documentContainer.addEventListener('pagesloaded', this.onPagesLoaded, true); - this.documentContainer.addEventListener('textlayerrendered', this.onPagerendered, true); + // cspell: disable-next + this.documentContainer.addEventListener('textlayerrendered', this.onPageRendered, true); this.pdfViewer = new pdfjsViewer.PDFViewer({ container: this.documentContainer, @@ -183,9 +186,12 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { ngOnDestroy() { if (this.documentContainer) { + // cspell: disable-next this.documentContainer.removeEventListener('pagechange', this.onPageChange, true); + // cspell: disable-next this.documentContainer.removeEventListener('pagesloaded', this.onPagesLoaded, true); - this.documentContainer.removeEventListener('textlayerrendered', this.onPagerendered, true); + // cspell: disable-next + this.documentContainer.removeEventListener('textlayerrendered', this.onPageRendered, true); } if (this.loadingTask) { @@ -421,7 +427,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { /** * Page Rendered Event */ - onPagerendered() { + onPageRendered() { this.rendered.emit(); } @@ -435,7 +441,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { } /** - * Litener Keyboard Event + * Keyboard Event Listener * @param KeyboardEvent event */ @HostListener('document:keydown', ['$event']) diff --git a/lib/core/viewer/components/txtViewer.component.spec.ts b/lib/core/viewer/components/txtViewer.component.spec.ts index ab47563885..dcee11203d 100644 --- a/lib/core/viewer/components/txtViewer.component.spec.ts +++ b/lib/core/viewer/components/txtViewer.component.spec.ts @@ -42,7 +42,7 @@ describe('Text View component', () => { describe('View', () => { - it('Should text container be present with urlfile', (done) => { + it('Should text container be present with urlFile', (done) => { fixture.detectChanges(); let urlFile = './fake-test-file.txt'; let change = new SimpleChange(null, urlFile, true); diff --git a/lib/core/viewer/components/viewer.component.spec.ts b/lib/core/viewer/components/viewer.component.spec.ts index 368405820f..c09d1b0442 100644 --- a/lib/core/viewer/components/viewer.component.spec.ts +++ b/lib/core/viewer/components/viewer.component.spec.ts @@ -142,7 +142,7 @@ describe('ViewerComponent', () => { { provide: RenditionsService, useValue: { getRendition: () => { - return throwError('throwed'); + return throwError('thrown'); } } }, diff --git a/lib/insights/analytics-process/analytics-process.module.ts b/lib/insights/analytics-process/analytics-process.module.ts index fd3cd9bff2..df00e25516 100644 --- a/lib/insights/analytics-process/analytics-process.module.ts +++ b/lib/insights/analytics-process/analytics-process.module.ts @@ -30,11 +30,11 @@ import { AnalyticsReportListComponent } from './components/analytics-report-list import { AnalyticsReportParametersComponent } from './components/analytics-report-parameters.component'; import { AnalyticsComponent } from './components/analytics.component'; -import { CheckboxWidgetAanalyticsComponent } from './components/widgets/checkbox/checkbox.widget'; +import { CheckboxWidgetAnalyticsComponent } from './components/widgets/checkbox/checkbox.widget'; import { DateRangeWidgetComponent } from './components/widgets/date-range/date-range.widget'; -import { DropdownWidgetAanalyticsComponent } from './components/widgets/dropdown/dropdown.widget'; +import { DropdownWidgetAnalyticsComponent } from './components/widgets/dropdown/dropdown.widget'; import { DurationWidgetComponent } from './components/widgets/duration/duration.widget'; -import { NumberWidgetAanlyticsComponent } from './components/widgets/number/number.widget'; +import { NumberWidgetAnalyticsComponent } from './components/widgets/number/number.widget'; import { FlexLayoutModule } from '@angular/flex-layout'; @@ -55,10 +55,10 @@ import { FlexLayoutModule } from '@angular/flex-layout'; AnalyticsReportParametersComponent, AnalyticsGeneratorComponent, AnalyticsReportHeatMapComponent, - DropdownWidgetAanalyticsComponent, - NumberWidgetAanlyticsComponent, + DropdownWidgetAnalyticsComponent, + NumberWidgetAnalyticsComponent, DurationWidgetComponent, - CheckboxWidgetAanalyticsComponent, + CheckboxWidgetAnalyticsComponent, DateRangeWidgetComponent ], exports: [ @@ -67,10 +67,10 @@ import { FlexLayoutModule } from '@angular/flex-layout'; AnalyticsReportParametersComponent, AnalyticsGeneratorComponent, AnalyticsReportHeatMapComponent, - DropdownWidgetAanalyticsComponent, - NumberWidgetAanlyticsComponent, + DropdownWidgetAnalyticsComponent, + NumberWidgetAnalyticsComponent, DurationWidgetComponent, - CheckboxWidgetAanalyticsComponent, + CheckboxWidgetAnalyticsComponent, DateRangeWidgetComponent ] }) diff --git a/lib/insights/analytics-process/components/analytics-generator.component.spec.ts b/lib/insights/analytics-process/components/analytics-generator.component.spec.ts index e2f4e889aa..77493e743b 100644 --- a/lib/insights/analytics-process/components/analytics-generator.component.spec.ts +++ b/lib/insights/analytics-process/components/analytics-generator.component.spec.ts @@ -90,7 +90,7 @@ describe('AnalyticsGeneratorComponent', () => { }); }); - it('Should render the Process definition overview report when onchanges is called ', (done) => { + it('Should render the Process definition overview report when [onChanges] is called ', (done) => { component.success.subscribe((res) => { expect(res).toBeDefined(); expect(res.length).toEqual(3); diff --git a/lib/insights/analytics-process/components/analytics-report-heat-map.component.spec.ts b/lib/insights/analytics-process/components/analytics-report-heat-map.component.spec.ts index 675124a695..6fc9c0a2c9 100644 --- a/lib/insights/analytics-process/components/analytics-report-heat-map.component.spec.ts +++ b/lib/insights/analytics-process/components/analytics-report-heat-map.component.spec.ts @@ -28,8 +28,8 @@ describe('AnalyticsReportHeatMapComponent', () => { let fixture: ComponentFixture; let element: HTMLElement; - let totalCountPerc: any = { 'sid-fake-id': 0, 'fake-start-event': 100 }; - let totalTimePerc: any = { 'sid-fake-id': 10, 'fake-start-event': 30 }; + let totalCountPercent: any = { 'sid-fake-id': 0, 'fake-start-event': 100 }; + let totalTimePercent: any = { 'sid-fake-id': 10, 'fake-start-event': 30 }; let avgTimePercentages: any = { 'sid-fake-id': 5, 'fake-start-event': 50 }; let totalCountValues: any = { 'sid-fake-id': 2, 'fake-start-event': 3 }; @@ -46,9 +46,9 @@ describe('AnalyticsReportHeatMapComponent', () => { element = fixture.nativeElement; component.report = { - totalCountsPercentages: totalCountPerc, + totalCountsPercentages: totalCountPercent, totalCountValues: totalCountValues, - totalTimePercentages: totalTimePerc, + totalTimePercentages: totalTimePercent, totalTimeValues: totalTimeValues, avgTimeValues: avgTimeValues, avgTimePercentages: avgTimePercentages @@ -90,21 +90,21 @@ describe('AnalyticsReportHeatMapComponent', () => { expect(component.hasMetric()).toBeTruthy(); })); - it('should change the currentmetric width totalCount', async(() => { + it('should change the currentMetric width totalCount', async(() => { let field = { value: 'totalCount' }; component.onMetricChanges(field); expect(component.currentMetric).toEqual(totalCountValues); - expect(component.currentMetricColors).toEqual(totalCountPerc); + expect(component.currentMetricColors).toEqual(totalCountPercent); })); - it('should change the currentmetric width totalTime', async(() => { + it('should change the currentMetric width totalTime', async(() => { let field = { value: 'totalTime' }; component.onMetricChanges(field); expect(component.currentMetric).toEqual(totalTimeValues); - expect(component.currentMetricColors).toEqual(totalTimePerc); + expect(component.currentMetricColors).toEqual(totalTimePercent); })); - it('should change the currentmetric width avgTime', async(() => { + it('should change the currentMetric width avgTime', async(() => { let field = { value: 'avgTime' }; component.onMetricChanges(field); expect(component.currentMetric).toEqual(avgTimeValues); diff --git a/lib/insights/analytics-process/components/analytics.component.html b/lib/insights/analytics-process/components/analytics.component.html index bcc03e7881..45bccabf65 100644 --- a/lib/insights/analytics-process/components/analytics.component.html +++ b/lib/insights/analytics-process/components/analytics.component.html @@ -10,6 +10,6 @@ + #analyticsGenerator> diff --git a/lib/insights/analytics-process/components/analytics.component.ts b/lib/insights/analytics-process/components/analytics.component.ts index c05aaeae28..a18373d287 100644 --- a/lib/insights/analytics-process/components/analytics.component.ts +++ b/lib/insights/analytics-process/components/analytics.component.ts @@ -45,21 +45,21 @@ export class AnalyticsComponent implements OnChanges { @Output() reportDeleted = new EventEmitter(); - @ViewChild('analyticsgenerator') - analyticsgenerator: AnalyticsGeneratorComponent; + @ViewChild('analyticsGenerator') + analyticsGenerator: AnalyticsGeneratorComponent; reportParamQuery: ReportQuery; ngOnChanges(changes: SimpleChanges) { - this.analyticsgenerator.reset(); + this.analyticsGenerator.reset(); } public showReport($event) { - this.analyticsgenerator.generateReport(this.reportId, $event); + this.analyticsGenerator.generateReport(this.reportId, $event); } public reset() { - this.analyticsgenerator.reset(); + this.analyticsGenerator.reset(); } public onEditReport(name: string) { diff --git a/lib/insights/analytics-process/components/widgets/checkbox/checkbox.widget.ts b/lib/insights/analytics-process/components/widgets/checkbox/checkbox.widget.ts index d41b2a5b62..1931374945 100644 --- a/lib/insights/analytics-process/components/widgets/checkbox/checkbox.widget.ts +++ b/lib/insights/analytics-process/components/widgets/checkbox/checkbox.widget.ts @@ -26,7 +26,7 @@ templateUrl: './checkbox.widget.html', encapsulation: ViewEncapsulation.None }) -export class CheckboxWidgetAanalyticsComponent extends WidgetComponent { +export class CheckboxWidgetAnalyticsComponent extends WidgetComponent { @Input() field: any; diff --git a/lib/insights/analytics-process/components/widgets/date-range/date-range.widget.ts b/lib/insights/analytics-process/components/widgets/date-range/date-range.widget.ts index 83b17f1fff..acd713cdb4 100644 --- a/lib/insights/analytics-process/components/widgets/date-range/date-range.widget.ts +++ b/lib/insights/analytics-process/components/widgets/date-range/date-range.widget.ts @@ -62,7 +62,7 @@ export class DateRangeWidgetComponent implements OnInit { this.dateAdapter.setLocale(locale); }); let momentDateAdapter = this.dateAdapter; - momentDateAdapter.overrideDisplyaFormat = this.SHOW_FORMAT; + momentDateAdapter.overrideDisplayFormat = this.SHOW_FORMAT; if (this.field) { if (this.field.value && this.field.value.startDate) { diff --git a/lib/insights/analytics-process/components/widgets/dropdown/dropdown.widget.ts b/lib/insights/analytics-process/components/widgets/dropdown/dropdown.widget.ts index 3b22d15b9e..c3fe65af67 100644 --- a/lib/insights/analytics-process/components/widgets/dropdown/dropdown.widget.ts +++ b/lib/insights/analytics-process/components/widgets/dropdown/dropdown.widget.ts @@ -27,7 +27,7 @@ import { WidgetComponent } from './../widget.component'; styleUrls: ['./dropdown.widget.scss'], encapsulation: ViewEncapsulation.None }) -export class DropdownWidgetAanalyticsComponent extends WidgetComponent implements OnInit { +export class DropdownWidgetAnalyticsComponent extends WidgetComponent implements OnInit { @Input() field: any; diff --git a/lib/insights/analytics-process/components/widgets/duration/duration.widget.ts b/lib/insights/analytics-process/components/widgets/duration/duration.widget.ts index 6f45fe3485..c9b7927ac1 100644 --- a/lib/insights/analytics-process/components/widgets/duration/duration.widget.ts +++ b/lib/insights/analytics-process/components/widgets/duration/duration.widget.ts @@ -21,7 +21,7 @@ import { Component, ElementRef, Input, OnInit, ViewEncapsulation } from '@angula import { FormControl, FormGroup, Validators } from '@angular/forms'; import { ParameterValueModel } from '../../../../diagram/models/report/parameterValue.model'; import { ReportParameterDetailsModel } from '../../../../diagram/models/report/reportParameterDetails.model'; -import { NumberWidgetAanlyticsComponent } from './../number/number.widget'; +import { NumberWidgetAnalyticsComponent } from './../number/number.widget'; @Component({ selector: 'duration-widget', @@ -29,7 +29,7 @@ import { NumberWidgetAanlyticsComponent } from './../number/number.widget'; styleUrls: ['./duration.widget.scss'], encapsulation: ViewEncapsulation.None }) -export class DurationWidgetComponent extends NumberWidgetAanlyticsComponent implements OnInit { +export class DurationWidgetComponent extends NumberWidgetAnalyticsComponent implements OnInit { @Input() field: any; diff --git a/lib/insights/analytics-process/components/widgets/number/number.widget.ts b/lib/insights/analytics-process/components/widgets/number/number.widget.ts index dc05a57f76..5df45f708e 100644 --- a/lib/insights/analytics-process/components/widgets/number/number.widget.ts +++ b/lib/insights/analytics-process/components/widgets/number/number.widget.ts @@ -27,7 +27,7 @@ import { WidgetComponent } from './../widget.component'; styleUrls: ['./number.widget.scss'], encapsulation: ViewEncapsulation.None }) -export class NumberWidgetAanlyticsComponent extends WidgetComponent implements OnInit { +export class NumberWidgetAnalyticsComponent extends WidgetComponent implements OnInit { @Input() field: any; diff --git a/lib/insights/diagram/components/diagram.component.activities.spec.ts b/lib/insights/diagram/components/diagram.component.activities.spec.ts index a373445c89..32491c15cc 100644 --- a/lib/insights/diagram/components/diagram.component.activities.spec.ts +++ b/lib/insights/diagram/components/diagram.component.activities.spec.ts @@ -44,6 +44,7 @@ describe('Diagrams activities', () => { beforeEach(() => { jasmine.Ajax.install(); component.processInstanceId = '38399'; + // cspell: disable-next component.processDefinitionId = 'fakeprocess:24:38399'; component.metricPercentages = { startEvent: 0 }; }); diff --git a/lib/insights/diagram/components/diagram.component.gateways.spec.ts b/lib/insights/diagram/components/diagram.component.gateways.spec.ts index 2d6e70a7a5..93355ed08d 100644 --- a/lib/insights/diagram/components/diagram.component.gateways.spec.ts +++ b/lib/insights/diagram/components/diagram.component.gateways.spec.ts @@ -81,7 +81,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.exclusiveGatway] }; + let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] }; ajaxReply(resp); })); @@ -102,7 +102,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.inclusiveGatway] }; + let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] }; ajaxReply(resp); })); @@ -123,7 +123,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.parallelGatway] }; + let resp = { elements: [diagramsGatewaysMock.parallelGateway] }; ajaxReply(resp); })); @@ -154,7 +154,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.eventGatway] }; + let resp = { elements: [diagramsGatewaysMock.eventGateway] }; ajaxReply(resp); })); }); @@ -178,7 +178,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.exclusiveGatway] }; + let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] }; ajaxReply(resp); })); @@ -199,7 +199,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.exclusiveGatwayActive] }; + let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayActive] }; ajaxReply(resp); })); @@ -220,7 +220,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.exclusiveGatwayCompleted] }; + let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayCompleted] }; ajaxReply(resp); })); @@ -241,7 +241,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.inclusiveGatway] }; + let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] }; ajaxReply(resp); })); @@ -262,7 +262,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.inclusiveGatwayActive] }; + let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayActive] }; ajaxReply(resp); })); @@ -283,7 +283,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.inclusiveGatwayCompleted] }; + let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayCompleted] }; ajaxReply(resp); })); @@ -304,7 +304,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.parallelGatway] }; + let resp = { elements: [diagramsGatewaysMock.parallelGateway] }; ajaxReply(resp); })); @@ -325,7 +325,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.parallelGatwayActive] }; + let resp = { elements: [diagramsGatewaysMock.parallelGatewayActive] }; ajaxReply(resp); })); @@ -346,7 +346,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.parallelGatwayCompleted] }; + let resp = { elements: [diagramsGatewaysMock.parallelGatewayCompleted] }; ajaxReply(resp); })); @@ -377,7 +377,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.eventGatway] }; + let resp = { elements: [diagramsGatewaysMock.eventGateway] }; ajaxReply(resp); })); @@ -408,7 +408,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.eventGatwayActive] }; + let resp = { elements: [diagramsGatewaysMock.eventGatewayActive] }; ajaxReply(resp); })); @@ -439,7 +439,7 @@ describe('Diagrams gateways', () => { }); }); component.ngOnChanges(); - let resp = { elements: [diagramsGatewaysMock.eventGatwayCompleted] }; + let resp = { elements: [diagramsGatewaysMock.eventGatewayCompleted] }; ajaxReply(resp); })); }); diff --git a/lib/insights/diagram/components/diagram.component.swim.spec.ts b/lib/insights/diagram/components/diagram.component.swim.spec.ts index c4fbfc6f60..b27038ff47 100644 --- a/lib/insights/diagram/components/diagram.component.swim.spec.ts +++ b/lib/insights/diagram/components/diagram.component.swim.spec.ts @@ -95,7 +95,7 @@ describe('Diagrams swim', () => { let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text'); expect(shapeText).not.toBeNull(); - expect(shapeText.attributes[2].value).toEqual('Beckend'); + expect(shapeText.attributes[2].value).toEqual('Backend'); }); }); component.ngOnChanges(); @@ -137,7 +137,7 @@ describe('Diagrams swim', () => { let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text'); expect(shapeText).not.toBeNull(); - expect(shapeText.attributes[2].value).toEqual('Beckend'); + expect(shapeText.attributes[2].value).toEqual('Backend'); }); }); component.ngOnChanges(); diff --git a/lib/insights/diagram/components/raphael/raphael-flow-arrow.component.ts b/lib/insights/diagram/components/raphael/raphael-flow-arrow.component.ts index fb6271f655..2d8b5e47ee 100644 --- a/lib/insights/diagram/components/raphael/raphael-flow-arrow.component.ts +++ b/lib/insights/diagram/components/raphael/raphael-flow-arrow.component.ts @@ -34,7 +34,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit { error = new EventEmitter(); ARROW_WIDTH = 4; - SEQUENCEFLOW_STROKE = 1.5; + SEQUENCE_FLOW_STROKE = 1.5; constructor(public elementRef: ElementRef, raphaelService: RaphaelService) { @@ -52,9 +52,9 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit { } public drawLine(flow: any) { - let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCEFLOW_STROKE, this.paper); + let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCE_FLOW_STROKE, this.paper); polyline.element = this.paper.path(polyline.path); - polyline.element.attr({'stroke-width': this.SEQUENCEFLOW_STROKE}); + polyline.element.attr({'stroke-width': this.SEQUENCE_FLOW_STROKE}); polyline.element.attr({'stroke': '#585858'}); polyline.element.node.id = this.flow.id; @@ -75,7 +75,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit { arrowHead.attr('fill', '#585858'); - arrowHead.attr('stroke-width', this.SEQUENCEFLOW_STROKE); + arrowHead.attr('stroke-width', this.SEQUENCE_FLOW_STROKE); arrowHead.attr('stroke', '#585858'); } diff --git a/lib/insights/diagram/components/raphael/raphael-multiline-text.component.ts b/lib/insights/diagram/components/raphael/raphael-multiline-text.component.ts index 94f6fdb52b..a604fa8920 100644 --- a/lib/insights/diagram/components/raphael/raphael-multiline-text.component.ts +++ b/lib/insights/diagram/components/raphael/raphael-multiline-text.component.ts @@ -78,8 +78,8 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit let letterWidth = textPaper.getBBox().width / text.length; let removedLineBreaks = text.split('\n'); let actualRowLength = 0, formattedText = []; - removedLineBreaks.forEach(senteces => { - let words = senteces.split(' '); + removedLineBreaks.forEach(sentence => { + let words = sentence.split(' '); words.forEach(word => { let length = word.length; if (actualRowLength + (length * letterWidth) > elementWidth) { diff --git a/lib/insights/diagram/components/raphael/raphael-pentagon.component.ts b/lib/insights/diagram/components/raphael/raphael-pentagon.component.ts index aea306ff97..e7a3c8bcc5 100644 --- a/lib/insights/diagram/components/raphael/raphael-pentagon.component.ts +++ b/lib/insights/diagram/components/raphael/raphael-pentagon.component.ts @@ -61,8 +61,8 @@ export class RaphaelPentagonDirective extends RaphaelBase implements OnInit { } public draw(center: Point, opts?: any) { - let penta = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' + + const shape = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' + ' L 15.794545,8.389969 L 23.130481,13.720774 L 20.327514,22.344972 z').attr(opts); - penta.transform('T' + (center.x + 4) + ',' + (center.y + 4)); + shape.transform('T' + (center.x + 4) + ',' + (center.y + 4)); } } diff --git a/lib/insights/diagram/components/raphael/raphael.service.ts b/lib/insights/diagram/components/raphael/raphael.service.ts index f3858c79b3..4a14843db4 100644 --- a/lib/insights/diagram/components/raphael/raphael.service.ts +++ b/lib/insights/diagram/components/raphael/raphael.service.ts @@ -48,8 +48,6 @@ export class RaphaelService implements OnDestroy { throw new Error('insights configuration issue: Embedding Chart.js lib is mandatory'); } let paper = new Raphael(ctx, this.width, this.height); - // paper.setViewBox(0, 0, 583, 344.08374193550003, false); - // paper.renderfix(); return paper; } diff --git a/lib/insights/diagram/components/tooltip/diagram-tooltip.component.ts b/lib/insights/diagram/components/tooltip/diagram-tooltip.component.ts index fba722878a..08cf310005 100644 --- a/lib/insights/diagram/components/tooltip/diagram-tooltip.component.ts +++ b/lib/insights/diagram/components/tooltip/diagram-tooltip.component.ts @@ -72,7 +72,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy { } /** - * Clear all bound eventlisteners + * Clear all bound event listeners */ ngOnDestroy() { window.removeEventListener('scroll', this.boundMouseLeaveAndScrollHandler, true); @@ -94,7 +94,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy { } /** - * Calculates the tooltip's position and displays it + * Calculates the tooltip position and displays it * * @param event mouseenter/touchend event */ diff --git a/lib/insights/mock/analytics/analyticsComponent.mock.ts b/lib/insights/mock/analytics/analyticsComponent.mock.ts index 789c734ee7..bb39149880 100644 --- a/lib/insights/mock/analytics/analyticsComponent.mock.ts +++ b/lib/insights/mock/analytics/analyticsComponent.mock.ts @@ -79,6 +79,7 @@ export let chartTaskOverview = { 'type': 'masterDetailTable', 'title': 'Detailed task statistics', 'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TITLE', + /* cspell:disable-next-line */ 'columnNames': ['Task', 'Count', 'Sum', 'Min duration', 'Max duration', 'Average duration', 'Stddev duration'], 'columnNameKeys': [ 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TASK', @@ -87,6 +88,7 @@ export let chartTaskOverview = { 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.MIN-DURATION', 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.MAX-DURATION', 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.AVERAGE', + /* cspell:disable-next-line */ 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.STDDE'], 'columnsCentered': [false, false, false, false], 'rows': [ diff --git a/lib/insights/mock/diagram/diagramGateways.mock.ts b/lib/insights/mock/diagram/diagramGateways.mock.ts index 381c471834..45023e17e4 100644 --- a/lib/insights/mock/diagram/diagramGateways.mock.ts +++ b/lib/insights/mock/diagram/diagramGateways.mock.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -export let exclusiveGatway = { +export let exclusiveGateway = { id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', type: 'ExclusiveGateway', width: 40, @@ -25,7 +25,7 @@ export let exclusiveGatway = { properties: [{}] }; -export let exclusiveGatwayActive = { +export let exclusiveGatewayActive = { completed: false, current: true, id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', @@ -37,7 +37,7 @@ export let exclusiveGatwayActive = { properties: [{}] }; -export let exclusiveGatwayCompleted = { +export let exclusiveGatewayCompleted = { completed: true, current: false, id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', @@ -49,7 +49,7 @@ export let exclusiveGatwayCompleted = { properties: [{}] }; -export let inclusiveGatway = { +export let inclusiveGateway = { id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', type: 'InclusiveGateway', width: 40, @@ -59,7 +59,7 @@ export let inclusiveGatway = { properties: [{}] }; -export let inclusiveGatwayActive = { +export let inclusiveGatewayActive = { completed: false, current: true, id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', @@ -71,7 +71,7 @@ export let inclusiveGatwayActive = { properties: [{}] }; -export let inclusiveGatwayCompleted = { +export let inclusiveGatewayCompleted = { completed: true, current: false, id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', @@ -83,7 +83,7 @@ export let inclusiveGatwayCompleted = { properties: [{}] }; -export let parallelGatway = { +export let parallelGateway = { id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', type: 'ParallelGateway', width: 40, @@ -93,7 +93,7 @@ export let parallelGatway = { properties: [{}] }; -export let parallelGatwayActive = { +export let parallelGatewayActive = { completed: false, current: true, id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', @@ -105,7 +105,7 @@ export let parallelGatwayActive = { properties: [{}] }; -export let parallelGatwayCompleted = { +export let parallelGatewayCompleted = { completed: true, current: false, id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', @@ -117,7 +117,7 @@ export let parallelGatwayCompleted = { properties: [{}] }; -export let eventGatway = { +export let eventGateway = { id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', type: 'EventGateway', width: 40, @@ -127,7 +127,7 @@ export let eventGatway = { properties: [{}] }; -export let eventGatwayActive = { +export let eventGatewayActive = { completed: false, current: true, id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', @@ -139,7 +139,7 @@ export let eventGatwayActive = { properties: [{}] }; -export let eventGatwayCompleted = { +export let eventGatewayCompleted = { completed: true, current: false, id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', diff --git a/lib/insights/mock/diagram/diagramSwimlanes.mock.ts b/lib/insights/mock/diagram/diagramSwimlanes.mock.ts index e9d41c2131..29fe58f6f5 100644 --- a/lib/insights/mock/diagram/diagramSwimlanes.mock.ts +++ b/lib/insights/mock/diagram/diagramSwimlanes.mock.ts @@ -34,7 +34,7 @@ export let poolLanes = { y: 45, lanes: [{ id: 'sid-332204AB-D0F8-44CD-87B3-BF9DF59FF8AB', - name: 'Beckend', + name: 'Backend', width: 570, height: 250, x: 90, diff --git a/lib/process-services/app-list/apps-list.component.spec.ts b/lib/process-services/app-list/apps-list.component.spec.ts index 57c1ca7255..7a88fd7c94 100644 --- a/lib/process-services/app-list/apps-list.component.spec.ts +++ b/lib/process-services/app-list/apps-list.component.spec.ts @@ -114,7 +114,7 @@ describe('AppsListComponent', () => { expect(component.appList[0].modelId).toEqual(66); }); - it('should show the apps filtered by tenandId', () => { + it('should show the apps filtered by tenantId', () => { component.filtersAppId = [{tenantId: 9}]; fixture.detectChanges(); expect(component.isEmpty()).toBe(false); @@ -190,7 +190,7 @@ describe('AppsListComponent', () => { expect(debugElement.queryAll(By.css('h1')).length).toBe(6); }); - it('should not display undeployed apps', () => { + it('should not display apps that are not deployed', () => { getAppsSpy.and.returnValue(of(nonDeployedApps)); fixture.detectChanges(); expect(debugElement.queryAll(By.css('h1')).length).toBe(0); diff --git a/lib/process-services/app-list/icon.model.ts b/lib/process-services/app-list/icon.model.ts index ee745ad7a2..ba96db1b2c 100644 --- a/lib/process-services/app-list/icon.model.ts +++ b/lib/process-services/app-list/icon.model.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +/* spellchecker: disable */ export class IconModel { public static DEFAULT_TASKS_APP_MATERIAL_ICON: string = 'favorite_border'; diff --git a/lib/process-services/attachment/process-attachment-list.component.ts b/lib/process-services/attachment/process-attachment-list.component.ts index 2120d32fed..a4894f81c8 100644 --- a/lib/process-services/attachment/process-attachment-list.component.ts +++ b/lib/process-services/attachment/process-attachment-list.component.ts @@ -91,7 +91,7 @@ export class ProcessAttachmentListComponent implements OnChanges, AfterContentIn }); } - hasCutomEmptyTemplate() { + hasCustomEmptyTemplate() { return !!this.emptyTemplate; } diff --git a/lib/process-services/attachment/task-attachment-list.component.spec.ts b/lib/process-services/attachment/task-attachment-list.component.spec.ts index 876210a37b..0601ace63a 100644 --- a/lib/process-services/attachment/task-attachment-list.component.spec.ts +++ b/lib/process-services/attachment/task-attachment-list.component.spec.ts @@ -32,7 +32,7 @@ describe('TaskAttachmentList', () => { let mockAttachment: any; let deleteContentSpy: jasmine.Spy; let getFileRawContentSpy: jasmine.Spy; - let disposablelSuccess: any; + let disposableSuccess: any; setupTestBed({ imports: [ProcessTestingModule], @@ -96,8 +96,8 @@ describe('TaskAttachmentList', () => { overlayContainer.innerHTML = ''; }); - if (disposablelSuccess) { - disposablelSuccess.unsubscribe(); + if (disposableSuccess) { + disposableSuccess.unsubscribe(); } }); @@ -117,7 +117,7 @@ describe('TaskAttachmentList', () => { it('should emit a success event when the attachments are loaded', () => { let change = new SimpleChange(null, '123', true); - disposablelSuccess = component.success.subscribe((attachments) => { + disposableSuccess = component.success.subscribe((attachments) => { expect(attachments[0].name).toEqual(mockAttachment.data[0].name); expect(attachments[0].id).toEqual(mockAttachment.data[0].id); }); diff --git a/lib/process-services/attachment/task-attachment-list.component.ts b/lib/process-services/attachment/task-attachment-list.component.ts index d4f49a44c7..ee6ac135da 100644 --- a/lib/process-services/attachment/task-attachment-list.component.ts +++ b/lib/process-services/attachment/task-attachment-list.component.ts @@ -34,7 +34,7 @@ export class TaskAttachmentListComponent implements OnChanges, AfterContentInit @Input() taskId: string; - /** Disable/Enable read only mode for attachement list. */ + /** Disable/Enable read only mode for attachment list. */ @Input() disabled: boolean = false; @@ -82,7 +82,7 @@ export class TaskAttachmentListComponent implements OnChanges, AfterContentInit this.attachments = []; } - hasCutomEmptyTemplate() { + hasCustomEmptyTemplate() { return !!this.emptyTemplate; } diff --git a/lib/process-services/content-widget/attach-file-widget.component.ts b/lib/process-services/content-widget/attach-file-widget.component.ts index 630f78e99f..2539ff30fd 100644 --- a/lib/process-services/content-widget/attach-file-widget.component.ts +++ b/lib/process-services/content-widget/attach-file-widget.component.ts @@ -186,8 +186,8 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements let currentECMHost = this.getDomainHost(this.appConfigService.get(AppConfigValues.ECMHOST)); let chosenRepositoryHost = this.getDomainHost(repository.repositoryUrl); if (chosenRepositoryHost !== currentECMHost) { - let formattedReporistoryHost = repository.repositoryUrl.replace('/alfresco', ''); - this.attachDialogService.openLogin(formattedReporistoryHost).subscribe( + let formattedRepositoryHost = repository.repositoryUrl.replace('/alfresco', ''); + this.attachDialogService.openLogin(formattedRepositoryHost).subscribe( (selections: any[]) => { selections.forEach((node) => node.isExternal = true); this.tempFilesList.push(...selections); @@ -213,8 +213,8 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements ) ) ) - .subscribe(([mymeType, res, isExternal]) => { - res.mimeType = mymeType; + .subscribe(([mimeType, res, isExternal]) => { + res.mimeType = mimeType; res.isExternal = isExternal; filesSaved.push(res); }, diff --git a/lib/process-services/mock/process/process-instances-list.mock.ts b/lib/process-services/mock/process/process-instances-list.mock.ts index 041640d4b2..c86731e127 100644 --- a/lib/process-services/mock/process/process-instances-list.mock.ts +++ b/lib/process-services/mock/process/process-instances-list.mock.ts @@ -18,15 +18,24 @@ import { ObjectDataColumn } from '@alfresco/adf-core'; export let fakeProcessInstance = { - size: 2, total: 2, start: 0, + size: 2, + total: 2, + start: 0, data: [ { - id: '1', name: 'Process 773443333', businessKey: null, + id: '1', + name: 'Process 773443333', + businessKey: null, processDefinitionId: 'fakeprocess:5:7507', tenantId: 'tenant_1', started: '2015-11-09T12:36:14.184+0000', ended: null, - startedBy: { id: 3, firstName: 'tenant2', lastName: 'tenantLastname', email: 'tenant2@tenant'}, + startedBy: { + id: 3, + firstName: 'tenant2', + lastName: 'tenantLastName', + email: 'tenant2@tenant' + }, processDefinitionName: 'Fake Process Name', processDefinitionDescription: null, processDefinitionKey: 'fakeprocess', @@ -39,12 +48,19 @@ export let fakeProcessInstance = { variables: [] }, { - id: '2', name: 'Process 382927392', businessKey: null, + id: '2', + name: 'Process 382927392', + businessKey: null, processDefinitionId: 'fakeprocess:5:7507', tenantId: 'tenant_1', started: '2018-01-10T17:02:22.597+0000', ended: null, - startedBy: { id: 3, firstName: 'tenant2', lastName: 'tenantLastname', email: 'tenant2@tenant' }, + startedBy: { + id: 3, + firstName: 'tenant2', + lastName: 'tenantLastName', + email: 'tenant2@tenant' + }, processDefinitionName: 'Fake Process Name', processDefinitionDescription: null, processDefinitionKey: 'fakeprocess', @@ -60,7 +76,9 @@ export let fakeProcessInstance = { }; export let fakeProcessInstancesWithNoName = { - size: 2, total: 2, start: 0, + size: 2, + total: 2, + start: 0, data: [ { id: '1', @@ -68,10 +86,14 @@ export let fakeProcessInstancesWithNoName = { processDefinitionId: 'fakeprocess:5:7507', processDefinitionKey: 'fakeprocess', processDefinitionName: 'Fake Process Name', - description: null, category: null, + description: null, + category: null, started: '2017-11-09T12:36:14.184+0000', startedBy: { - id: 3, firstName: 'tenant2', lastName: 'tenantLastname', email: 'tenant2@tenant' + id: 3, + firstName: 'tenant2', + lastName: 'tenantLastName', + email: 'tenant2@tenant' } }, { @@ -84,36 +106,38 @@ export let fakeProcessInstancesWithNoName = { category: null, started: '2017-11-09T12:37:25.184+0000', startedBy: { - id: 3, firstName: 'tenant2', lastName: 'tenantLastname', email: 'tenant2@tenant' + id: 3, + firstName: 'tenant2', + lastName: 'tenantLastName', + email: 'tenant2@tenant' } } ] }; -export let fakeProcessCutomSchema = - [ - new ObjectDataColumn({ - 'key': 'fakeName', - 'type': 'text', - 'title': 'ADF_PROCESS_LIST.PROPERTIES.FAKE', - 'sortable': true - }), - new ObjectDataColumn({ - 'key': 'fakeProcessName', - 'type': 'text', - 'title': 'ADF_PROCESS_LIST.PROPERTIES.PROCESS_FAKE', - 'sortable': true - }) - ]; +export let fakeProcessCustomSchema = [ + new ObjectDataColumn({ + key: 'fakeName', + type: 'text', + title: 'ADF_PROCESS_LIST.PROPERTIES.FAKE', + sortable: true + }), + new ObjectDataColumn({ + key: 'fakeProcessName', + type: 'text', + title: 'ADF_PROCESS_LIST.PROPERTIES.PROCESS_FAKE', + sortable: true + }) +]; export let fakeProcessColumnSchema = { - 'default': [ + default: [ { - 'key': 'name', - 'type': 'text', - 'title': 'ADF_PROCESS_LIST.PROPERTIES.NAME', - 'sortable': true + key: 'name', + type: 'text', + title: 'ADF_PROCESS_LIST.PROPERTIES.NAME', + sortable: true } - ] - , fakeProcessCutomSchema + ], + fakeProcessCustomSchema }; diff --git a/lib/process-services/mock/process/process.model.mock.ts b/lib/process-services/mock/process/process.model.mock.ts index 9558613499..b54b952d8b 100644 --- a/lib/process-services/mock/process/process.model.mock.ts +++ b/lib/process-services/mock/process/process.model.mock.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +/* spell-checker: disable */ import { ProcessInstance } from '../../process-list/models/process-instance.model'; export class ProcessList { diff --git a/lib/process-services/mock/process/start-process.component.mock.ts b/lib/process-services/mock/process/start-process.component.mock.ts index 667839971e..08965ab37a 100644 --- a/lib/process-services/mock/process/start-process.component.mock.ts +++ b/lib/process-services/mock/process/start-process.component.mock.ts @@ -23,7 +23,7 @@ export let newProcess = new ProcessInstance({ name: 'Process' }); -export let testProcessDefRepr = new ProcessDefinitionRepresentation({ +export let testProcessDef = new ProcessDefinitionRepresentation({ id: 'my:process1', name: 'My Process 1', hasStartForm: false diff --git a/lib/process-services/mock/task/task-list.mock.ts b/lib/process-services/mock/task/task-list.mock.ts index c8c0a45e75..799f94927b 100644 --- a/lib/process-services/mock/task/task-list.mock.ts +++ b/lib/process-services/mock/task/task-list.mock.ts @@ -23,11 +23,15 @@ export let fakeGlobalTask = { total: 2, data: [ { - id: 14, name: 'nameFake1', + id: 14, + name: 'nameFake1', description: 'descriptionFake1', category: 'categoryFake1', assignee: { - id: 2, firstName: 'firstNameFake1', lastName: 'lastNameFake1', email: 'emailFake1' + id: 2, + firstName: 'firstNameFake1', + lastName: 'lastNameFake1', + email: 'emailFake1' }, created: '2017-03-01T12:25:17.189+0000', dueDate: '2017-04-02T12:25:17.189+0000', @@ -57,9 +61,15 @@ export let fakeGlobalTask = { }, { - id: 2, name: '', description: 'descriptionFake2', category: null, + id: 2, + name: '', + description: 'descriptionFake2', + category: null, assignee: { - id: 1, firstName: 'fistNameFake2', lastName: 'Administrator2', email: 'admin' + id: 1, + firstName: 'fistNameFake2', + lastName: 'Administrator2', + email: 'admin' }, created: '2017-03-01T12:25:17.189+0000', dueDate: '2017-04-02T12:25:17.189+0000', @@ -68,30 +78,29 @@ export let fakeGlobalTask = { ] }; -export let fakeCutomSchema = - [ - new ObjectDataColumn({ - 'key': 'fakeName', - 'type': 'text', - 'title': 'ADF_TASK_LIST.PROPERTIES.FAKE', - 'sortable': true - }), - new ObjectDataColumn({ - 'key': 'fakeTaskName', - 'type': 'text', - 'title': 'ADF_TASK_LIST.PROPERTIES.TASK_FAKE', - 'sortable': true - }) - ]; +export let fakeCustomSchema = [ + new ObjectDataColumn({ + key: 'fakeName', + type: 'text', + title: 'ADF_TASK_LIST.PROPERTIES.FAKE', + sortable: true + }), + new ObjectDataColumn({ + key: 'fakeTaskName', + type: 'text', + title: 'ADF_TASK_LIST.PROPERTIES.TASK_FAKE', + sortable: true + }) +]; export let fakeColumnSchema = { - 'default': [ + default: [ { - 'key': 'name', - 'type': 'text', - 'title': 'ADF_TASK_LIST.PROPERTIES.NAME', - 'sortable': true + key: 'name', + type: 'text', + title: 'ADF_TASK_LIST.PROPERTIES.NAME', + sortable: true } - ] - , fakeCutomSchema + ], + fakeCustomSchema }; diff --git a/lib/process-services/people/components/people-selector/people-selector.component.spec.ts b/lib/process-services/people/components/people-selector/people-selector.component.spec.ts index 92f38a6764..fd47f39dfb 100644 --- a/lib/process-services/people/components/people-selector/people-selector.component.spec.ts +++ b/lib/process-services/people/components/people-selector/people-selector.component.spec.ts @@ -71,7 +71,7 @@ describe('PeopleSelectorComponent', () => { }); }); - it('should emit an event with the selected users\'s id when userSelected method is invoked', (done) => { + it('should emit an event with the selected users id when userSelected method is invoked', (done) => { component.peopleIdChange.subscribe((userId) => { expect(userId).toBe(789); diff --git a/lib/process-services/people/components/people/people.component.html b/lib/process-services/people/components/people/people.component.html index f62045d575..78bccd0c1e 100644 --- a/lib/process-services/people/components/people/people.component.html +++ b/lib/process-services/people/components/people/people.component.html @@ -7,7 +7,7 @@
{{ 'ADF_TASK_LIST.DETAILS.PEOPLE.NONE' | translate }}
-
+
person_add
diff --git a/lib/process-services/people/components/people/people.component.spec.ts b/lib/process-services/people/components/people/people.component.spec.ts index db661379b4..b746071e36 100644 --- a/lib/process-services/people/components/people/people.component.spec.ts +++ b/lib/process-services/people/components/people/people.component.spec.ts @@ -105,7 +105,7 @@ describe('PeopleComponent', () => { }); })); - it('should remove pepole involved', async(() => { + it('should remove people involved', async(() => { activitiPeopleComponent.removeInvolvedUser(fakeUser); jasmine.Ajax.requests.mostRecent().respondWith({ status: 200 @@ -119,7 +119,7 @@ describe('PeopleComponent', () => { }); })); - it('should involve pepole', async(() => { + it('should involve people', async(() => { activitiPeopleComponent.involveUser(fakeUser); jasmine.Ajax.requests.mostRecent().respondWith({ status: 200 diff --git a/lib/process-services/people/components/people/people.component.ts b/lib/process-services/people/components/people/people.component.ts index f2bf995aae..4b92f8cd7d 100644 --- a/lib/process-services/people/components/people/people.component.ts +++ b/lib/process-services/people/components/people/people.component.ts @@ -110,7 +110,7 @@ export class PeopleComponent implements OnInit, AfterViewInit { return this.getDisplayUser(firstName, lastName, ''); } - onAddAssignement() { + onAddAssignment() { this.showAssignment = true; } diff --git a/lib/process-services/process-list/components/process-instance-details.component.html b/lib/process-services/process-list/components/process-instance-details.component.html index 1d5e729634..9b10293f0f 100644 --- a/lib/process-services/process-list/components/process-instance-details.component.html +++ b/lib/process-services/process-list/components/process-instance-details.component.html @@ -28,7 +28,7 @@ - diff --git a/lib/process-services/process-list/components/process-instance-tasks.component.html b/lib/process-services/process-list/components/process-instance-tasks.component.html index 918ce0e57b..da49990407 100644 --- a/lib/process-services/process-list/components/process-instance-tasks.component.html +++ b/lib/process-services/process-list/components/process-instance-tasks.component.html @@ -79,7 +79,7 @@
- +
diff --git a/lib/process-services/process-list/components/process-instance-tasks.component.ts b/lib/process-services/process-list/components/process-instance-tasks.component.ts index 8d4f8c951c..cf7ec41ede 100644 --- a/lib/process-services/process-list/components/process-instance-tasks.component.ts +++ b/lib/process-services/process-list/components/process-instance-tasks.component.ts @@ -61,8 +61,8 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges { @ViewChild('startDialog') startDialog: any; - @ViewChild('taskdetails') - taskdetails: any; + @ViewChild('taskDetails') + taskDetails: any; /** Emitted when a task is clicked. */ @Output() @@ -170,7 +170,7 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges { this.dialog.open(this.startDialog, { height: '500px', width: '700px' }); } - closeSartDialog() { + closeStartDialog() { this.dialog.closeAll(); } @@ -179,6 +179,6 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges { } onFormContentClick() { - this.closeSartDialog(); + this.closeStartDialog(); } } diff --git a/lib/process-services/process-list/components/process-list.component.spec.ts b/lib/process-services/process-list/components/process-list.component.spec.ts index f641b23484..e7f8460cca 100644 --- a/lib/process-services/process-list/components/process-list.component.spec.ts +++ b/lib/process-services/process-list/components/process-list.component.spec.ts @@ -28,7 +28,7 @@ import { DataRowEvent, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/a import { fakeProcessInstance, fakeProcessInstancesWithNoName } from '../../mock'; import { ProcessService } from '../services/process.service'; import { ProcessTestingModule } from '../../testing/process.testing.module'; -import { fakeProcessCutomSchema } from '../../mock'; +import { fakeProcessCustomSchema } from '../../mock'; describe('ProcessInstanceListComponent', () => { @@ -53,7 +53,7 @@ describe('ProcessInstanceListComponent', () => { getProcessInstancesSpy = spyOn(service, 'getProcessInstances').and.returnValue(of(fakeProcessInstance)); appConfig.config['adf-process-list'] = { 'presets': { - 'fakeProcessCutomSchema': [ + 'fakeProcessCustomSchema': [ { 'key': 'fakeName', 'type': 'text', @@ -91,14 +91,14 @@ describe('ProcessInstanceListComponent', () => { }); it('should fetch the custom schemaColumn from app.config.json', () => { - component.presetColumn = 'fakeProcessCutomSchema'; + component.presetColumn = 'fakeProcessCustomSchema'; component.ngAfterContentInit(); fixture.detectChanges(); - expect(component.columns).toEqual(fakeProcessCutomSchema); + expect(component.columns).toEqual(fakeProcessCustomSchema); }); it('should fetch custom schemaColumn when the input presetColumn is defined', () => { - component.presetColumn = 'fakeProcessCutomSchema'; + component.presetColumn = 'fakeProcessCustomSchema'; component.ngAfterContentInit(); fixture.detectChanges(); expect(component.columns).toBeDefined(); diff --git a/lib/process-services/process-list/components/start-process.component.spec.ts b/lib/process-services/process-list/components/start-process.component.spec.ts index 1fec2dd0f3..bf41eeda53 100644 --- a/lib/process-services/process-list/components/start-process.component.spec.ts +++ b/lib/process-services/process-list/components/start-process.component.spec.ts @@ -25,7 +25,7 @@ import { ProcessService } from '../services/process.service'; import { newProcess, taskFormMock, - testProcessDefRepr, + testProcessDef, testMultipleProcessDefs, testProcessDefWithForm, testProcessDefinitions @@ -89,7 +89,7 @@ describe('StartFormComponent', () => { it('should enable start button when name and process filled out', async(() => { spyOn(component, 'loadStartProcess').and.callThrough(); component.processNameInput.setValue('My Process'); - component.processDefinitionInput.setValue(testProcessDefRepr.name); + component.processDefinitionInput.setValue(testProcessDef.name); fixture.detectChanges(); @@ -102,7 +102,7 @@ describe('StartFormComponent', () => { it('should have start button disabled when name not filled out', async(() => { spyOn(component, 'loadStartProcess').and.callThrough(); component.processNameInput.setValue(''); - component.processDefinitionInput.setValue(testProcessDefRepr.name); + component.processDefinitionInput.setValue(testProcessDef.name); fixture.detectChanges(); fixture.whenStable().then(() => { let startBtn = fixture.nativeElement.querySelector('#button-start'); @@ -257,9 +257,9 @@ describe('StartFormComponent', () => { fixture.detectChanges(); fixture.whenStable().then(() => { - let noprocessElement = fixture.nativeElement.querySelector('#no-process-message'); - expect(noprocessElement).not.toBeNull('Expected no available process message to be present'); - expect(noprocessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS'); + const noProcessElement = fixture.nativeElement.querySelector('#no-process-message'); + expect(noProcessElement).not.toBeNull('Expected no available process message to be present'); + expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS'); }); })); @@ -298,7 +298,7 @@ describe('StartFormComponent', () => { it('should hide the process dropdown button if showSelectProcessDropdown is false', async(() => { fixture.detectChanges(); - getDefinitionsSpy = getDefinitionsSpy.and.returnValue(of([testProcessDefRepr])); + getDefinitionsSpy = getDefinitionsSpy.and.returnValue(of([testProcessDef])); component.appId = 123; component.showSelectProcessDropdown = false; component.ngOnChanges({}); @@ -379,7 +379,7 @@ describe('StartFormComponent', () => { }); it('should call service to start process if required fields provided', async(() => { - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.startProcess(); fixture.whenStable().then(() => { expect(startProcessSpy).toHaveBeenCalled(); @@ -395,7 +395,7 @@ describe('StartFormComponent', () => { })); it('should call service to start process with the correct parameters', async(() => { - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.startProcess(); fixture.whenStable().then(() => { expect(startProcessSpy).toHaveBeenCalledWith('my:process1', 'My new process', undefined, undefined, undefined); @@ -412,7 +412,7 @@ describe('StartFormComponent', () => { inputProcessVariable.push(variable); component.variables = inputProcessVariable; - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.startProcess(); fixture.whenStable().then(() => { expect(startProcessSpy).toHaveBeenCalledWith('my:process1', 'My new process', undefined, undefined, inputProcessVariable); @@ -421,7 +421,7 @@ describe('StartFormComponent', () => { it('should output start event when process started successfully', async(() => { let emitSpy = spyOn(component.start, 'emit'); - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.startProcess(); fixture.whenStable().then(() => { expect(emitSpy).toHaveBeenCalledWith(newProcess); @@ -432,7 +432,7 @@ describe('StartFormComponent', () => { let errorSpy = spyOn(component.error, 'error'); let error = { message: 'My error' }; startProcessSpy = startProcessSpy.and.returnValue(throwError(error)); - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.startProcess(); fixture.whenStable().then(() => { expect(errorSpy).toHaveBeenCalledWith(error); @@ -442,7 +442,7 @@ describe('StartFormComponent', () => { it('should indicate an error to the user if process cannot be started', async(() => { fixture.detectChanges(); startProcessSpy = startProcessSpy.and.returnValue(throwError({})); - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.startProcess(); fixture.detectChanges(); fixture.whenStable().then(() => { @@ -458,7 +458,7 @@ describe('StartFormComponent', () => { done(); }); - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.name = 'my:Process'; component.startProcess(); fixture.detectChanges(); @@ -491,7 +491,7 @@ describe('StartFormComponent', () => { it('should able to start the process when the required fields are filled up', (done) => { component.name = 'my:process1'; - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; let disposableStart = component.start.subscribe(() => { disposableStart.unsubscribe(); @@ -502,7 +502,7 @@ describe('StartFormComponent', () => { }); it('should return true if startFrom defined', async(() => { - component.selectedProcessDef = testProcessDefRepr; + component.selectedProcessDef = testProcessDef; component.name = 'my:process1'; component.selectedProcessDef.hasStartForm = true; component.hasStartForm(); diff --git a/lib/process-services/process-list/services/process.service.spec.ts b/lib/process-services/process-list/services/process.service.spec.ts index 219aca040d..3f506c3c7e 100644 --- a/lib/process-services/process-list/services/process.service.spec.ts +++ b/lib/process-services/process-list/services/process.service.spec.ts @@ -83,6 +83,7 @@ describe('ProcessService', () => { expect(instances.data.length).toBe(1); let instance = instances.data[0]; expect(instance.id).toBe('340124'); + /* cspell:disable-next-line */ expect(instance.name).toBe('James Franklin EMEA Onboarding'); expect(instance.started).toEqual(new Date('2017-10-09T12:19:44.560+0000')); }); diff --git a/lib/process-services/task-list/components/checklist.component.ts b/lib/process-services/task-list/components/checklist.component.ts index 32429133dc..2b6fe5e360 100644 --- a/lib/process-services/task-list/components/checklist.component.ts +++ b/lib/process-services/task-list/components/checklist.component.ts @@ -47,7 +47,7 @@ export class ChecklistComponent implements OnChanges { @Output() checklistTaskCreated: EventEmitter = new EventEmitter(); - /** Emitted when a checklitst task is deleted. */ + /** Emitted when a checklist task is deleted. */ @Output() checklistTaskDeleted: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/task-list/components/start-task.component.html b/lib/process-services/task-list/components/start-task.component.html index c8528ef421..7db7a7bd1d 100644 --- a/lib/process-services/task-list/components/start-task.component.html +++ b/lib/process-services/task-list/components/start-task.component.html @@ -11,7 +11,7 @@ @@ -23,7 +23,7 @@ matInput class="adf-grid-full-width" placeholder="{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.DESCRIPTION'|translate}}" - [(ngModel)]="startTaskmodel.description" + [(ngModel)]="startTaskModel.description" rows="1" id="description_id"> @@ -40,7 +40,7 @@ (keyup)="onDateChanged($event.srcElement.value)" (dateInput)="onDateChanged($event.value)" placeholder="{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.DATE'|translate}}" - [(ngModel)]="startTaskmodel.dueDate" + [(ngModel)]="startTaskModel.dueDate" id="date_id"> {{'ADF_TASK_LIST.START_TASK.FORM.ACTION.CANCEL'|translate}} - diff --git a/lib/process-services/task-list/components/start-task.component.spec.ts b/lib/process-services/task-list/components/start-task.component.spec.ts index 36810f1889..f8ab89e8b1 100644 --- a/lib/process-services/task-list/components/start-task.component.spec.ts +++ b/lib/process-services/task-list/components/start-task.component.spec.ts @@ -30,7 +30,7 @@ describe('StartTaskComponent', () => { let fixture: ComponentFixture; let service: TaskListService; let element: HTMLElement; - let getFormlistSpy: jasmine.Spy; + let getFormListSpy: jasmine.Spy; let createNewTaskSpy: jasmine.Spy; let fakeForms = [ { @@ -54,7 +54,7 @@ describe('StartTaskComponent', () => { element = fixture.nativeElement; service = TestBed.get(TaskListService); - getFormlistSpy = spyOn(service, 'getFormList').and.returnValue(of(fakeForms)); + getFormListSpy = spyOn(service, 'getFormList').and.returnValue(of(fakeForms)); fixture.detectChanges(); })); @@ -63,13 +63,13 @@ describe('StartTaskComponent', () => { expect(fixture.componentInstance instanceof StartTaskComponent).toBe(true, 'should create StartTaskComponent'); }); - it('should fetch fakeform on ngonint', () => { + it('should fetch fake form on init', () => { component.ngOnInit(); expect(component.forms).toEqual(fakeForms); expect(component.forms[0].name).toEqual('Display Data'); expect(component.forms[1].name).toEqual('Employee Info'); expect(component.forms[1].id).toEqual(1111); - expect(getFormlistSpy).toHaveBeenCalled(); + expect(getFormListSpy).toHaveBeenCalled(); }); describe('create task', () => { @@ -88,7 +88,7 @@ describe('StartTaskComponent', () => { it('should create new task when start is clicked', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); createTaskButton.click(); @@ -98,7 +98,7 @@ describe('StartTaskComponent', () => { it('should send on success event when the task is started', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); createTaskButton.click(); @@ -113,7 +113,7 @@ describe('StartTaskComponent', () => { it('should send on success event when only name is given', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel.name = 'fakeName'; + component.startTaskModel.name = 'fakeName'; fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); createTaskButton.click(); @@ -122,7 +122,7 @@ describe('StartTaskComponent', () => { it('should not emit success event when data not present', () => { let successSpy = spyOn(component.success, 'emit'); - component.startTaskmodel = new StartTaskModel(null); + component.startTaskModel = new StartTaskModel(null); fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); createTaskButton.click(); @@ -154,7 +154,7 @@ describe('StartTaskComponent', () => { it('should attach form to the task when a form is selected', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); component.formKey = 1204; fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); @@ -170,7 +170,7 @@ describe('StartTaskComponent', () => { it('should not attach form to the task when a no form is selected', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); component.formKey = null; fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); @@ -215,7 +215,7 @@ describe('StartTaskComponent', () => { it('should assign task when an assignee is selected', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); component.formKey = 1204; component.assigneeId = testUser.id; fixture.detectChanges(); @@ -234,7 +234,7 @@ describe('StartTaskComponent', () => { component.appId = 42; component.formKey = 1204; component.assigneeId = null; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); fixture.detectChanges(); let createTaskButton = element.querySelector('#button-start'); createTaskButton.click(); @@ -249,7 +249,7 @@ describe('StartTaskComponent', () => { it('should assign task with id of selected user assigned', () => { let successSpy = spyOn(component.success, 'emit'); component.appId = 42; - component.startTaskmodel = new StartTaskModel(startTaskMock); + component.startTaskModel = new StartTaskModel(startTaskMock); component.formKey = 1204; component.getAssigneeId(testUser.id); fixture.detectChanges(); @@ -264,7 +264,7 @@ describe('StartTaskComponent', () => { }); }); - it('should not attach a form when a form id is not slected', () => { + it('should not attach a form when a form id is not selected', () => { let attachFormToATask = spyOn(service, 'attachFormToATask').and.returnValue(of()); spyOn(service, 'createNewTask').and.callFake( function() { @@ -274,7 +274,7 @@ describe('StartTaskComponent', () => { }); }); let createTaskButton = element.querySelector('#button-start'); - component.startTaskmodel.name = 'fake-name'; + component.startTaskModel.name = 'fake-name'; fixture.detectChanges(); createTaskButton.click(); expect(attachFormToATask).not.toHaveBeenCalled(); @@ -294,7 +294,7 @@ describe('StartTaskComponent', () => { }); it('should disable start button if name is empty', () => { - component.startTaskmodel.name = ''; + component.startTaskModel.name = ''; fixture.detectChanges(); let createTaskButton = fixture.nativeElement.querySelector('#button-start'); expect(createTaskButton.disabled).toBeTruthy(); @@ -303,7 +303,7 @@ describe('StartTaskComponent', () => { it('should cancel start task on cancel button click', () => { let emitSpy = spyOn(component.cancel, 'emit'); let cancelTaskButton = fixture.nativeElement.querySelector('#button-cancel'); - component.startTaskmodel.name = ''; + component.startTaskModel.name = ''; fixture.detectChanges(); cancelTaskButton.click(); expect(emitSpy).not.toBeNull(); @@ -311,7 +311,7 @@ describe('StartTaskComponent', () => { }); it('should enable start button if name is filled out', () => { - component.startTaskmodel.name = 'fakeName'; + component.startTaskModel.name = 'fakeName'; fixture.detectChanges(); let createTaskButton = fixture.nativeElement.querySelector('#button-start'); expect(createTaskButton.disabled).toBeFalsy(); @@ -324,28 +324,28 @@ describe('StartTaskComponent', () => { expect(selectElement.attributes['aria-label'].value).toContain('ADF_TASK_LIST.START_TASK.FORM.LABEL.FORM'); }); - it('should get formatted fullname', () => { + it('should get formatted full name', () => { let testUser1 = {'id': 1001, 'firstName': 'Wilbur', 'lastName': 'Adams', 'email': 'wilbur@app.activiti.com'}; let testUser2 = {'id': 1002, 'firstName': '', 'lastName': 'Adams', 'email': 'adams@app.activiti.com'}; let testUser3 = {'id': 1003, 'firstName': 'Wilbur', 'lastName': '', 'email': 'wilbur@app.activiti.com'}; let testUser4 = {'id': 1004, 'firstName': '', 'lastName': '', 'email': 'test@app.activiti.com'}; - let testFullname1 = component.getDisplayUser(testUser1.firstName, testUser1.lastName, ' '); - let testFullname2 = component.getDisplayUser(testUser2.firstName, testUser2.lastName, ' '); - let testFullname3 = component.getDisplayUser(testUser3.firstName, testUser3.lastName, ' '); - let testFullname4 = component.getDisplayUser(testUser4.firstName, testUser4.lastName, ' '); + let testFullName1 = component.getDisplayUser(testUser1.firstName, testUser1.lastName, ' '); + let testFullName2 = component.getDisplayUser(testUser2.firstName, testUser2.lastName, ' '); + let testFullName3 = component.getDisplayUser(testUser3.firstName, testUser3.lastName, ' '); + let testFullName4 = component.getDisplayUser(testUser4.firstName, testUser4.lastName, ' '); - expect(testFullname1.trim()).toBe('Wilbur Adams'); - expect(testFullname2.trim()).toBe('Adams'); - expect(testFullname3.trim()).toBe('Wilbur'); - expect(testFullname4.trim()).toBe(''); + expect(testFullName1.trim()).toBe('Wilbur Adams'); + expect(testFullName2.trim()).toBe('Adams'); + expect(testFullName3.trim()).toBe('Wilbur'); + expect(testFullName4.trim()).toBe(''); }); it('should emit error when there is an error while creating task', () => { let errorSpy = spyOn(component.error, 'emit'); spyOn(service, 'createNewTask').and.returnValue(throwError({})); let createTaskButton = element.querySelector('#button-start'); - component.startTaskmodel.name = 'fake-name'; + component.startTaskModel.name = 'fake-name'; fixture.detectChanges(); createTaskButton.click(); expect(errorSpy).toHaveBeenCalled(); diff --git a/lib/process-services/task-list/components/start-task.component.ts b/lib/process-services/task-list/components/start-task.component.ts index d12077d5f6..19f121e9a0 100644 --- a/lib/process-services/task-list/components/start-task.component.ts +++ b/lib/process-services/task-list/components/start-task.component.ts @@ -57,7 +57,7 @@ export class StartTaskComponent implements OnInit { @Output() error: EventEmitter = new EventEmitter(); - startTaskmodel: StartTaskModel = new StartTaskModel(); + startTaskModel: StartTaskModel = new StartTaskModel(); forms: Form[]; @@ -92,11 +92,11 @@ export class StartTaskComponent implements OnInit { } public start(): void { - if (this.startTaskmodel.name) { + if (this.startTaskModel.name) { if (this.appId) { - this.startTaskmodel.category = this.appId.toString(); + this.startTaskModel.category = this.appId.toString(); } - this.taskService.createNewTask(new TaskDetailsModel(this.startTaskmodel)) + this.taskService.createNewTask(new TaskDetailsModel(this.startTaskModel)) .pipe( switchMap((createRes: any) => this.attachForm(createRes.id, this.formKey).pipe( @@ -181,7 +181,7 @@ export class StartTaskComponent implements OnInit { clearDateInput() { const emptyValue = ''; - this.startTaskmodel.dueDate = emptyValue; + this.startTaskModel.dueDate = emptyValue; this.onDateChanged(emptyValue); } } diff --git a/lib/process-services/task-list/components/task-audit.directive.spec.ts b/lib/process-services/task-list/components/task-audit.directive.spec.ts index 08cc0d2aba..2bdb7737ac 100644 --- a/lib/process-services/task-list/components/task-audit.directive.spec.ts +++ b/lib/process-services/task-list/components/task-audit.directive.spec.ts @@ -120,7 +120,8 @@ describe('TaskAuditDirective', () => { component.fileName = 'FakeAuditName'; component.format = 'json'; component.download = true; - const auditJson = { taskId: '77', taskName: 'Fake Task Naem', assignee: 'FirstName LastName', formData: [], selectedOutcome: null, comments: [] }; + + const auditJson = { taskId: '77', taskName: 'Fake Task Name', assignee: 'FirstName LastName', formData: [], selectedOutcome: null, comments: [] }; spyOn(service, 'fetchTaskAuditJsonById').and.returnValue(of(auditJson)); spyOn(component, 'onAuditClick').and.callThrough(); @@ -137,7 +138,7 @@ describe('TaskAuditDirective', () => { })); - it('should fetch the pdf Blob as default when the format is UNKNOW', fakeAsync(() => { + it('should fetch the pdf Blob as default when the format is UNKNOWN', fakeAsync(() => { component.fileName = 'FakeAuditName'; component.format = 'fakeFormat'; let blob = createFakePdfBlob(); diff --git a/lib/process-services/task-list/components/task-details.component.html b/lib/process-services/task-list/components/task-details.component.html index 61de49f3f0..45e9524c38 100644 --- a/lib/process-services/task-list/components/task-details.component.html +++ b/lib/process-services/task-list/components/task-details.component.html @@ -111,7 +111,7 @@ - @@ -123,7 +123,7 @@
- { component.taskDetails.endDate = new Date('2017-10-03T17:03:57.311+0000'); fixture.detectChanges(); - expect((component.activiticomments as any).readOnly).toBe(true); + expect((component.activitiComments as any).readOnly).toBe(true); }); it('should comments be readonly if the task is complete and user are NOT involved', () => { @@ -407,7 +407,7 @@ describe('TaskDetailsComponent', () => { component.taskDetails.endDate = new Date('2017-10-03T17:03:57.311+0000'); fixture.detectChanges(); - expect((component.activiticomments as any).readOnly).toBe(true); + expect((component.activitiComments as any).readOnly).toBe(true); }); it('should comments NOT be readonly if the task is NOT complete and user are NOT involved', () => { @@ -419,7 +419,7 @@ describe('TaskDetailsComponent', () => { component.taskDetails.endDate = null; fixture.detectChanges(); - expect((component.activiticomments as any).readOnly).toBe(false); + expect((component.activitiComments as any).readOnly).toBe(false); }); it('should comments NOT be readonly if the task is complete and user are involved', () => { @@ -431,7 +431,7 @@ describe('TaskDetailsComponent', () => { component.taskDetails.endDate = new Date('2017-10-03T17:03:57.311+0000'); fixture.detectChanges(); - expect((component.activiticomments as any).readOnly).toBe(false); + expect((component.activitiComments as any).readOnly).toBe(false); }); it('should comments be present if showComments is true', () => { @@ -442,7 +442,7 @@ describe('TaskDetailsComponent', () => { component.taskDetails = new TaskDetailsModel(taskDetailsMock); fixture.detectChanges(); - expect(component.activiticomments).toBeDefined(); + expect(component.activitiComments).toBeDefined(); }); it('should comments NOT be present if showComments is false', () => { @@ -452,7 +452,7 @@ describe('TaskDetailsComponent', () => { component.taskDetails = new TaskDetailsModel(taskDetailsMock); fixture.detectChanges(); - expect(component.activiticomments).not.toBeDefined(); + expect(component.activitiComments).not.toBeDefined(); }); }); diff --git a/lib/process-services/task-list/components/task-details.component.ts b/lib/process-services/task-list/components/task-details.component.ts index 1185ca5851..ae18a9b748 100644 --- a/lib/process-services/task-list/components/task-details.component.ts +++ b/lib/process-services/task-list/components/task-details.component.ts @@ -53,11 +53,11 @@ import { share } from 'rxjs/operators'; }) export class TaskDetailsComponent implements OnInit, OnChanges { - @ViewChild('activiticomments') - activiticomments: CommentsComponent; + @ViewChild('activitiComments') + activitiComments: CommentsComponent; - @ViewChild('activitichecklist') - activitichecklist: any; + @ViewChild('activitiChecklist') + activitiChecklist: any; @ViewChild('errorDialog') errorDialog: TemplateRef; diff --git a/lib/process-services/task-list/components/task-filters.component.spec.ts b/lib/process-services/task-list/components/task-filters.component.spec.ts index 6b51b96483..a63b62082c 100644 --- a/lib/process-services/task-list/components/task-filters.component.spec.ts +++ b/lib/process-services/task-list/components/task-filters.component.spec.ts @@ -333,7 +333,7 @@ describe('TaskFiltersComponent', () => { expect(component.getCurrentFilter()).toBe(filter); }); - it('should load default list when appid is null', () => { + it('should load default list when app id is null', () => { spyOn(component, 'getFiltersByAppId').and.stub(); let change = new SimpleChange(undefined, null, true); diff --git a/lib/process-services/task-list/components/task-header.component.spec.ts b/lib/process-services/task-list/components/task-header.component.spec.ts index 51b0c62878..abe1197bef 100644 --- a/lib/process-services/task-list/components/task-header.component.spec.ts +++ b/lib/process-services/task-list/components/task-header.component.spec.ts @@ -214,7 +214,7 @@ describe('TaskHeaderComponent', () => { }); })); - it('should display the claime button if the task is claimable by candidates members', async(() => { + it('should display the claim button if the task is claimable by candidates members', async(() => { component.taskDetails = new TaskDetailsModel(claimableTaskDetailsMock); component.refreshData(); fixture.detectChanges(); @@ -240,7 +240,7 @@ describe('TaskHeaderComponent', () => { }); })); - it('should call the service\'s unclaim method on unclaiming', async(() => { + it('should call the service unclaim method on un-claiming', async(() => { spyOn(service, 'unclaimTask').and.returnValue(of(true)); component.taskDetails = new TaskDetailsModel(claimedTaskDetailsMock); component.refreshData(); @@ -254,7 +254,7 @@ describe('TaskHeaderComponent', () => { }); })); - it('should trigger the unclaim event on successful unclaiming', async(() => { + it('should trigger the unclaim event on successful un-claiming', async(() => { let unclaimed: boolean = false; spyOn(service, 'unclaimTask').and.returnValue(of(true)); component.taskDetails = new TaskDetailsModel(claimedTaskDetailsMock); diff --git a/lib/process-services/task-list/components/task-header.component.ts b/lib/process-services/task-list/components/task-header.component.ts index 40dfbf64e3..9737fad468 100644 --- a/lib/process-services/task-list/components/task-header.component.ts +++ b/lib/process-services/task-list/components/task-header.component.ts @@ -226,7 +226,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit { } /** - * Returns true if the task is assigne to logged in user + * Returns true if the task is assigned to logged in user */ public isAssignedTo(userId): boolean { return this.hasAssignee() ? this.taskDetails.assignee.id === userId : false; diff --git a/lib/process-services/task-list/components/task-list.component.spec.ts b/lib/process-services/task-list/components/task-list.component.spec.ts index 7b8155a4b3..3488520b6f 100644 --- a/lib/process-services/task-list/components/task-list.component.spec.ts +++ b/lib/process-services/task-list/components/task-list.component.spec.ts @@ -23,7 +23,7 @@ import { DataRowEvent, ObjectDataRow } from '@alfresco/adf-core'; import { TaskListService } from '../services/tasklist.service'; import { TaskListComponent } from './task-list.component'; import { ProcessTestingModule } from '../../testing/process.testing.module'; -import { fakeGlobalTask, fakeCutomSchema } from '../../mock'; +import { fakeGlobalTask, fakeCustomSchema } from '../../mock'; import { TranslateService } from '@ngx-translate/core'; import { of } from 'rxjs'; @@ -50,7 +50,7 @@ describe('TaskListComponent', () => { appConfig.config = Object.assign(appConfig.config, { 'adf-task-list': { 'presets': { - 'fakeCutomSchema': [ + 'fakeCustomSchema': [ { 'key': 'fakeName', 'type': 'text', @@ -86,14 +86,14 @@ describe('TaskListComponent', () => { }); it('should use the custom schemaColumn from app.config.json', () => { - component.presetColumn = 'fakeCutomSchema'; + component.presetColumn = 'fakeCustomSchema'; component.ngAfterContentInit(); fixture.detectChanges(); - expect(component.columns).toEqual(fakeCutomSchema); + expect(component.columns).toEqual(fakeCustomSchema); }); it('should fetch custom schemaColumn when the input presetColumn is defined', () => { - component.presetColumn = 'fakeCutomSchema'; + component.presetColumn = 'fakeCustomSchema'; fixture.detectChanges(); expect(component.columns).toBeDefined(); expect(component.columns.length).toEqual(2); @@ -151,6 +151,7 @@ describe('TaskListComponent', () => { it('should return the filtered task list by processDefinitionKey', (done) => { let state = new SimpleChange(null, 'open', true); + /* cspell:disable-next-line */ let processDefinitionKey = new SimpleChange(null, 'fakeprocess', true); let assignment = new SimpleChange(null, 'fake-assignee', true); @@ -250,6 +251,7 @@ describe('TaskListComponent', () => { it('should return the filtered task list for all state', (done) => { let state = new SimpleChange(null, 'all', true); + /* cspell:disable-next-line */ let processInstanceId = new SimpleChange(null, 'fakeprocessId', true); component.success.subscribe((res) => { diff --git a/lib/process-services/task-list/components/task-standalone.component.spec.ts b/lib/process-services/task-list/components/task-standalone.component.spec.ts index 8c5730a0fa..58770f1e0b 100644 --- a/lib/process-services/task-list/components/task-standalone.component.spec.ts +++ b/lib/process-services/task-list/components/task-standalone.component.spec.ts @@ -61,10 +61,10 @@ describe('TaskStandaloneComponent', () => { it('should show No form message if isCompleted is false', async(() => { component.isCompleted = false; fixture.detectChanges(); - const noformElement = fixture.debugElement.nativeElement.querySelector('#adf-no-form-message'); + const noFormElement = fixture.debugElement.nativeElement.querySelector('#adf-no-form-message'); fixture.whenStable().then(() => { - expect(noformElement).toBeDefined(); - expect(noformElement.innerText).toBe('ADF_TASK_LIST.STANDALONE_TASK.NO_FORM_MESSAGE'); + expect(noFormElement).toBeDefined(); + expect(noFormElement.innerText).toBe('ADF_TASK_LIST.STANDALONE_TASK.NO_FORM_MESSAGE'); expect(element.querySelector('#adf-completed-form-message')).toBeNull(); expect(element.querySelector('.adf-no-form-submessage')).toBeNull(); }); diff --git a/lib/process-services/task-list/services/task-filter.service.spec.ts b/lib/process-services/task-list/services/task-filter.service.spec.ts index 19e8ca0769..9cb806a862 100644 --- a/lib/process-services/task-list/services/task-filter.service.spec.ts +++ b/lib/process-services/task-list/services/task-filter.service.spec.ts @@ -174,14 +174,14 @@ describe('Activiti Task filter Service', () => { it('should add a filter', (done) => { let filterFake = new FilterRepresentationModel({ name: 'FakeNameFilter', - assignment: 'fake-assignement' + assignment: 'fake-assignment' }); service.addFilter(filterFake).subscribe((res: FilterRepresentationModel) => { expect(res).toBeDefined(); expect(res.id).not.toEqual(null); expect(res.name).toEqual('FakeNameFilter'); - expect(res.filter.assignment).toEqual('fake-assignement'); + expect(res.filter.assignment).toEqual('fake-assignment'); done(); }); @@ -189,7 +189,7 @@ describe('Activiti Task filter Service', () => { 'status': 200, contentType: 'application/json', responseText: JSON.stringify({ - id: '2233', name: 'FakeNameFilter', filter: { assignment: 'fake-assignement' } + id: '2233', name: 'FakeNameFilter', filter: { assignment: 'fake-assignment' } }) }); }); diff --git a/lib/process-services/task-list/services/tasklist.service.spec.ts b/lib/process-services/task-list/services/tasklist.service.spec.ts index 52175f03a1..ce3643e47f 100644 --- a/lib/process-services/task-list/services/tasklist.service.spec.ts +++ b/lib/process-services/task-list/services/tasklist.service.spec.ts @@ -466,7 +466,7 @@ describe('Activiti TaskList Service', () => { let taskId = '1'; let filterFake = new FilterRepresentationModel({ name: 'FakeNameFilter', - assignment: 'fake-assignement', + assignment: 'fake-assignment', filter: { processDefinitionKey: '1', assignment: 'fake', diff --git a/lib/process-services/task-list/services/tasklist.service.ts b/lib/process-services/task-list/services/tasklist.service.ts index 2a3adee6d7..4f2783ef24 100644 --- a/lib/process-services/task-list/services/tasklist.service.ts +++ b/lib/process-services/task-list/services/tasklist.service.ts @@ -342,7 +342,7 @@ export class TaskListService { } /** - * Unclaims a task for the current user. + * Un-claims a task for the current user. * @param taskId ID of the task to unclaim * @returns Null response notifying when the operation is complete */ diff --git a/package-lock.json b/package-lock.json index fbf9f50e94..b724033f51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,14 @@ "tslib": "^1.9.0" } }, + "@alfresco/adf-process-services-cloud": { + "version": "2.7.0-ccc52d40dd455b8bb2cd2ed9ff7bf67cea57f0bf", + "resolved": "https://registry.npmjs.org/@alfresco/adf-process-services-cloud/-/adf-process-services-cloud-2.7.0-ccc52d40dd455b8bb2cd2ed9ff7bf67cea57f0bf.tgz", + "integrity": "sha512-2Ya2YWYzWGoHWG98nIl3meUNcXb/iSemQYtCxpQtW0AMPLg+bxul5KjfV/frqzlbLDSbn85of9chfaxvZe+BEQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "@angular-devkit/architect": { "version": "0.8.4", "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.8.4.tgz", @@ -3812,6 +3820,15 @@ "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", "dev": true }, + "comment-json": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-1.1.3.tgz", + "integrity": "sha1-aYbDMw/uDEyeAMI5jNYa+l2PI54=", + "dev": true, + "requires": { + "json-parser": "^1.0.0" + } + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -4014,6 +4031,20 @@ "xdg-basedir": "^3.0.0" } }, + "configstore-fork": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/configstore-fork/-/configstore-fork-3.1.6.tgz", + "integrity": "sha512-sQ31B6Ayj9Tqs2nPBrq+2cg8j9sb1Hd6iyqDx2rH+W1EoBDevYAkLk5ncNqktkj7hCeyrUzcNhQ5kUozKXd75A==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, "connect": { "version": "3.6.6", "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", @@ -4330,6 +4361,225 @@ "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", "dev": true }, + "cspell": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-3.1.3.tgz", + "integrity": "sha512-7N+ssYKkeYrwGRGlScUh3HvEePseY7VIHUpQwpMjDCdcRD91hUfuvphJEbvkWY++s4qjIF2w+9ZWcDO06sqPOQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "commander": "^2.15.1", + "comment-json": "^1.1.3", + "configstore-fork": "^3.1.6", + "cspell-dict-cpp": "^1.1.8", + "cspell-dict-django": "^1.0.4", + "cspell-dict-elixir": "^1.0.1", + "cspell-dict-en-gb": "^1.1.2", + "cspell-dict-en_us": "^1.2.5", + "cspell-dict-golang": "^1.1.3", + "cspell-dict-java": "^1.0.3", + "cspell-dict-latex": "^1.0.1", + "cspell-dict-lorem-ipsum": "^1.0.1", + "cspell-dict-php": "^1.0.2", + "cspell-dict-python": "^1.0.3", + "cspell-dict-rust": "^1.0.0", + "cspell-dict-scala": "^1.0.3", + "cspell-lib": "^3.0.2", + "cspell-trie": "^3.0.4", + "fs-extra": "^5.0.0", + "gensequence": "^2.1.1", + "glob": "^7.1.2", + "minimatch": "^3.0.4", + "rxjs": "^6.2.1", + "vscode-uri": "^1.0.5", + "xregexp": "^4.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "xregexp": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.2.0.tgz", + "integrity": "sha512-IyMa7SVe9FyT4WbQVW3b95mTLVceHhLEezQ02+QMvmIqDnKTxk0MLWIQPSW2MXAr1zQb+9yvwYhcyQULneh3wA==", + "dev": true + } + } + }, + "cspell-dict-cpp": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cspell-dict-cpp/-/cspell-dict-cpp-1.1.9.tgz", + "integrity": "sha512-NwKBvGBMzQUwufkCVI8eGxV6s6p0KNU+R6ezT5rD+kFle9qj4eUiGXc89R7u9YaUUPWxtQix6z99JfnzBYywcg==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-django": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/cspell-dict-django/-/cspell-dict-django-1.0.5.tgz", + "integrity": "sha512-Jj37jYSHekOD6Nmb2SBtEh14OMzybhSMRR6OnvXQPkeRwU53NvYlcA38uDpq38p1ZJ2P8tqPaSLesgoLUAwbiA==", + "dev": true, + "requires": { + "configstore": "^3.1.0" + } + }, + "cspell-dict-elixir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cspell-dict-elixir/-/cspell-dict-elixir-1.0.2.tgz", + "integrity": "sha512-ovL/uc9rY+c1kS5yNfK5+bH4FngX7w9EVu0ilo7B2WD0YLaVApyNh+qafQ2ajdjhYo241FQMBLZPtfn0szY6RA==", + "dev": true, + "requires": { + "configstore": "^3.1.0" + } + }, + "cspell-dict-en-gb": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/cspell-dict-en-gb/-/cspell-dict-en-gb-1.1.5.tgz", + "integrity": "sha512-mN2HqC0uO3bokVC2/lfSrxC1XnIpIhDCnonH1GCi7Z8VwgvwnOaafkkahb+iiUYYhpAMRSkogJPB7nJJQjyZ/g==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-en_us": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/cspell-dict-en_us/-/cspell-dict-en_us-1.2.8.tgz", + "integrity": "sha512-nCM05nGjfcnR7jHFkscA+8NyrSNuEo5j238i2cBctjR3wevQ2ts+2oxxKj/XV5RQLUvelnG8pS6JBo6YcmXbUg==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-golang": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/cspell-dict-golang/-/cspell-dict-golang-1.1.6.tgz", + "integrity": "sha512-cOXEiNy7Wl7/pGKbNQ0mSgjoz/LJO32TqHGOBamRiIISx8bebeiJjwdusOxcxyNsI4PAVvAQKKx4A2CJlNhQSQ==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-java": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cspell-dict-java/-/cspell-dict-java-1.0.3.tgz", + "integrity": "sha512-0ZIvoXco3DczG0LSJMWYDCYESjBU9JNPSaVetKwKymQ2TrYi6vk5N18B5TNNRVlRh6hv2hw4DtDB6sz+TyP/yw==", + "dev": true, + "requires": { + "configstore": "^3.1.0" + } + }, + "cspell-dict-latex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cspell-dict-latex/-/cspell-dict-latex-1.0.4.tgz", + "integrity": "sha512-xZCTkG9W8sBYqOO3TejkOIPWMUwpkiu2QsGia9gpmChG976Hi67+BsWRknbbSX1F+gY2ZDYym8Qy2j/FpkQb/w==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-lorem-ipsum": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cspell-dict-lorem-ipsum/-/cspell-dict-lorem-ipsum-1.0.1.tgz", + "integrity": "sha512-r9O2rD1KQN8URw9sAecXfcAAYyt4xr7OpCXHp4ps/Iw9xH/X6eNxigRtOiv7Xl9NhyX9nPDeD9y3RgVsvSr2kQ==", + "dev": true, + "requires": { + "configstore": "^3.1.0" + } + }, + "cspell-dict-php": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/cspell-dict-php/-/cspell-dict-php-1.0.5.tgz", + "integrity": "sha512-K1YXDXucVPHZ3nNGQQC4m3YJ3FMNcVYn1FxX6fIS6n2Snm1MAiHBsMyAh58n2phhejEuQUEXg7bX61ARe0baqw==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-python": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cspell-dict-python/-/cspell-dict-python-1.0.6.tgz", + "integrity": "sha512-yb4PyF/7pI5l58Wz3qvUKSPapChqQJB7cSOGhYz/nIyT3TPGtd0qQhd5l5eTsfkp7tNsagCaBX51PUJ2feMVYg==", + "dev": true, + "requires": { + "configstore": "^3.1.2" + } + }, + "cspell-dict-rust": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cspell-dict-rust/-/cspell-dict-rust-1.0.3.tgz", + "integrity": "sha512-31Ujs2CzyEEu8XUlY+TzDreuaAd4FQ9jnGgOT1AVK6bkcuTdoB6OZh4H2TY1QgbbmkNn77YXTFyD3YxtMt72zg==", + "dev": true, + "requires": { + "configstore": "^3.1.0" + } + }, + "cspell-dict-scala": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cspell-dict-scala/-/cspell-dict-scala-1.0.3.tgz", + "integrity": "sha512-kYcnQcLk042pTn9EGyOEM9bZXZ/6NAnGKb/IhRJiF2+iStHm5u1jBMeTuHqiU4hOPDbVcE6lK6pZv7lDYQPNZA==", + "dev": true, + "requires": { + "configstore": "^3.1.0" + } + }, + "cspell-lib": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-3.0.4.tgz", + "integrity": "sha512-EVmoSqLS743+0lBCz260jpRUKM1K1OQg46saQb0v3b/jlalzlXH9R0pcm7T3/8rgS5IZwls4+E7acpLMPk8uLQ==", + "dev": true, + "requires": { + "iconv-lite": "^0.4.24", + "rxjs-stream": "^3.0.1" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, + "cspell-trie": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/cspell-trie/-/cspell-trie-3.0.7.tgz", + "integrity": "sha512-ASunLF5cb9qr8aLw23mcD6150Ipcn3c2pGcbIgN6Qoenk12An3JYZIi9+SLDvsf/LgPFa+EccUiFw1ox+WpvKg==", + "dev": true, + "requires": { + "commander": "^2.18.0", + "cspell-lib": "^3.0.4", + "fs-extra": "^7.0.0", + "gensequence": "^2.1.1", + "hunspell-reader": "^2.0.3", + "rxjs": "^6.3.3", + "rxjs-stream": "^3.0.1" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", + "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, "css-parse": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", @@ -6815,6 +7065,12 @@ "is-property": "^1.0.0" } }, + "gensequence": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-2.1.1.tgz", + "integrity": "sha512-AyZrG5Qq8Tn0qnaDCnH2n9TsWnJLKBXEa2FcUlHWfEgl1rRS3MbcvB4OsarxyEekx/PwYlyKXvjQwNvYsByXAw==", + "dev": true + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -7731,6 +7987,33 @@ "debug": "^3.1.0" } }, + "hunspell-reader": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hunspell-reader/-/hunspell-reader-2.0.4.tgz", + "integrity": "sha512-I6xc5hQzR1hTcQy6eAG68Rgp4BKID6vasTOZvC6uin6IbE0Y4ewflf8xU1EsjJXy2MT6QM1I6oXgd6A59GGZng==", + "dev": true, + "requires": { + "commander": "^2.18.0", + "cspell-lib": "^3.0.4", + "fs-extra": "^7.0.0", + "gensequence": "^2.1.1", + "rxjs": "^6.3.3", + "rxjs-stream": "^3.0.1" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", + "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, "iconv-lite": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", @@ -8851,6 +9134,15 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, + "json-parser": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/json-parser/-/json-parser-1.1.5.tgz", + "integrity": "sha1-5i7FJh0aal/CDoEqMgdAxtkAVnc=", + "dev": true, + "requires": { + "esprima": "^2.7.0" + } + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -13719,6 +14011,12 @@ "tslib": "^1.9.0" } }, + "rxjs-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rxjs-stream/-/rxjs-stream-3.0.1.tgz", + "integrity": "sha512-KZ+B7MWw2mygAsLJJ+mjYkCXHtSeYRXWhUVQBQRX4NgBmEiAEGAmVz7epY+8Gj0REL22W0T8ZbysFbzI/76ikA==", + "dev": true + }, "rxjs-tslint-rules": { "version": "4.10.0", "resolved": "https://registry.npmjs.org/rxjs-tslint-rules/-/rxjs-tslint-rules-4.10.0.tgz", @@ -16655,6 +16953,12 @@ "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", "dev": true }, + "vscode-uri": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz", + "integrity": "sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww==", + "dev": true + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", diff --git a/package.json b/package.json index b879f4277a..23335ed48a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "clean-lock": "rimraf package-lock.json", "webpack": "node ./node_modules/webpack/bin/webpack.js", "ng-packagr": "node ./node_modules/ng-packagr/cli/main.js", - "lite-server-e2e": "lite-server --baseDir='demo-shell/dist/' -c ./e2e/lite-server-proxy.js" + "lite-server-e2e": "lite-server --baseDir='demo-shell/dist/' -c ./e2e/lite-server-proxy.js", + "spellcheck": "cspell 'demo-shell/{src,e2e}/**/*.ts' 'e2e/**/*.ts' 'lib/{content-services,core,extensions,insights,process-services}/**/*.ts'" }, "config": { "ghooks": { @@ -119,6 +120,7 @@ "commander": "^2.15.1", "concurrently": "^3.5.1", "connect-history-api-fallback": "^1.5.0", + "cspell": "^3.1.3", "ejs": "^2.6.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", "fs-extra": "^4.0.2",