{"action":"created","comment":{"url":"https://api.github.com/repos/dotCMS/core-web/pulls/comments/184190382","pull_request_review_id":115335503,"id":184190382,"diff_hunk":"@@ -0,0 +1,93 @@\n+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n+import { By } from '@angular/platform-browser';\n+import { Component, DebugElement } from '@angular/core';\n+import { ComponentFixture, fakeAsync, tick } from '@angular/core/testing';\n+import { DOTTestBed } from '../../../../../test/dot-test-bed';\n+import { DotContainerSelectorModule } from '../../../../../view/components/dot-container-selector/dot-container-selector.module';\n+import { DotEditLayoutSidebarComponent } from './dot-edit-layout-sidebar.component';\n+import { DotEditLayoutService } from '../../../shared/services/dot-edit-layout.service';\n+import { DotEventsService } from '../../../../../api/services/dot-events/dot-events.service';\n+import { DotLayoutSideBar } from '../../../shared/models/dot-layout-sidebar.model';\n+import { FormControl, FormGroup } from '@angular/forms';\n+import { DotMessageService } from '../../../../../api/services/dot-messages-service';\n+import { MockDotMessageService } from '../../../../../test/dot-message-service.mock';\n+import { TemplateContainersCacheService } from '../../../template-containers-cache.service';\n+import { DotSidebarPropertiesModule } from '../dot-sidebar-properties/dot-sidebar-properties.module';\n+import { mockDotContainers } from '../../../../../test/dot-rendered-page.mock';\n+\n+let fakeValue: DotLayoutSideBar;\n+\n+@Component({\n+    selector: 'dot-test-host-component',\n+    template: `<form [formGroup]=\"form\">\n+                    <dot-edit-layout-sidebar formControlName=\"sidebar\"></dot-edit-layout-sidebar>\n+                </form>`\n+})\n+class TestHostComponent {\n+    form: FormGroup;\n+    constructor() {\n+        this.form = new FormGroup({\n+            sidebar: new FormControl(fakeValue)\n+        });\n+    }\n+}\n+\n+describe('DotEditLayoutSidebarComponent', () => {\n+    let component: DotEditLayoutSidebarComponent;\n+    let de: DebugElement;\n+    let hostComponentfixture: ComponentFixture<TestHostComponent>;\n+\n+    beforeEach(() => {\n+        fakeValue = {\n+            containers: [],\n+            location: 'left',\n+            width: 'small'\n+        };\n+\n+        const messageServiceMock = new MockDotMessageService({\n+            'editpage.layout.designer.sidebar': 'Sidebar'\n+        });\n+\n+        DOTTestBed.configureTestingModule({\n+            declarations: [DotEditLayoutSidebarComponent, TestHostComponent],\n+            imports: [DotContainerSelectorModule, BrowserAnimationsModule, DotSidebarPropertiesModule],\n+            providers: [\n+                DotEditLayoutService,\n+                TemplateContainersCacheService,\n+                { provide: DotMessageService, useValue: messageServiceMock }\n+            ]\n+        });\n+\n+        hostComponentfixture = DOTTestBed.createComponent(TestHostComponent);\n+        de = hostComponentfixture.debugElement.query(By.css('dot-edit-layout-sidebar'));\n+        component = hostComponentfixture.debugElement.query(By.css('dot-edit-layout-sidebar')).componentInstance;\n+        hostComponentfixture.detectChanges();\n+    });\n+\n+    it('should have the right header for the Sidebar Header', () => {\n+        const headerSelector = de.query(By.css('h6'));\n+        expect(headerSelector.nativeElement.outerText).toBe('Sidebar');\n+    });\n+\n+    it('should transform containers raw data into proper data to be saved in the BE', () => {\n+        const transformedValue = {\n+            containers: [\n+                {\n+                    identifier: mockDotContainers[0].container.identifier,\n+                    uuid: undefined","path":"src/app/portlets/dot-edit-page/layout/components/dot-edit-layout-sidebar/dot-edit-layout-sidebar.component.spec.ts","position":99,"original_position":77,"commit_id":"597f0244791a869204a9aa29907b4592fa0d77dc","original_commit_id":"d68219aa32cf901e080fcc46fe32ce4157ec629e","user":{"login":"alfredo-dotcms","id":37185433,"avatar_url":"https://avatars0.githubusercontent.com/u/37185433?v=4","gravatar_id":"","url":"https://api.github.com/users/alfredo-dotcms","html_url":"https://github.com/alfredo-dotcms","followers_url":"https://api.github.com/users/alfredo-dotcms/followers","following_url":"https://api.github.com/users/alfredo-dotcms/following{/other_user}","gists_url":"https://api.github.com/users/alfredo-dotcms/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredo-dotcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredo-dotcms/subscriptions","organizations_url":"https://api.github.com/users/alfredo-dotcms/orgs","repos_url":"https://api.github.com/users/alfredo-dotcms/repos","events_url":"https://api.github.com/users/alfredo-dotcms/events{/privacy}","received_events_url":"https://api.github.com/users/alfredo-dotcms/received_events","type":"User","site_admin":false},"body":"according @freddyucv this field needs to still be present in the model, the only difference is that the value is generated in the BE","created_at":"2018-04-25T20:09:06Z","updated_at":"2018-04-25T20:09:06Z","html_url":"https://github.com/dotCMS/core-web/pull/627#discussion_r184190382","pull_request_url":"https://api.github.com/repos/dotCMS/core-web/pulls/627","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotCMS/core-web/pulls/comments/184190382"},"html":{"href":"https://github.com/dotCMS/core-web/pull/627#discussion_r184190382"},"pull_request":{"href":"https://api.github.com/repos/dotCMS/core-web/pulls/627"}},"in_reply_to_id":183889916},"pull_request":{"url":"https://api.github.com/repos/dotCMS/core-web/pulls/627","id":182794106,"html_url":"https://github.com/dotCMS/core-web/pull/627","diff_url":"https://github.com/dotCMS/core-web/pull/627.diff","patch_url":"https://github.com/dotCMS/core-web/pull/627.patch","issue_url":"https://api.github.com/repos/dotCMS/core-web/issues/627","number":627,"state":"open","locked":false,"title":"Issue 13944 add container selector to the sidebar in the layout editor","user":{"login":"alfredo-dotcms","id":37185433,"avatar_url":"https://avatars0.githubusercontent.com/u/37185433?v=4","gravatar_id":"","url":"https://api.github.com/users/alfredo-dotcms","html_url":"https://github.com/alfredo-dotcms","followers_url":"https://api.github.com/users/alfredo-dotcms/followers","following_url":"https://api.github.com/users/alfredo-dotcms/following{/other_user}","gists_url":"https://api.github.com/users/alfredo-dotcms/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredo-dotcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredo-dotcms/subscriptions","organizations_url":"https://api.github.com/users/alfredo-dotcms/orgs","repos_url":"https://api.github.com/users/alfredo-dotcms/repos","events_url":"https://api.github.com/users/alfredo-dotcms/events{/privacy}","received_events_url":"https://api.github.com/users/alfredo-dotcms/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-19T14:25:55Z","updated_at":"2018-04-25T20:09:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec675774436fad9099b0d0d05902836f887851b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotCMS/core-web/pulls/627/commits","review_comments_url":"https://api.github.com/repos/dotCMS/core-web/pulls/627/comments","review_comment_url":"https://api.github.com/repos/dotCMS/core-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotCMS/core-web/issues/627/comments","statuses_url":"https://api.github.com/repos/dotCMS/core-web/statuses/597f0244791a869204a9aa29907b4592fa0d77dc","head":{"label":"dotCMS:issue-13944-add-container-selector-to-the-sidebar-in-the-layout-editor","ref":"issue-13944-add-container-selector-to-the-sidebar-in-the-layout-editor","sha":"597f0244791a869204a9aa29907b4592fa0d77dc","user":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":36376350,"name":"core-web","full_name":"dotCMS/core-web","owner":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotCMS/core-web","description":"dotCMS UI","fork":false,"url":"https://api.github.com/repos/dotCMS/core-web","forks_url":"https://api.github.com/repos/dotCMS/core-web/forks","keys_url":"https://api.github.com/repos/dotCMS/core-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotCMS/core-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotCMS/core-web/teams","hooks_url":"https://api.github.com/repos/dotCMS/core-web/hooks","issue_events_url":"https://api.github.com/repos/dotCMS/core-web/issues/events{/number}","events_url":"https://api.github.com/repos/dotCMS/core-web/events","assignees_url":"https://api.github.com/repos/dotCMS/core-web/assignees{/user}","branches_url":"https://api.github.com/repos/dotCMS/core-web/branches{/branch}","tags_url":"https://api.github.com/repos/dotCMS/core-web/tags","blobs_url":"https://api.github.com/repos/dotCMS/core-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotCMS/core-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotCMS/core-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotCMS/core-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotCMS/core-web/statuses/{sha}","languages_url":"https://api.github.com/repos/dotCMS/core-web/languages","stargazers_url":"https://api.github.com/repos/dotCMS/core-web/stargazers","contributors_url":"https://api.github.com/repos/dotCMS/core-web/contributors","subscribers_url":"https://api.github.com/repos/dotCMS/core-web/subscribers","subscription_url":"https://api.github.com/repos/dotCMS/core-web/subscription","commits_url":"https://api.github.com/repos/dotCMS/core-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotCMS/core-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotCMS/core-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotCMS/core-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotCMS/core-web/contents/{+path}","compare_url":"https://api.github.com/repos/dotCMS/core-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotCMS/core-web/merges","archive_url":"https://api.github.com/repos/dotCMS/core-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotCMS/core-web/downloads","issues_url":"https://api.github.com/repos/dotCMS/core-web/issues{/number}","pulls_url":"https://api.github.com/repos/dotCMS/core-web/pulls{/number}","milestones_url":"https://api.github.com/repos/dotCMS/core-web/milestones{/number}","notifications_url":"https://api.github.com/repos/dotCMS/core-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotCMS/core-web/labels{/name}","releases_url":"https://api.github.com/repos/dotCMS/core-web/releases{/id}","deployments_url":"https://api.github.com/repos/dotCMS/core-web/deployments","created_at":"2015-05-27T15:26:16Z","updated_at":"2018-04-25T15:06:14Z","pushed_at":"2018-04-25T20:06:33Z","git_url":"git://github.com/dotCMS/core-web.git","ssh_url":"git@github.com:dotCMS/core-web.git","clone_url":"https://github.com/dotCMS/core-web.git","svn_url":"https://github.com/dotCMS/core-web","homepage":"https://dotcms.com","size":9839,"stargazers_count":5,"watchers_count":5,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":3,"open_issues":12,"watchers":5,"default_branch":"master"}},"base":{"label":"dotCMS:master","ref":"master","sha":"e7c0a3d8a20ee927736960fd6121b3e172feb6a1","user":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":36376350,"name":"core-web","full_name":"dotCMS/core-web","owner":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotCMS/core-web","description":"dotCMS UI","fork":false,"url":"https://api.github.com/repos/dotCMS/core-web","forks_url":"https://api.github.com/repos/dotCMS/core-web/forks","keys_url":"https://api.github.com/repos/dotCMS/core-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotCMS/core-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotCMS/core-web/teams","hooks_url":"https://api.github.com/repos/dotCMS/core-web/hooks","issue_events_url":"https://api.github.com/repos/dotCMS/core-web/issues/events{/number}","events_url":"https://api.github.com/repos/dotCMS/core-web/events","assignees_url":"https://api.github.com/repos/dotCMS/core-web/assignees{/user}","branches_url":"https://api.github.com/repos/dotCMS/core-web/branches{/branch}","tags_url":"https://api.github.com/repos/dotCMS/core-web/tags","blobs_url":"https://api.github.com/repos/dotCMS/core-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotCMS/core-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotCMS/core-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotCMS/core-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotCMS/core-web/statuses/{sha}","languages_url":"https://api.github.com/repos/dotCMS/core-web/languages","stargazers_url":"https://api.github.com/repos/dotCMS/core-web/stargazers","contributors_url":"https://api.github.com/repos/dotCMS/core-web/contributors","subscribers_url":"https://api.github.com/repos/dotCMS/core-web/subscribers","subscription_url":"https://api.github.com/repos/dotCMS/core-web/subscription","commits_url":"https://api.github.com/repos/dotCMS/core-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotCMS/core-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotCMS/core-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotCMS/core-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotCMS/core-web/contents/{+path}","compare_url":"https://api.github.com/repos/dotCMS/core-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotCMS/core-web/merges","archive_url":"https://api.github.com/repos/dotCMS/core-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotCMS/core-web/downloads","issues_url":"https://api.github.com/repos/dotCMS/core-web/issues{/number}","pulls_url":"https://api.github.com/repos/dotCMS/core-web/pulls{/number}","milestones_url":"https://api.github.com/repos/dotCMS/core-web/milestones{/number}","notifications_url":"https://api.github.com/repos/dotCMS/core-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotCMS/core-web/labels{/name}","releases_url":"https://api.github.com/repos/dotCMS/core-web/releases{/id}","deployments_url":"https://api.github.com/repos/dotCMS/core-web/deployments","created_at":"2015-05-27T15:26:16Z","updated_at":"2018-04-25T15:06:14Z","pushed_at":"2018-04-25T20:06:33Z","git_url":"git://github.com/dotCMS/core-web.git","ssh_url":"git@github.com:dotCMS/core-web.git","clone_url":"https://github.com/dotCMS/core-web.git","svn_url":"https://github.com/dotCMS/core-web","homepage":"https://dotcms.com","size":9839,"stargazers_count":5,"watchers_count":5,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":3,"open_issues":12,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotCMS/core-web/pulls/627"},"html":{"href":"https://github.com/dotCMS/core-web/pull/627"},"issue":{"href":"https://api.github.com/repos/dotCMS/core-web/issues/627"},"comments":{"href":"https://api.github.com/repos/dotCMS/core-web/issues/627/comments"},"review_comments":{"href":"https://api.github.com/repos/dotCMS/core-web/pulls/627/comments"},"review_comment":{"href":"https://api.github.com/repos/dotCMS/core-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotCMS/core-web/pulls/627/commits"},"statuses":{"href":"https://api.github.com/repos/dotCMS/core-web/statuses/597f0244791a869204a9aa29907b4592fa0d77dc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alfredo-dotcms"}}