mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 11:12:52 +00:00
test: mock content for the context menu
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<stapps-context [contentId]="'map'"></stapps-context>
|
<stapps-context contentId="map"></stapps-context>
|
||||||
|
|
||||||
<ion-header class="ion-no-border" translucent="true">
|
<ion-header class="ion-no-border" translucent="true">
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-non-null-assertion,@typescript-eslint/ban-ts-comment */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 StApps
|
* Copyright (C) 2020 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
@@ -34,14 +33,25 @@ import {ContextMenuComponent} from './context-menu.component';
|
|||||||
import {SettingsModule} from '../../settings/settings.module';
|
import {SettingsModule} from '../../settings/settings.module';
|
||||||
import {ContextMenuService} from './context-menu.service';
|
import {ContextMenuService} from './context-menu.service';
|
||||||
import {FilterContext, SortContext} from './context-type';
|
import {FilterContext, SortContext} from './context-type';
|
||||||
|
import {Component} from '@angular/core';
|
||||||
|
import {By} from '@angular/platform-browser';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: `
|
||||||
|
<ion-content id="foo"></ion-content>
|
||||||
|
<stapps-context contentId="foo"></stapps-context>
|
||||||
|
`,
|
||||||
|
})
|
||||||
|
class ContextMenuComponentContainer {
|
||||||
|
}
|
||||||
|
|
||||||
describe('ContextMenuComponent', async () => {
|
describe('ContextMenuComponent', async () => {
|
||||||
let fixture: ComponentFixture<ContextMenuComponent>;
|
let fixture: ComponentFixture<ContextMenuComponentContainer>;
|
||||||
let instance: ContextMenuComponent;
|
let instance: ContextMenuComponent;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ContextMenuComponent],
|
declarations: [ContextMenuComponent, ContextMenuComponentContainer],
|
||||||
providers: [
|
providers: [
|
||||||
ChildrenOutletContexts,
|
ChildrenOutletContexts,
|
||||||
Location,
|
Location,
|
||||||
@@ -60,8 +70,8 @@ describe('ContextMenuComponent', async () => {
|
|||||||
],
|
],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ContextMenuComponent);
|
fixture = TestBed.createComponent(ContextMenuComponentContainer);
|
||||||
instance = fixture.componentInstance;
|
instance = fixture.debugElement.query(By.directive(ContextMenuComponent)).componentInstance;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show items in sort context', () => {
|
it('should show items in sort context', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user