@@ -4,9 +4,7 @@ import { ComponentFixture, TestBed, fakeAsync, flush, tick } from "@angular/core
4
4
import { MatIconModule } from "@angular/material/icon" ;
5
5
import { MatMenuModule } from "@angular/material/menu" ;
6
6
import { DataComponent } from "./data.component" ;
7
-
8
- import { emitClickOnElementByDataTestId , findElementByDataTestId } from "src/app/common/base-test.helpers.spec" ;
9
- import { DatasetSubscriptionsService } from "../../dataset.subscriptions.service" ;
7
+ import { emitClickOnElementByDataTestId } from "src/app/common/base-test.helpers.spec" ;
10
8
import { mockMetadataDerivedUpdate , mockOverviewDataUpdate , mockOverviewDataUpdateNullable } from "../data-tabs.mock" ;
11
9
import { RouterTestingModule } from "@angular/router/testing" ;
12
10
import { Location } from "@angular/common" ;
@@ -26,11 +24,11 @@ import { Apollo } from "apollo-angular";
26
24
import { ToastrModule } from "ngx-toastr" ;
27
25
import { SavedQueriesSectionComponent } from "../../../query/shared/saved-queries-section/saved-queries-section.component" ;
28
26
import { QueryAndResultSectionsComponent } from "../../../query/shared/query-and-result-sections/query-and-result-sections.component" ;
27
+ import { SearchAndSchemasSectionComponent } from "src/app/query/global-query/search-and-schemas-section/search-and-schemas-section.component" ;
29
28
30
29
describe ( "DataComponent" , ( ) => {
31
30
let component : DataComponent ;
32
31
let fixture : ComponentFixture < DataComponent > ;
33
- let datasetSubsService : DatasetSubscriptionsService ;
34
32
let location : Location ;
35
33
let ngbModalService : NgbModal ;
36
34
@@ -58,10 +56,10 @@ describe("DataComponent", () => {
58
56
LoadMoreComponent ,
59
57
RequestTimerComponent ,
60
58
SqlEditorComponent ,
59
+ SearchAndSchemasSectionComponent ,
61
60
] ,
62
61
} ) . compileComponents ( ) ;
63
62
fixture = TestBed . createComponent ( DataComponent ) ;
64
- datasetSubsService = TestBed . inject ( DatasetSubscriptionsService ) ;
65
63
location = TestBed . inject ( Location ) ;
66
64
ngbModalService = TestBed . inject ( NgbModal ) ;
67
65
component = fixture . componentInstance ;
@@ -87,24 +85,6 @@ describe("DataComponent", () => {
87
85
flush ( ) ;
88
86
} ) ) ;
89
87
90
- it ( "should check schema column names" , fakeAsync ( ( ) => {
91
- datasetSubsService . emitOverviewChanged ( {
92
- schema : mockMetadataDerivedUpdate . schema ,
93
- content : mockOverviewDataUpdate . content ,
94
- overview : _ . cloneDeep ( mockOverviewDataUpdate . overview ) ,
95
- size : mockOverviewDataUpdate . size ,
96
- } as OverviewUpdate ) ;
97
- tick ( ) ;
98
- fixture . detectChanges ( ) ;
99
- const columnSchemaNames = mockMetadataDerivedUpdate . schema ?. fields . map ( ( item ) => item . name ) ;
100
- columnSchemaNames ?. forEach ( ( columnName ) => {
101
- expect ( findElementByDataTestId ( fixture , `column-name-${ columnName } ` ) ?. textContent ?. trim ( ) ) . toEqual (
102
- columnName ,
103
- ) ;
104
- } ) ;
105
- flush ( ) ;
106
- } ) ) ;
107
-
108
88
it ( "should check add data" , ( ) => {
109
89
const ngbModalServiceSpy = spyOn ( ngbModalService , "open" ) . and . callThrough ( ) ;
110
90
component . datasetBasics = mockDatasetBasicsRootFragment ;
0 commit comments