[ADF-4298] Add e2e tests for info drawer (#4506)

* [ADF-4298] Add e2e tests for info drawer

* Update info-drawer.component.e2e.ts

* Update info-drawer.component.e2e.ts
This commit is contained in:
davidcanonieto
2019-03-27 16:08:45 +00:00
committed by Eugenio Romano
parent b35fb4df93
commit 31280baeef
4 changed files with 161 additions and 1 deletions

View File

@@ -105,7 +105,7 @@
<ng-template let-node="node" #sidebarLeftTemplate>
<adf-info-drawer [title]="'Viewer Options'">
<adf-info-drawer-tab [label]="">
<adf-info-drawer-tab [label]="'Settings'">
<p class="toggle">
<mat-slide-toggle
id="adf-switch-custoname"
@@ -248,6 +248,16 @@
</mat-slide-toggle>
</p>
<p class="toggle">
<mat-slide-toggle
id="adf-show-tab-with-icon"
[color]="'primary'"
(change)="toggleShowInfoDrawerTabIcon()"
[checked]="showInfoDrawerTabWithIcon">
Show info drawer tab con
</mat-slide-toggle>
</p>
<p class="toggle">
<button mat-raised-button id="adf-switch-showrightsidebar" (click)="toggleShowRightSidebar()" color="primary">
Toggle Right Sidebar
@@ -262,6 +272,13 @@
</adf-info-drawer-tab>
<adf-info-drawer-tab
*ngIf="showInfoDrawerTabWithIcon"
[label]="'Settings'"
[icon]="'comment'"
data-automation-id="adf-settings-tab">
</adf-info-drawer-tab>
</adf-info-drawer>
</ng-template>

View File

@@ -53,6 +53,7 @@ export class FileViewComponent implements OnInit {
showRightSidebar = false;
customToolbar = false;
isCommentEnabled = false;
showInfoDrawerTabWithIcon = false;
constructor(private router: Router,
private route: ActivatedRoute,
@@ -145,6 +146,10 @@ export class FileViewComponent implements OnInit {
this.allowLeftSidebar = !this.allowLeftSidebar;
}
toggleShowInfoDrawerTabIcon() {
this.showInfoDrawerTabWithIcon = !this.showInfoDrawerTabWithIcon;
}
toggleCustomName() {
this.customName = !this.customName;