Skip to content

Commit 881ec6a

Browse files
committed
Fixed test
1 parent 66f2ddc commit 881ec6a

1 file changed

Lines changed: 23 additions & 20 deletions

File tree

web/client/epics/__tests__/search-test.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,28 +82,31 @@ describe('search Epics', () => {
8282

8383
it('searchItemSelected epic with nested services', () => {
8484
let nestedService = {
85-
filterTemplate: "TEST_FILTER_TEMPLATE",
8685
nestedPlaceholder: "TEST_NESTED_PLACEHOLDER"
8786
};
8887
const TEXT = "Dinagat Islands";
89-
let action = selectSearchItem({
90-
"type": "Feature",
91-
"bbox": [125, 10, 126, 11],
92-
"geometry": {
93-
"type": "Point",
94-
"coordinates": [125.6, 10.1]
95-
},
96-
"properties": {
97-
"name": TEXT
98-
},
99-
"__SERVICE__": {
100-
displayName: "${properties.name}",
101-
type: "wfs",
102-
searchTextTemplate: "${properties.name}",
103-
nestedPlaceholder: "SEARCH NESTED",
104-
then: [nestedService]
105-
}
106-
}, {
88+
const item = {
89+
"type": "Feature",
90+
"bbox": [125, 10, 126, 11],
91+
"geometry": {
92+
"type": "Point",
93+
"coordinates": [125.6, 10.1]
94+
},
95+
"properties": {
96+
"name": TEXT
97+
},
98+
"__SERVICE__": {
99+
searchTextTemplate: "${properties.name}",
100+
displayName: "${properties.name}",
101+
type: "wfs",
102+
options: {
103+
staticFilter: "${properties.name}"
104+
},
105+
nestedPlaceholder: "SEARCH NESTED",
106+
then: [nestedService]
107+
}
108+
};
109+
let action = selectSearchItem(item, {
107110
size: {
108111
width: 200,
109112
height: 200
@@ -122,7 +125,7 @@ describe('search Epics', () => {
122125
expect(actions[4].services[0]).toEqual({
123126
...nestedService,
124127
options: {
125-
staticFilter: "TEST_FILTER_TEMPLATE"
128+
item
126129
}
127130
});
128131
expect(actions[4].items).toEqual({

0 commit comments

Comments
 (0)