Skip to content

Commit

Permalink
Add entryTypeMetadata to search hits in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Jan 16, 2025
1 parent 4c078e9 commit 4327835
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
40 changes: 40 additions & 0 deletions cypress/e2e/immutableDatabaseTests/searchTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ describe('Dockstore tool/workflow search table', () => {
_id: '52',
_score: 1.0,
_source: {
entryTypeMetadata: {
termPlural: 'tools',
sitePath: 'containers',
trsSupported: true,
trsPrefix: '',
term: 'tool',
searchSupported: true,
type: 'TOOL',
searchEntryType: 'tools',
},
tool_maintainer_email: '',
aliases: {},
default_dockerfile_path: '/Dockerfile',
Expand Down Expand Up @@ -102,6 +112,16 @@ describe('Dockstore tool/workflow search table', () => {
_id: '5',
_score: 1.0,
_source: {
entryTypeMetadata: {
termPlural: 'tools',
sitePath: 'containers',
trsSupported: true,
trsPrefix: '',
term: 'tool',
searchSupported: true,
type: 'TOOL',
searchEntryType: 'tools',
},
tool_maintainer_email: '',
aliases: {},
default_dockerfile_path: '/Dockerfile',
Expand Down Expand Up @@ -190,6 +210,16 @@ describe('Dockstore tool/workflow search table', () => {
_id: '4',
_score: 1.0,
_source: {
entryTypeMetadata: {
termPlural: 'tools',
sitePath: 'containers',
trsSupported: true,
trsPrefix: '',
term: 'tool',
searchSupported: true,
type: 'TOOL',
searchEntryType: 'tools',
},
tool_maintainer_email: '',
aliases: {},
default_dockerfile_path: '/Dockerfile',
Expand Down Expand Up @@ -278,6 +308,16 @@ describe('Dockstore tool/workflow search table', () => {
_id: '11',
_score: 1.0,
_source: {
entryTypeMetadata: {
termPlural: 'workflows',
sitePath: 'workflows',
trsSupported: true,
trsPrefix: '#workflow/',
term: 'workflow',
searchSupported: true,
type: 'WORKFLOW',
searchEntryType: 'workflows',
},
aliases: {},
is_published: true,
last_modified_date: null,
Expand Down
50 changes: 50 additions & 0 deletions cypress/fixtures/searchTableResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
"_id": "52",
"_score": 1.0,
"_source": {
"entryTypeMetadata": {
"termPlural": "tools",
"sitePath": "containers",
"trsSupported": true,
"trsPrefix": "",
"term": "tool",
"searchSupported": true,
"type": "TOOL",
"searchEntryType": "tools"
},
"tool_maintainer_email": "",
"aliases": {},
"default_dockerfile_path": "/Dockerfile",
Expand Down Expand Up @@ -89,6 +99,16 @@
"_id": "5",
"_score": 1.0,
"_source": {
"entryTypeMetadata": {
"termPlural": "tools",
"sitePath": "containers",
"trsSupported": true,
"trsPrefix": "",
"term": "tool",
"searchSupported": true,
"type": "TOOL",
"searchEntryType": "tools"
},
"tool_maintainer_email": "",
"aliases": {},
"default_dockerfile_path": "/Dockerfile",
Expand Down Expand Up @@ -179,6 +199,16 @@
"_id": "4",
"_score": 1.0,
"_source": {
"entryTypeMetadata": {
"termPlural": "tools",
"sitePath": "containers",
"trsSupported": true,
"trsPrefix": "",
"term": "tool",
"searchSupported": true,
"type": "TOOL",
"searchEntryType": "tools"
},
"tool_maintainer_email": "",
"aliases": {},
"default_dockerfile_path": "/Dockerfile",
Expand Down Expand Up @@ -270,6 +300,16 @@
"_id": "11",
"_score": 1.0,
"_source": {
"entryTypeMetadata": {
"termPlural": "workflows",
"sitePath": "workflows",
"trsSupported": true,
"trsPrefix": "#workflow/",
"term": "workflow",
"searchSupported": true,
"type": "WORKFLOW",
"searchEntryType": "workflows"
},
"aliases": {},
"is_published": true,
"last_modified_date": null,
Expand Down Expand Up @@ -333,6 +373,16 @@
"_id": "61",
"_score": 1.0,
"_source": {
"entryTypeMetadata": {
"termPlural": "notebooks",
"sitePath": "notebooks",
"trsSupported": true,
"trsPrefix": "#notebook/",
"term": "notebook",
"searchSupported": true,
"type": "NOTEBOOK",
"searchEntryType": "notebooks"
},
"aliases": {},
"is_published": true,
"last_modified_date": null,
Expand Down
20 changes: 20 additions & 0 deletions src/app/test/mocked-objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,16 @@ export const elasticSearchResponse: Hit[] = [
_id: '2313',
_score: 1,
_source: {
entryTypeMetadata: {
termPlural: 'tools',
sitePath: 'containers',
trsSupported: true,
trsPrefix: '',
term: 'tool',
searchSupported: true,
type: 'TOOL',
searchEntryType: 'tools',
},
tool_maintainer_email: '',
aliases: {},
default_dockerfile_path: '/delly_docker/Dockerfile',
Expand Down Expand Up @@ -722,6 +732,16 @@ export const elasticSearchResponse: Hit[] = [
_id: '2210',
_score: 1,
_source: {
entryTypeMetadata: {
termPlural: 'workflows',
sitePath: 'workflows',
trsSupported: true,
trsPrefix: '#workflow/',
term: 'workflow',
searchSupported: true,
type: 'WORKFLOW',
searchEntryType: 'workflows',
},
aliases: {},
is_published: true,
last_modified_date: null,
Expand Down

0 comments on commit 4327835

Please sign in to comment.