Skip to content

Commit

Permalink
Tests [Documents] Failed request on mock (#2992)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariana-furyk authored Jan 7, 2025
1 parent 382da86 commit 8a82259
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/mockServer/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ function getFeatureSet(req, res) {
const metadataFields = ['name', 'project', 'tag', 'uid', 'labels'].map(
fieldName => `metadata.${fieldName}`
)
const specFields = ['description', 'entities', 'targets', 'engine'].map(fieldName => `spec.${fieldName}`)
const specFields = ['description', 'entities', 'targets', 'engine'].map(
fieldName => `spec.${fieldName}`
)

return pick(featureSet, ['kind', ...metadataFields, 'status.state', ...specFields])
})
Expand Down Expand Up @@ -1290,6 +1292,7 @@ function getProjectsArtifactTags(req, res) {
function getArtifacts(req, res) {
const categories = {
dataset: ['dataset'],
document: ['document'],
model: ['model'],
other: ['', 'table', 'link', 'plot', 'chart', 'plotly', 'artifact']
}
Expand Down Expand Up @@ -1372,7 +1375,7 @@ function getArtifacts(req, res) {
collectedArtifacts = collectedArtifacts.sort((prevArtifact, nextArtifact) => {
const datePrevArtifact = new Date(prevArtifact.metadata.updated)
const dateNextArtifact = new Date(nextArtifact.metadata.updated)
return dateNextArtifact - datePrevArtifact
return dateNextArtifact - datePrevArtifact
})

const [paginatedArtifacts, pagination] = getPaginationConfig(collectedArtifacts, req.query)
Expand Down

0 comments on commit 8a82259

Please sign in to comment.