@angular/material/snack-bar#MatSnackBarModule TypeScript Examples

The following examples show how to use @angular/material/snack-bar#MatSnackBarModule. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: docs.module.ts    From open-source with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    CommonModule,
    HttpClientModule,
    FlexLayoutModule,
    RouterModule.forChild(routes),
    MatButtonModule,
    MatIconModule,
    MatTabsModule,
    MatExpansionModule,
    MatListModule,
    MatSnackBarModule,
    MatTooltipModule,
    LayoutModule,
  ],
  declarations: [
    LayoutComponent,
    ContentComponent,
    ExampleComponent,
    ViewerComponent,
    StackblitzComponent,
  ],
  providers: [
    ContentService,
  ],
})
export class DocsModule {}
Example #2
Source File: app.module.ts    From angular-9-firebase-chat-example with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    LoginComponent,
    RoomlistComponent,
    AddroomComponent,
    ChatroomComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    FormsModule,
    ReactiveFormsModule,
    MatInputModule,
    MatIconModule,
    MatCardModule,
    MatFormFieldModule,
    MatTableModule,
    MatProgressSpinnerModule,
    MatSortModule,
    MatSnackBarModule,
    MatSidenavModule
  ],
  providers: [DatePipe],
  bootstrap: [AppComponent]
})
export class AppModule { }
Example #3
Source File: add-edit-expense.module.ts    From fyle-mobile-app with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    MatIconModule,
    AddEditExpensePageRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    MatFormFieldModule,
    MatInputModule,
    MatRippleModule,
    MatDatepickerModule,
    MatNativeDateModule,
    MatCheckboxModule,
    SharedModule,
    PinchZoomModule,
    PdfViewerModule,
    MatButtonModule,
    MatSnackBarModule,
  ],
  declarations: [
    AddEditExpensePage,
    FyCurrencyComponent,
    FyCurrencyChooseCurrencyComponent,
    FyCurrencyExchangeRateComponent,
    PolicyViolationComponent,
    CameraOptionsPopupComponent,
    MatchTransactionComponent,
    SuggestedDuplicatesComponent,
  ],
})
export class AddEditExpensePageModule {}
Example #4
Source File: app.module.ts    From leapp with Mozilla Public License 2.0 6 votes vote down vote up
@NgModule({
  declarations: [AppComponent, TrayMenuComponent],
  imports: [
    ComponentsModule,
    MatSnackBarModule,
    BrowserModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    HttpClientModule,
    FormsModule,
    ReactiveFormsModule,
    NgSelectModule,
    LayoutModule,
    TooltipModule.forRoot(),
    ModalModule.forRoot(),
    ToastrModule.forRoot(),
  ],
  entryComponents: [ConfirmationDialogComponent, InputDialogComponent],
  providers: [{ provide: ErrorHandler, useClass: ErrorService }],
  bootstrap: [AppComponent],
})
export class AppModule {}
Example #5
Source File: material.module.ts    From capture-lite with GNU General Public License v3.0 6 votes vote down vote up
modules = [
  MatCheckboxModule,
  MatButtonModule,
  MatInputModule,
  MatAutocompleteModule,
  MatDatepickerModule,
  MatFormFieldModule,
  MatRadioModule,
  MatSelectModule,
  MatSliderModule,
  MatSlideToggleModule,
  MatMenuModule,
  MatSidenavModule,
  MatToolbarModule,
  MatListModule,
  MatGridListModule,
  MatCardModule,
  MatStepperModule,
  MatTabsModule,
  MatExpansionModule,
  MatButtonToggleModule,
  MatChipsModule,
  MatIconModule,
  MatProgressSpinnerModule,
  MatProgressBarModule,
  MatDialogModule,
  MatTooltipModule,
  MatSnackBarModule,
  MatTableModule,
  MatSortModule,
  MatPaginatorModule,
  MatBadgeModule,
  MatBottomSheetModule,
]
Example #6
Source File: angular-material.module.ts    From detection-app with MIT License 6 votes vote down vote up
materialModules = [
  MatToolbarModule,
  MatButtonModule,
  MatIconModule,
  MatDialogModule,
  MatSnackBarModule,
  MatProgressSpinnerModule,
  MatMenuModule,
  MatTooltipModule,
  MatSidenavModule,
  MatListModule,
  MatFormFieldModule,
  MatCheckboxModule,
  BrowserAnimationsModule
]
Example #7
Source File: capture_profile_module.ts    From profiler with Apache License 2.0 6 votes vote down vote up
/** A capture profile view module. */
@NgModule({
  declarations: [CaptureProfile],
  imports: [
    CommonModule,
    MatButtonModule,
    MatDialogModule,
    MatProgressSpinnerModule,
    CaptureProfileDialogModule,
    MatSnackBarModule,
  ],
  exports: [CaptureProfile],
  entryComponents: [CaptureProfileDialog],
})
export class CaptureProfileModule {
}
Example #8
Source File: commands.component.spec.ts    From 6PG-Dashboard with MIT License 6 votes vote down vote up
describe('CommandsComponent', () => {
  let component: CommandsComponent;
  let fixture: ComponentFixture<CommandsComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ CommandsComponent ],
      imports: [ HttpClientModule, MatSnackBarModule ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(CommandsComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #9
Source File: pipeline-item.component.spec.ts    From HeartBeat with MIT License 6 votes vote down vote up
describe('PipelineItemComponent', () => {
  let component: PipelineItemComponent;
  let fixture: ComponentFixture<PipelineItemComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [HttpClientTestingModule, MatSnackBarModule, MatSelectModule, BrowserAnimationsModule],
      declarations: [PipelineItemComponent],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(PipelineItemComponent);
    component = fixture.componentInstance;
    component.metricsForm = new FormGroup({
      test: new FormArray([]),
    });
    component.formArrayName = 'test';
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #10
Source File: shared.module.ts    From angular-communities with MIT License 6 votes vote down vote up
MATERIAL_MODULES = [
  MatInputModule,
  MatButtonModule,
  MatFormFieldModule,
  MatSelectModule,
  MatIconModule,
  MatCardModule,
  MatToolbarModule,
  MatProgressSpinnerModule,
  MatSnackBarModule,
  MatPaginatorModule,
  MatGridListModule,
  MatSidenavModule,
  MatAutocompleteModule,
  MatDividerModule,
  ScrollingModule,
  MatChipsModule,
  ClipboardModule
]
Example #11
Source File: material.module.ts    From WiLearning with GNU Affero General Public License v3.0 6 votes vote down vote up
@NgModule({
  exports: [
    MatSelectModule,
    MatAutocompleteModule,
    MatCardModule,
    MatCheckboxModule,
    MatDatepickerModule,
    MatDialogModule,
    MatGridListModule,
    MatIconModule,
    MatListModule,
    MatMenuModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatRadioModule,
    MatInputModule,
    MatRippleModule,
    MatDividerModule,
    MatExpansionModule,
    MatTableModule,
    MatPaginatorModule,
    MatSortModule,
    MatBadgeModule
  ]
})
export class MaterialComponentsModule {}
Example #12
Source File: material.module.ts    From bitcoin-s-ts with MIT License 6 votes vote down vote up
materialModules = [
  MatBadgeModule,
  MatBottomSheetModule,
  MatButtonModule,
  MatButtonToggleModule,
  MatCheckboxModule,
  MatExpansionModule,
  MatDatepickerModule,
  MatDialogModule, // For focus
  MatFormFieldModule,
  MatIconModule,
  MatInputModule,
  MatMenuModule,
  MatNativeDateModule,
  MatOptionModule,
  MatProgressSpinnerModule,
  MatSelectModule,
  MatSidenavModule,
  MatSlideToggleModule,
  MatSnackBarModule,
  MatSortModule,
  MatProgressSpinnerModule,
  MatRadioModule,
  MatTableModule,
  MatToolbarModule,
  MatTooltipModule,
]
Example #13
Source File: app.module.ts    From testube with GNU General Public License v3.0 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    DashComponent,
    AboutComponent,
    ToolbarComponent,
    FooterComponent,
    LogoComponent,
    CardComponent,
    DonateComponent,
    DebugComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    MatToolbarModule,
    MatButtonModule,
    MatCardModule,
    MatSnackBarModule,
    MatFormFieldModule,
    MatInputModule,
    MatSliderModule,
    FormsModule,
    MatTooltipModule,
    MatIconModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Example #14
Source File: item.module.ts    From VIR with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [ItemComponent],
  imports: [
    CommonModule,
    MatIconModule,
    MatButtonModule,
    SessionChipModule,
    MatCheckboxModule,
    FormsModule,
    SharedModule,
    MatSnackBarModule,
    MatTooltipModule,
    MatMenuModule,
  ],
  exports: [ItemComponent],
})
export class ItemModule {
}
Example #15
Source File: app-material.module.ts    From barista with Apache License 2.0 6 votes vote down vote up
expose = [
  BrowserAnimationsModule,
  MatButtonModule,
  MatButtonToggleModule,
  MatCardModule,
  MatDialogModule,
  MatGridListModule,
  MatIconModule,
  MatListModule,
  MatMenuModule,
  MatSidenavModule,
  MatSnackBarModule,
  MatTabsModule,
  MatToolbarModule,
  MatButtonModule,
  MatCardModule,
  MatGridListModule,
  MatIconModule,
  MatMenuModule,
  MatTreeModule,
  MatFormFieldModule,
  MatInputModule,
  MatSelectModule,
  MatOptionModule,
  MatProgressSpinnerModule,
  MatExpansionModule,
  MatTooltipModule,
]
Example #16
Source File: material.module.ts    From ngSurvey with MIT License 5 votes vote down vote up
@NgModule({
  exports: [
    A11yModule,
    ClipboardModule,
    CdkStepperModule,
    CdkTableModule,
    CdkTreeModule,
    DragDropModule,
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,
    PortalModule,
    ScrollingModule,
  ]
})
export class MaterialModule {}
Example #17
Source File: material.module.ts    From open-genes-frontend with Mozilla Public License 2.0 5 votes vote down vote up
@NgModule({
  imports: [
    MatCheckboxModule,
    MatButtonModule,
    MatInputModule,
    MatAutocompleteModule,
    MatDatepickerModule,
    MatFormFieldModule,
    MatRadioModule,
    MatSelectModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatMenuModule,
    MatSidenavModule,
    MatToolbarModule,
    MatListModule,
    MatGridListModule,
    MatCardModule,
    MatStepperModule,
    MatTabsModule,
    MatExpansionModule,
    MatButtonToggleModule,
    MatChipsModule,
    MatIconModule,
    MatProgressSpinnerModule,
    MatProgressBarModule,
    MatDialogModule,
    MatTooltipModule,
    MatSnackBarModule,
    MatTableModule,
    MatSortModule,
    MatPaginatorModule,
    MatBottomSheetModule,
    MatBadgeModule,
    MatRippleModule,
  ],
  exports: [
    MatCheckboxModule,
    MatButtonModule,
    MatInputModule,
    MatAutocompleteModule,
    MatDatepickerModule,
    MatFormFieldModule,
    MatRadioModule,
    MatSelectModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatMenuModule,
    MatSidenavModule,
    MatToolbarModule,
    MatListModule,
    MatGridListModule,
    MatCardModule,
    MatStepperModule,
    MatTabsModule,
    MatExpansionModule,
    MatButtonToggleModule,
    MatChipsModule,
    MatIconModule,
    MatProgressSpinnerModule,
    MatProgressBarModule,
    MatDialogModule,
    MatTooltipModule,
    MatSnackBarModule,
    MatTableModule,
    MatSortModule,
    MatPaginatorModule,
    MatBottomSheetModule,
    MatBadgeModule,
  ],
})
export class MaterialModule {}
Example #18
Source File: project-notes-details.component.spec.ts    From barista with Apache License 2.0 5 votes vote down vote up
describe('ProjectNotesDetailsComponent', () => {
  let component: ProjectNotesDetailsComponent;
  let fixture: ComponentFixture<ProjectNotesDetailsComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        FormsModule,
        StoreModule.forRoot(
          {},
          {
            runtimeChecks: {
              strictStateImmutability: true,
              strictActionImmutability: true,
              strictActionSerializability: true,
            },
          },
        ),
        EffectsModule.forRoot([]),
        EntityDataModule.forRoot(entityConfig),
        EntityStoreModule,
        HttpClientTestingModule,
        RouterTestingModule,
        NgxDatatableModule,
        AppMaterialModule,
        AppComponentsModule,
        MatSnackBarModule,
      ],
      declarations: [ProjectNotesDetailsComponent],
      providers: [
        { provide: MatDialogRef, useValue: {} },
        { provide: MAT_DIALOG_DATA, useValue: [] },
        ProjectNotesOperationMessageService,
      ],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ProjectNotesDetailsComponent);
    component = fixture.componentInstance;
    component.project = { name: 'Test' } as Project;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #19
Source File: fake-async-harness-environment.spec.ts    From s-libs with MIT License 5 votes vote down vote up
describe('FakeAsyncHarnessEnvironment', () => {
  @Component({
    template: `
      <button mat-button (click)="clicked = true">{{ clicked }}</button>
    `,
  })
  class ClickableButtonComponent {
    clicked = false;
  }

  it('runs asynchronous events that are due automatically', () => {
    const ctx = new ComponentContext(ClickableButtonComponent);
    ctx.run(async () => {
      const button = await ctx.getHarness(MatButtonHarness);
      await button.click();
      expect(await button.getText()).toBe('true');
    });
  });

  it('does not flush timeouts that are not yet due', () => {
    class SnackBarContext extends ComponentContext<ClickableButtonComponent> {
      constructor() {
        super(ClickableButtonComponent, {
          imports: [MatSnackBarModule, NoopAnimationsModule],
        });
      }

      protected override cleanUp(): void {
        this.inject(OverlayContainer).ngOnDestroy();
        this.tick(5000);
        super.cleanUp();
      }
    }

    const ctx = new SnackBarContext();
    ctx.run(async () => {
      ctx
        .inject(MatSnackBar)
        // When using the built-in TestBedHarnessEnvironment, fetching the harness would flush the duration and it would disappear before being selected
        .open('Hello, snackbar!', 'OK', { duration: 5000 });
      expect(await ctx.getHarness(MatSnackBarHarness)).toBeDefined();
    });
  });
});
Example #20
Source File: licenses.exceptions.component.spec.ts    From barista with Apache License 2.0 5 votes vote down vote up
describe('LicensesExceptionsComponent', () => {
  let component: LicensesExceptionsComponent;
  let fixture: ComponentFixture<LicensesExceptionsComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule,
        StoreModule.forRoot(
          {},
          {
            runtimeChecks: {
              strictStateImmutability: true,
              strictActionImmutability: true,
              strictActionSerializability: true,
            },
          },
        ),
        EffectsModule.forRoot([]),
        EntityDataModule.forRoot(entityConfig),
        EntityStoreModule,
        HttpClientTestingModule,
        FormsModule,
        ReactiveFormsModule,
        NgxDatatableModule,
        FormlyMaterialModule,
        AppMaterialModule,
        AppComponentsModule,
        FlexLayoutModule,
        MatSnackBarModule,
      ],
      declarations: [LicensesExceptionsComponent],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(LicensesExceptionsComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #21
Source File: announce-module.component.spec.ts    From 6PG-Dashboard with MIT License 5 votes vote down vote up
describe('AnnounceModuleComponent', () => {
  let component: AnnounceModuleComponent;
  let fixture: ComponentFixture<AnnounceModuleComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ AnnounceModuleComponent ],
      imports: [ 
        HttpClientModule,
        MatSnackBarModule, 
        AppRoutingModule,
        ReactiveFormsModule
      ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(AnnounceModuleComponent);
    component = fixture.componentInstance;
    component.guildId = environment.test.guildId;
    fixture.detectChanges();

    component.init = async() => {};
    component.savedBot = { announce: { events: {}}};
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });

  it('saved guild overwrites default input values', () => {
    const events = [
    {
      event: EventType.MemberJoin,
      channel: '123',
      message: 'a'
    } as AnnounceEvent ];
    component.savedBot = { announce: { events }};
    component.guildId = '123';

    const result = (component.form.get('events') as FormArray).get('0').value;

    expect(result).toEqual(events[0]);
  });

  it('submitting removes enabled property', () => {
    component = new AnnounceModuleComponent({} as any, {} as any, {} as any);
    const events = [
    {
      event: EventType.MemberJoin,
      channel: '123',
      enabled: false,
      message: 'a'
    } as AnnounceEvent ];

    component.form.setValue({ events });
    component.submit();

    const result = component.form.get('events').get('0').value.enabled;

    expect(result).toBeUndefined();
  });
});
Example #22
Source File: bom-security-exception.component.spec.ts    From barista with Apache License 2.0 5 votes vote down vote up
describe('BomSecurityExceptionComponent', () => {
  let component: BomSecurityExceptionComponent;
  let fixture: ComponentFixture<BomSecurityExceptionComponent>;
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        StoreModule.forRoot(
          {},
          {
            runtimeChecks: {
              strictStateImmutability: true,
              strictActionImmutability: true,
              strictActionSerializability: true,
            },
          },
        ),
        AppComponentsModule,
        AppMaterialModule,
        AppServicesModule,
        EffectsModule.forRoot([]),
        EntityDataModule.forRoot(entityConfig),
        EntityStoreModule,
        HttpClientTestingModule,
        MatDialogModule,
        MatSnackBarModule,
        NgxDatatableModule,
        RouterTestingModule,
      ],
      declarations: [BomSecurityExceptionComponent],
      providers: [
        {
          provide: ActivatedRoute,
        },
      ],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(BomSecurityExceptionComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #23
Source File: metric-source.component.spec.ts    From HeartBeat with MIT License 5 votes vote down vote up
describe('MetricSourceComponent', () => {
  let component: MetricSourceComponent;
  let fixture: ComponentFixture<MetricSourceComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        ReactiveFormsModule,
        HttpClientTestingModule,
        MatSnackBarModule,
        MatDialogModule,
        MatCardModule,
        MatSelectModule,
        MatInputModule,
        BrowserAnimationsModule,
      ],
      providers: [UtilsService],
      declarations: [MetricSourceComponent],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(MetricSourceComponent);
    component = fixture.componentInstance;
    component.groupName = 'board';
    component.sources = {
      Linear: {
        projectName: [Validators.required],
        token: [Validators.required],
      },
    };
    component.configForm = new FormBuilder().group({
      startDate: new FormControl(new Date(), Validators.required),
      endDate: new FormControl(new Date(), Validators.required),
      considerHoliday: new FormControl(false, Validators.required),
      projectName: new FormControl('', Validators.required),
      metrics: new FormControl(['Velocity'], Validators.required),
    });
    // component.selected = 'Linear';
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #24
Source File: bom-license-exception-details.component.spec.ts    From barista with Apache License 2.0 5 votes vote down vote up
describe('BomLicenseExceptionDetailsComponent', () => {
  let component: BomLicenseExceptionDetailsComponent;
  let fixture: ComponentFixture<BomLicenseExceptionDetailsComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        FormsModule,
        StoreModule.forRoot(
          {},
          {
            runtimeChecks: {
              strictStateImmutability: true,
              strictActionImmutability: true,
              strictActionSerializability: true,
            },
          },
        ),
        EffectsModule.forRoot([]),
        EntityDataModule.forRoot(entityConfig),
        EntityStoreModule,
        HttpClientTestingModule,
        RouterTestingModule,
        NgxDatatableModule,
        AppMaterialModule,
        AppComponentsModule,
        MatSnackBarModule,
      ],
      declarations: [BomLicenseExceptionDetailsComponent],
      providers: [
        { provide: MatDialogRef, useValue: {} },
        { provide: MAT_DIALOG_DATA, useValue: [] },
        BomLicenseExceptionOperationMessageService,
      ],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(BomLicenseExceptionDetailsComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #25
Source File: shared-material.module.ts    From matx-angular with MIT License 5 votes vote down vote up
@NgModule({
  exports: [
    MatCheckboxModule,
    MatButtonModule,
    MatInputModule,
    MatAutocompleteModule,
    MatDatepickerModule,
    MatFormFieldModule,
    MatRadioModule,
    MatSelectModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatMenuModule,
    MatSidenavModule,
    MatToolbarModule,
    MatListModule,
    MatGridListModule,
    MatCardModule,
    MatStepperModule,
    MatTabsModule,
    MatExpansionModule,
    MatButtonToggleModule,
    MatChipsModule,
    MatIconModule,
    MatProgressSpinnerModule,
    MatProgressBarModule,
    MatDialogModule,
    MatTooltipModule,
    MatSnackBarModule,
    MatTableModule,
    MatSortModule,
    MatPaginatorModule,
    MatNativeDateModule,
    MatMomentDateModule,
    MatTreeModule,
    MatRippleModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatDividerModule
  ]
})
export class SharedMaterialModule {}
Example #26
Source File: bom-grouped-license-modules.component.spec.ts    From barista with Apache License 2.0 5 votes vote down vote up
describe('BomGroupedLicenseModulesComponent', () => {
  let component: BomGroupedLicenseModulesComponent;
  let fixture: ComponentFixture<BomGroupedLicenseModulesComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        FormsModule,
        StoreModule.forRoot(
          {},
          {
            runtimeChecks: {
              strictStateImmutability: true,
              strictActionImmutability: true,
              strictActionSerializability: true,
            },
          },
        ),
        EffectsModule.forRoot([]),
        EntityDataModule.forRoot(entityConfig),
        EntityStoreModule,
        HttpClientTestingModule,
        RouterTestingModule,
        NgxDatatableModule,
        AppMaterialModule,
        MatDialogModule,
        AppComponentsModule,
        MatSnackBarModule,
      ],
      declarations: [BomGroupedLicenseModulesComponent],
      providers: [
        { provide: MatDialogRef, useValue: {} },
        { provide: MAT_DIALOG_DATA, useValue: [] },
        {
          provide: AuthService,
          useValue: {
            userInfo: jest.fn().mockReturnValueOnce({ role: 'Admin' }),
          },
        },
        BomLicenseExceptionOperationMessageService,
      ],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(BomGroupedLicenseModulesComponent);
    component = fixture.componentInstance;
    component.licenseDto = { id: 1 } as any;
    component.projectId = 1;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
Example #27
Source File: shared.module.ts    From FlexDemo with MIT License 5 votes vote down vote up
@NgModule({
  imports: [
    CommonModule,


    // Navigation
    MatMenuModule, MatSidenavModule, MatToolbarModule,

    // FormControls
    MatAutocompleteModule, MatCheckboxModule, MatDatepickerModule, MatInputModule,
    MatFormFieldModule, MatRadioModule, MatSelectModule, MatSliderModule,
    MatSlideToggleModule, MatSelectModule,
    // Layout
    MatCardModule, MatDividerModule, MatExpansionModule, MatGridListModule,
    MatListModule, MatStepperModule, MatTabsModule, MatTreeModule,
    // Buttons
    MatButtonModule, MatButtonToggleModule, MatBadgeModule, MatChipsModule,
    MatIconModule, MatProgressSpinnerModule, MatProgressBarModule, MatRippleModule,

    // Popups & Modals
    MatBottomSheetModule, MatDialogModule, MatSnackBarModule, MatTooltipModule,

    // Datatable
    MatTableModule, MatSortModule, MatPaginatorModule,

    FlexGridModule
  ],
  exports: [
    // CommonModule,

    // // Navigation
    // MatMenuModule, MatSidenavModule, MatToolbarModule,

    // // FormControls
    // MatAutocompleteModule, MatCheckboxModule, MatDatepickerModule, 
    MatInputModule,
    MatFormFieldModule, // MatRadioModule, MatSelectModule, MatSliderModule,
    // MatSlideToggleModule, MatSelectModule,
    // // Layout
    MatCardModule,
    MatDividerModule,
    // MatExpansionModule, MatGridListModule,
    // MatListModule, MatStepperModule, MatTabsModule, MatTreeModule,
    // Buttons
    MatButtonModule,
    // MatButtonToggleModule,
    MatBadgeModule, MatChipsModule,
    //
    MatIconModule,
    MatProgressSpinnerModule,
    MatProgressBarModule, MatRippleModule,

    // Popups & Modals
    // MatBottomSheetModule, MatDialogModule, MatSnackBarModule, 
    MatTooltipModule,

    // Datatable
    MatTableModule, MatSortModule, MatPaginatorModule,

    FlexGridModule

  ],
  declarations: []
})
export class SharedModule { }
Example #28
Source File: dxc-alert.module.ts    From halstack-angular with Apache License 2.0 5 votes vote down vote up
@NgModule({
  declarations: [DxcAlertComponent],
  imports: [CommonModule, MatSnackBarModule, BackgroundProviderInnerModule],
  exports: [DxcAlertComponent],
})
export class DxcAlertModule {}
Example #29
Source File: project-scans.component.spec.ts    From barista with Apache License 2.0 5 votes vote down vote up
describe('ProjectScansComponent', () => {
  let component: ProjectScansComponent;
  let fixture: ComponentFixture<ProjectScansComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule,
        StoreModule.forRoot(
          {},
          {
            runtimeChecks: {
              strictStateImmutability: true,
              strictActionImmutability: true,
              strictActionSerializability: true,
            },
          },
        ),
        EffectsModule.forRoot([]),
        EntityDataModule.forRoot(entityConfig),
        EntityStoreModule,
        HttpClientTestingModule,
        NgxDatatableModule,
        AppMaterialModule,
        AppComponentsModule,
        MatSnackBarModule,
      ],
      declarations: [ProjectScansComponent],
      providers: [
        {
          provide: AuthService,
          useValue: {
            userInfo: jest.fn().mockReturnValueOnce({ role: 'Admin' }),
          },
        },
      ],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ProjectScansComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});