mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-3278] Header - extension actions not visible (#1462)
* custom toolbar actions theme * update tests
This commit is contained in:
parent
03a1a5c0e9
commit
7b0ce29000
@ -24,9 +24,49 @@
|
||||
*/
|
||||
|
||||
import { AppHeaderComponent } from './header.component';
|
||||
import { AppState } from '@alfresco/aca-shared/store';
|
||||
import { of } from 'rxjs';
|
||||
import { async } from '@angular/core/testing';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
|
||||
describe('AppHeaderComponent', () => {
|
||||
it('should be defined', () => {
|
||||
expect(AppHeaderComponent).toBeDefined();
|
||||
let component: AppHeaderComponent;
|
||||
|
||||
const actions = [
|
||||
{ id: 'action-1', type: 'button' },
|
||||
{ id: 'action-2', type: 'button' }
|
||||
] as Array<ContentActionRef>;
|
||||
|
||||
const store = {
|
||||
select: jasmine.createSpy('select')
|
||||
} as any;
|
||||
|
||||
const appExtensionService = {
|
||||
getHeaderActions: () => actions
|
||||
} as any;
|
||||
|
||||
const app = {
|
||||
headerColor: 'some-color',
|
||||
appName: 'name',
|
||||
logoPath: 'some/path'
|
||||
} as AppState;
|
||||
|
||||
beforeEach(() => {
|
||||
store.select.and.callFake(memoizeFn => {
|
||||
return of(memoizeFn({ app }));
|
||||
});
|
||||
|
||||
component = new AppHeaderComponent(store, appExtensionService);
|
||||
});
|
||||
|
||||
it('should set header color, name and logo', async(() => {
|
||||
component.appName$.subscribe(val => expect(val).toBe(app.appName));
|
||||
component.logo$.subscribe(val => expect(val).toBe(app.logoPath));
|
||||
component.headerColor$.subscribe(val => expect(val).toBe(app.headerColor));
|
||||
}));
|
||||
|
||||
it('should get header actions', () => {
|
||||
component.ngOnInit();
|
||||
expect(component.actions).toEqual(actions);
|
||||
});
|
||||
});
|
||||
|
@ -0,0 +1,9 @@
|
||||
@mixin toolbar-actions-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
||||
app-toolbar-button,
|
||||
app-toolbar-menu,
|
||||
adf-dynamic-component {
|
||||
color: mat-color($foreground, text, 0.72);
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@
|
||||
@import '../components/create-menu/create-menu.component.scss';
|
||||
@import '../components/layout/layout.theme.scss';
|
||||
@import '../dialogs/node-template/create-from-template.dialog.scss';
|
||||
@import '../components/toolbar/toolbar-action/toolbar-actions.component.scss';
|
||||
|
||||
@import './overrides/adf-style-fixes.theme';
|
||||
|
||||
@ -50,6 +51,7 @@ $warn: map-get($custom-theme, warn);
|
||||
@include aca-custom-name-column-theme($theme);
|
||||
@include app-create-from-template-theme($theme);
|
||||
@include app-create-menu-theme($theme);
|
||||
@include toolbar-actions-theme($theme);
|
||||
@include adf-style-fixes($theme);
|
||||
|
||||
.mat-toolbar {
|
||||
|
Loading…
x
Reference in New Issue
Block a user