mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-5637] Remove SCSS mixins and use CSS variables (#7250)
* remove default-class mixin and use regular import * cleanup colors * remove variables file, fix bugs in animations * proper ordering of imports, core css vars * cleanup snackbar and material themes * tags component * login component styles * app login * toolbar component styles * breadcrumb styles * dropdown breadcrumb * app layout component * demo shell: files component * aspect list styles * content metadata styles * node selector * name location cell * node share dialog * content type dialog * folder dialog * document list * datatable theme * pagination theme * viewer theme * viewer theme * user-info theme * container widget * dynamic table theme * form widgets * form theme * form renderer * sidebar menu * header theme * info drawer theme * comment list * commens and layout container * sidenav layout * empty content * error content * clipboard theme * search input * tooltip card and notification history * card view theme * remove unused keys * add permission dialog * search and permission dialogs * version comparison and column themes * upload drag area and cleanup references * remove the need for content styles * insight components * cleanup insights theme * process components * process components * process cloud themes * cleanup unsed imports * cleanup mixins * update build scripts * test fixes * remove fdescribe * css fixes * update unit tests
This commit is contained in:
@@ -20,7 +20,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatTabChangeEvent } from '@angular/material/tabs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { InfoDrawerComponent } from './info-drawer.component';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
@@ -31,14 +30,13 @@ describe('InfoDrawerComponent', () => {
|
||||
let fixture: ComponentFixture<InfoDrawerComponent>;
|
||||
let translateService: TranslateService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
translateService = TestBed.inject(TranslateService);
|
||||
spyOn(translateService, 'get').and.callFake((key) => of(key));
|
||||
|
||||
@@ -89,17 +87,16 @@ describe('Custom InfoDrawer', () => {
|
||||
let component: CustomInfoDrawerComponent;
|
||||
let translateService: TranslateService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
CustomInfoDrawerComponent
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
CustomInfoDrawerComponent
|
||||
]
|
||||
});
|
||||
translateService = TestBed.inject(TranslateService);
|
||||
spyOn(translateService, 'get').and.callFake((key) => of(key));
|
||||
|
||||
@@ -108,6 +105,10 @@ describe('Custom InfoDrawer', () => {
|
||||
component = fixture.componentInstance;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
it('should render the title', () => {
|
||||
fixture.detectChanges();
|
||||
const title: any = fixture.debugElement.queryAll(By.css('[info-drawer-title]'));
|
||||
@@ -119,7 +120,7 @@ describe('Custom InfoDrawer', () => {
|
||||
fixture.detectChanges();
|
||||
const tab: any = fixture.debugElement.queryAll(By.css('.mat-tab-label-active'));
|
||||
expect(tab.length).toBe(1);
|
||||
expect(tab[0].nativeElement.innerText).toContain('Tab1');
|
||||
expect(tab[0].nativeElement.innerText).toContain('TAB1');
|
||||
});
|
||||
|
||||
it('should select the tab 2 (index 1)', () => {
|
||||
@@ -127,7 +128,7 @@ describe('Custom InfoDrawer', () => {
|
||||
fixture.detectChanges();
|
||||
const tab: any = fixture.debugElement.queryAll(By.css('.mat-tab-label-active'));
|
||||
expect(tab.length).toBe(1);
|
||||
expect(tab[0].nativeElement.innerText).toContain('Tab2');
|
||||
expect(tab[0].nativeElement.innerText).toContain('TAB2');
|
||||
});
|
||||
|
||||
it('should render a tab with icon', () => {
|
||||
@@ -135,7 +136,7 @@ describe('Custom InfoDrawer', () => {
|
||||
fixture.detectChanges();
|
||||
const tab: any = fixture.debugElement.queryAll(By.css('.mat-tab-label-active'));
|
||||
expect(tab[0].nativeElement.innerText).not.toBe('Tab3');
|
||||
expect(tab[0].nativeElement.innerText).toContain('tab-icon');
|
||||
expect(tab[0].nativeElement.innerText).toContain('TAB-ICON');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -153,17 +154,16 @@ describe('Header visibility InfoDrawer', () => {
|
||||
let fixture: ComponentFixture<VisibilityInfoDrawerComponent>;
|
||||
let component: VisibilityInfoDrawerComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
VisibilityInfoDrawerComponent
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
VisibilityInfoDrawerComponent
|
||||
]
|
||||
});
|
||||
fixture = TestBed.createComponent(VisibilityInfoDrawerComponent);
|
||||
fixture.detectChanges();
|
||||
component = fixture.componentInstance;
|
||||
|
Reference in New Issue
Block a user