mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 14:02:48 +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-toolbar>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion,@typescript-eslint/ban-ts-comment */
|
||||
/*
|
||||
* Copyright (C) 2020 StApps
|
||||
* 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 {ContextMenuService} from './context-menu.service';
|
||||
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 () => {
|
||||
let fixture: ComponentFixture<ContextMenuComponent>;
|
||||
let fixture: ComponentFixture<ContextMenuComponentContainer>;
|
||||
let instance: ContextMenuComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ContextMenuComponent],
|
||||
declarations: [ContextMenuComponent, ContextMenuComponentContainer],
|
||||
providers: [
|
||||
ChildrenOutletContexts,
|
||||
Location,
|
||||
@@ -60,8 +70,8 @@ describe('ContextMenuComponent', async () => {
|
||||
],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ContextMenuComponent);
|
||||
instance = fixture.componentInstance;
|
||||
fixture = TestBed.createComponent(ContextMenuComponentContainer);
|
||||
instance = fixture.debugElement.query(By.directive(ContextMenuComponent)).componentInstance;
|
||||
});
|
||||
|
||||
it('should show items in sort context', () => {
|
||||
|
||||
Reference in New Issue
Block a user