Merge pull request #1122 from metabrainz/dependabot/npm_and_yarn/domp… #900
GitHub Actions / Mocha Tests
succeeded
Sep 17, 2024 in 0s
815 passed, 0 failed and 0 skipped
✅ test-results.json
815 tests were completed in 180s with 815 passed, 0 failed and 0 skipped.
✅ test/src/api/common-tests.js
Common test of API
✅ should throw a 404 error if endpoint is not valid
✅ should throw a 405 error if send delete request
✅ should throw a 405 error if send post request
✅ should throw a 405 error if send put request
Lookup endpoints
✅ GET {entity}/{BBID}/aliases should return aliases with a specific structure
✅ GET {entity}/{BBID}/identifiers should return identifiers with a specific structure
✅ GET {entity}/{BBID}/relationships should return relationships with a specific structure
✅ test/src/api/routes/test-author.js
Browse Author
✅ should allow params to be case insensitive
✅ should NOT throw an error if there is no related entity
✅ should return 0 authors (with Incorrect Type filter)
✅ should return list of authors associated with the work (with Type filter)
✅ should return list of authors associated with the work (without any filter)
✅ should throw 400 error for invalid bbid
✅ should throw 404 error for incorrect bbid
✅ should throw an error if trying to browse more than one entity
GET /Author
✅ should get basic information of an Author
✅ should return list of aliases of an Author
✅ should return list of identifiers of an Author
✅ should return list of relationships of an Author
✅ should throw a 400 error if trying to access an author with invalid BBID
✅ should throw a 404 error if trying to access aliases of an Author that does not exist
✅ should throw a 404 error if trying to access an author that does not exist
✅ should throw a 404 error if trying to access identifiers of an Author that does not exist
✅ should throw a 404 error if trying to access relationships of an Author that does not exist
✅ test/src/api/routes/test-edition-group.js
Browse EditionGroup
✅ should allow params to be case insensitive
✅ should return 0 EditionGroups (with Incorrect Type Filter)
✅ should return list of EditionGroups associated with the edition
✅ should return list of EditionGroups associated with the edition (with Type Filter)
✅ should throw 400 error for incorrect linked entity
✅ should throw 400 error for invalid bbid
✅ should throw 404 error for incorrect bbid
GET /EditionGroup
✅ should get basic information of an Edition Group
✅ should return list of aliases of an Edition Group
✅ should return list of identifiers of an Edition Group
✅ should return list of relationships of an Edition Group
✅ should throw a 400 error if trying to access an edition with invalid BBID
✅ should throw a 404 error if trying to access aliases of an Edition Group that does not exist
✅ should throw a 404 error if trying to access an edition group that does not exist
✅ should throw a 404 error if trying to access identifiers of an Edition Group that does not exist
✅ should throw a 404 error if trying to access relationships of an Edition Group that does not exist
✅ test/src/api/routes/test-edition.js
Browse Edition
✅ should allow params to be case insensitive
✅ should NOT throw an error if there is no related edition-group
✅ should NOT throw an error if there is no related publisher
✅ should NOT throw an error if there is no related work
✅ should return editions associated with a publisher
✅ should return list of editions associated with edition-group
✅ should return list of editions associated with the author (with Format Filter and Language Filter)
✅ should return list of editions associated with the author (with Format Filter)
✅ should return list of editions associated with the author (with Language Filter)
✅ should return list of editions associated with the author (without any filter)
✅ should return no editions (with WRONG Format Filter and WRONG Language Filter)
✅ should throw 400 error for invalid bbid
✅ should throw 404 error for incorrect bbid
✅ should throw an error if trying to browse more than one entity
GET /Edition
✅ should get basic information of edition
✅ should return list of aliases of an Edition
✅ should return list of identifiers of an Edition
✅ should return list of relationships of an Edition
✅ should throw a 400 error if trying to access an edition with invalid BBID
✅ should throw a 404 error if trying to access aliases of an Edition that does not exist
✅ should throw a 404 error if trying to access an edition that does not exist
✅ should throw a 404 error if trying to identifiers of an Edition that does not exist
✅ should throw a 404 error if trying to relationships of an Edition that does not exist
✅ test/src/api/routes/test-publisher.js
Browse Publishers
✅ should allow params to be case insensitive
✅ should NOT throw error with no related edition
✅ should NOT throw error with no related entity
✅ should return list of Publisher, associated with the Work
✅ should return list of Publisher, associated with the Work (with Area Filter)
✅ should return list of Publisher, associated with the Work (with Type Filter and Area filter)
✅ should return list of Publisher, associated with the Work (with Type Filter)
✅ should return no publisher (Incorrect Filters)
✅ should return publishers associated with an edition
✅ should throw 400 error for incorrect linked entity
✅ should throw 400 error for invalid bbid
✅ should throw 404 error for incorrect bbid
✅ should throw an error if trying to browse more than one entity
GET /Publisher
✅ should get basic information of a Publisher
✅ should return list of aliases of a Publisher
✅ should return list of identifiers of a Publisher
✅ should return list of relationships of a Publisher
✅ should throw a 400 error if trying to access a publisher with invalid BBID
✅ should throw a 404 error if trying to access a publisher that does not exist
✅ should throw a 404 error if trying to access aliases of a Publisher that does not exist
✅ should throw a 404 error if trying to access identifiers of a Publisher that does not exist
✅ should throw a 404 error if trying to access relationships of a Publisher that does not exist
✅ test/src/api/routes/test-search.js
GET /search
✅ should return no result for a type whose entity do not exist
✅ should return search result for given query
✅ should return search result for given query (with an offset)
✅ should return search result for given query (with both offset and size)
✅ should return search result for given query (with type query)
✅ should throw 400 error if no search query is passed
✅ test/src/api/routes/test-series.js
Browse Series
✅ should allow params to be case insensitive
✅ should NOT throw an error if there is no related entity
✅ should return 0 series (with Incorrect Type filter)
✅ should return list of series associated with the work (with Type filter)
✅ should return list of series associated with the work (without any filter)
✅ should throw 400 error for invalid bbid
✅ should throw 404 error for incorrect bbid
✅ should throw an error if trying to browse more than one entity
GET /Series
✅ should get basic information of an Series
✅ should return list of aliases of an Series
✅ should return list of identifiers of an Series
✅ should return list of relationships of an Series
✅ should throw a 400 error if trying to access an series with invalid BBID
✅ should throw a 404 error if trying to access aliases of an Series that does not exist
✅ should throw a 404 error if trying to access an series that does not exist
✅ should throw a 404 error if trying to access identifiers of an Series that does not exist
✅ should throw a 404 error if trying to access relationships of an Series that does not exist
✅ test/src/api/routes/test-work.js
Browse Works
✅ should allow params to be case insensitive
✅ should NOT throw an error when there is no related entity
✅ should return 0 works (with Incorrect Type Filter and Incorrect Language Filter)
✅ should return list of works associated with the author (with Language Filter)
✅ should return list of works associated with the author (with Type Filter and Language Filter)
✅ should return list of works associated with the author (with Type Filter)
✅ should return list of works associated with the author (without any filter)
✅ should throw 400 error for incorrect linked entity
✅ should throw 400 error for invalid bbid
✅ should throw 404 error for incorrect bbid
✅ should throw an error if trying to browse more than one entity
GET /work
✅ should get basic information of work
✅ should return list of aliases of a Work
✅ should return list of identifiers of work
✅ should return list of relationships of a Work
✅ should throw a 400 error if trying to access a work with invalid BBID
✅ should throw a 404 error if trying to access a work that does not exist
✅ should throw a 404 error if trying to access aliases of a Work that does not exist
✅ should throw a 404 error if trying to access identifiers of a Work that does not exist
✅ should throw a 404 error if trying to access relationships of a Work that does not exist
✅ test/src/client/entity-editor/create-edition.js
Creating an Edition
✅ should automatically create an Edition Group if none is passed
✅ test/src/client/entity-editor/validators/test-alias.js
validateAlias* functions validateAlias
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid language
✅ should reject an Object with an invalid name
✅ should reject an Object with an invalid primary
✅ should reject an Object with an invalid sort name
✅ should reject any other non-null data type
validateAlias* functions validateAliases
✅ should pass an empty Immutable.Map
✅ should pass an empty Object
✅ should pass an Immutable.Map of valid Immutable.Maps
✅ should pass an Object of two valid Objects
✅ should reject a null value
✅ should reject an Immutable.Map containing one invalid Immutable.Map
✅ should reject an Object containing one invalid Object
✅ should reject any other non-null data type
validateAlias* functions validateAliasLanguage
✅ should pass any positive integer value
✅ should reject a null value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateAlias* functions validateAliasName
✅ should pass any non-empty string value
✅ should reject a null value
✅ should reject an empty string
✅ should reject any non-string value
validateAlias* functions validateAliasPrimary
✅ should pass any boolean value
✅ should reject a null value
✅ should reject any non-boolean value
validateAlias* functions validateAliasSortName
✅ should pass any non-empty string value
✅ should reject a null value
✅ should reject an empty string
✅ should reject any non-string value
✅ test/src/client/entity-editor/validators/test-author.js
validateAuthorSection* functions validateAuthorSection
✅ should pass a empty value object
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass any other non-null data type
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid area
✅ should reject an Object with an invalid area
✅ should reject an Object with an invalid begin date
✅ should reject an Object with an invalid end date
✅ should reject an Object with an invalid ended flag
✅ should reject an Object with an invalid gender
✅ should reject an Object with an invalid type
validateAuthorSection* functions validateAuthorSectionBeginArea
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid ID
✅ should reject any other non-null data type
validateAuthorSection* functions validateAuthorSectionBeginDate
✅ should pass an empty value object
✅ should pass an object containing a valid year and month value
✅ should pass an object containing a valid year value
✅ should pass an object containing a valid year, month and day value
✅ should reject all other forms of invalid dates
validateAuthorSection* functions validateAuthorSectionEndArea
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid ID
✅ should reject any other non-null data type
validateAuthorSection* functions validateAuthorSectionEndDate
✅ should pass if the begin date is empty/undefined/invalid
✅ should pass if the begin date occurs before the end one
✅ should reject if the begin date occurs after the end one
✅ should reject if the end date is invalid
validateAuthorSection* functions validateAuthorSectionEnded
✅ should pass a null value
✅ should pass any boolean value
✅ should reject any non-boolean value
validateAuthorSection* functions validateAuthorSectionGender
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateAuthorSection* functions validateAuthorSectionType
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateAuthorSection* functions validateForm
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an Object with an empty submission section
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid alias editor
✅ should reject an Object with an invalid author section
✅ should reject an Object with an invalid identifier editor
✅ should reject an Object with an invalid name section
✅ should reject any other non-null data type
✅ test/src/client/entity-editor/validators/test-edition.js
validateEditionSection* functions validateEditionSection
✅ should ignore any other non-null data type
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid depth
✅ should reject an Object with an invalid edition group
✅ should reject an Object with an invalid format
✅ should reject an Object with an invalid height
✅ should reject an Object with an invalid pages
✅ should reject an Object with an invalid publisher
✅ should reject an Object with an invalid release date
✅ should reject an Object with an invalid status
✅ should reject an Object with an invalid weight
✅ should reject an Object with an invalid width
✅ should reject an Object with invalid languages
validateEditionSection* functions validateEditionSectionDepth
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateEditionSectionEditionGroup
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass any other non-null data type with no ID
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid ID
validateEditionSection* functions validateEditionSectionFormat
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateEditionSectionHeight
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateEditionSectionLanguage
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid value
✅ should reject any other non-null data type
validateEditionSection* functions validateEditionSectionLanguages
✅ should pass a null value
✅ should pass an Array of two valid Objects
✅ should pass an empty Array
✅ should pass an empty Immutable.List
✅ should pass an Immutable.List of valid Immutable.Maps
✅ should reject an Array containing one invalid Object
✅ should reject an Immutable.List containing one invalid Immutable.Map
✅ should reject any other non-null data type
validateEditionSection* functions validateEditionSectionPages
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateEditionSectionPublisher
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid ID
✅ should reject any other non-null data type
validateEditionSection* functions validateEditionSectionReleaseDate
✅ should pass an empty value object
✅ should pass an object containing a valid year and month value
✅ should pass an object containing a valid year value
✅ should pass an object containing a valid year, month and day value
✅ should reject all other forms of invalid dates
validateEditionSection* functions validateEditionSectionStatus
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateEditionSectionWeight
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateEditionSectionWidth
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionSection* functions validateForm
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an Object with an empty author credit editor and AC disabled
✅ should pass an Object with an empty submission section
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with a non empty author credit editor and AC disabled
✅ should reject an Object with an empty author credit editor
✅ should reject an Object with an invalid alias editor
✅ should reject an Object with an invalid author credit editor
✅ should reject an Object with an invalid edition section
✅ should reject an Object with an invalid identifier editor
✅ should reject an Object with an invalid name section
✅ should reject any other non-null data type
✅ test/src/client/entity-editor/validators/test-identifier.js
validateIdentifier* functions validateIdentifier
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid type
✅ should reject an Object with an invalid value
✅ should reject any other non-null data type
validateIdentifier* functions validateIdentifiers
✅ should pass an empty Immutable.Map
✅ should pass an empty Object
✅ should pass an Immutable.Map of valid Immutable.Maps
✅ should pass an Object of two valid Objects
✅ should reject a null value
✅ should reject an Immutable.Map containing one invalid Immutable.Map
✅ should reject an Object containing one invalid Object
✅ should reject any other non-null data type
validateIdentifier* functions validateIdentifierType with no type set
✅ should pass any positive integer value
✅ should reject a null value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateIdentifier* functions validateIdentifierType with type set
✅ should pass any positive integer value which is a type ID
✅ should reject a null value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject any positive integer value which isn't a type ID
✅ should reject zero
validateIdentifier* functions validateIdentifierValue with no type set
✅ should pass any non-empty string value
✅ should reject a null value
✅ should reject an empty string
✅ should reject any non-string value
validateIdentifier* functions validateIdentifierValue with type set
✅ should pass a non-empty string value that matches the validation regular expression
✅ should reject a non-empty string value that doesn't match the validation regular expression
✅ should reject a null value
✅ should reject an empty string
✅ should reject any non-string value
✅ test/src/client/entity-editor/validators/test-name-section.js
validateNameSection* functions validateNameSection
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid disambiguation
✅ should reject an Object with an invalid language
✅ should reject an Object with an invalid name
✅ should reject an Object with an invalid sort name
✅ should reject any other non-null data type
validateNameSection* functions validateNameSectionDisambiguation
✅ should pass a null value
✅ should pass any non-empty string value
✅ should reject an empty string
✅ should reject any non-string value
validateNameSection* functions validateNameSectionLanguage
✅ should pass any positive integer value
✅ should reject a null value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateNameSection* functions validateNameSectionName
✅ should pass any non-empty string value
✅ should reject a null value
✅ should reject an empty string
✅ should reject any non-string value
validateNameSection* functions validateNameSectionSortName
✅ should pass any non-empty string value
✅ should reject a null value
✅ should reject an empty string
✅ should reject any non-string value
✅ test/src/client/entity-editor/validators/test-publication.js
validateEditionGroupSection* functions validateEditionGroupSection
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass any other non-null data type
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid type
validateEditionGroupSection* functions validateEditionGroupSectionType
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
validateEditionGroupSection* functions validateForm
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an Object with an empty submission section
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid alias editor
✅ should reject an Object with an invalid Edition Group section
✅ should reject an Object with an invalid identifier editor
✅ should reject an Object with an invalid name section
✅ should reject any other non-null data type
✅ test/src/client/entity-editor/validators/test-publisher.js
validatePublisherSection* functions validateForm
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an Object with an empty submission section
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid alias editor
✅ should reject an Object with an invalid identifier editor
✅ should reject an Object with an invalid name section
✅ should reject an Object with an invalid publisher section
✅ should reject any other non-null data type
validatePublisherSection* functions validatePublisherSection
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass any other non-null data type
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid area
✅ should reject an Object with an invalid begin date
✅ should reject an Object with an invalid end date
✅ should reject an Object with an invalid ended flag
✅ should reject an Object with an invalid type
validatePublisherSection* functions validatePublisherSectionArea
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid ID
✅ should reject any other non-null data type
validatePublisherSection* functions validatePublisherSectionBeginDate
✅ should pass an empty value object
✅ should pass an object containing a valid year and month value
✅ should pass an object containing a valid year value
✅ should pass an object containing a valid year, month and day value
✅ should reject all other forms of invalid dates
validatePublisherSection* functions validatePublisherSectionEndDate
✅ should pass if the begin date is empty/undefined/invalid
✅ should pass if the begin date occurs before the end one
✅ should reject if the begin date occurs after the end one
✅ should reject if the end date is invalid
validatePublisherSection* functions validatePublisherSectionEnded
✅ should pass a null value
✅ should pass any boolean value
✅ should reject any non-boolean value
validatePublisherSection* functions validatePublisherSectionType
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
✅ test/src/client/entity-editor/validators/test-series.js
validateSeriesSection* functions validateForm
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an Object with an empty submission section
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid alias editor
✅ should reject an Object with an invalid identifier editor
✅ should reject an Object with an invalid name section
✅ should reject an Object with an invalid series section
✅ should reject any other non-null data type
validateSeriesSection* functions validateSeriesSection
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid ordering type
✅ should reject an Object with an invalid series type
✅ should reject any other non-null data type
validateSeriesSection* functions validateSeriesSectionEntityType
✅ should return false if passed a invalid series type
✅ should return true if passed a valid series type
validateSeriesSection* functions validateSeriesSectionOrderingType
✅ should pass any positive integer value
✅ should reject a null value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
✅ test/src/client/entity-editor/validators/test-submission-section.js
validateSubmissionSection* functions validateSubmissionSection
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an empty note Immutable.Map
✅ should pass an Object with an empty note
✅ should reject any other non-null data type
validateSubmissionSection* functions validateSubmissionSectionNote
✅ should pass a null value
✅ should pass any non-empty string value
✅ should reject an empty string
✅ should reject any non-string value
✅ test/src/client/entity-editor/validators/test-work.js
validateWorkSection* functions validateForm
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass an Object with an empty submission section
✅ should reject a null value
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid alias editor
✅ should reject an Object with an invalid identifier editor
✅ should reject an Object with an invalid name section
✅ should reject an Object with an invalid work section
✅ should reject any other non-null data type
validateWorkSection* functions validateWorkSection
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should pass any other non-null data type
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid language
✅ should reject an Object with an invalid type
validateWorkSection* functions validateWorkSectionLanguage
✅ should pass a null value
✅ should pass a valid Immutable.Map
✅ should pass a valid Object
✅ should reject an invalid Immutable.Map
✅ should reject an Object with an invalid value
✅ should reject any other non-null data type
validateWorkSection* functions validateWorkSectionType
✅ should pass a null value
✅ should pass any positive integer value
✅ should reject an negative number
✅ should reject any non-number value
✅ should reject NaN
✅ should reject zero
✅ test/src/client/unified-form/validators/test-cover-tab.js
CoverTabValidators validateCoverTabState
✅ should be false for modified cover tab state
✅ should be true for unmodified cover tab state
CoverTabValidators validateISBNState
✅ should be false for invalid isbn type
✅ should be true for valid isbn type
✅ test/src/client/unified-form/validators/test-detail-tab.js
DetailTabValidators
✅ should be false for modified detail-tab state
✅ should be true for unmodified detail-tab state
✅ test/src/server/helpers/collections.js
getOrderedCollectionsForEditorPage
✅ should return 1 collection when editor1 is logged in (fetching "Edition-Collection" for editor1)
✅ should return all collections when editor1 is logged in (fetching collections for editor1)
✅ should return all collections when editor2 is logged in (fetching collections for editor2)
✅ should return collections with expected keys
✅ should return correct collections when passed with an offset (fetching for editor1)
✅ should return only public collections when no one is logged in (fetching collections for editor1)
✅ should return only public collections when no one is logged in (fetching collections for editor2)
getOrderedPublicCollections
✅ should return collections when a filter is applied
✅ should return collections when passed with an offset
✅ should return collections with expected keys
✅ test/src/server/helpers/revisions.js
getAssociatedEntityRevisions
✅ should return formatted revisions array after adding entities (1 revision with multiple (different type) entities revised)
✅ should return formatted revisions array after adding entities (1 revision with multiple entities ( same type ) revised)
✅ should return formatted revisions array after adding entities (5 revision each with single entity revised)
✅ should return formatted revisions array after adding entity (1 revision with 1 entity revised)
getOrderedRevisionForEditorPage
✅ should return no results if offset is higher than total revisions
✅ should return sorted revisions with notes sorted according to "postedAt"
✅ should return sorted revisions with the expected keys
✅ should return the expected subset of revisions when passed an offset (from)
✅ should throw an error for an invalid editor
getOrderedRevisions
✅ should return no results if offset is higher than total revisions
✅ should return sorted revisions with the expected keys
✅ should return the expected subset of revisions when passed an offset (from)
getOrderedRevisionsForEntityPage
✅ should return ordered revisions with expected keys (Author Revision)
✅ should return ordered revisions with expected keys (edition revision)
✅ should return ordered revisions with expected keys (EditionGroup revision)
✅ should return ordered revisions with expected keys (publisher revision)
✅ should return ordered revisions with expected keys (work revision)
✅ should return revisions of merged entities
✅ should return revisions of previously merged entities recursively
✅ should return revisions with notes sorted according to "postedAt" and with expected keys
✅ test/src/server/helpers/utils.js
Convert ISBNs
✅ should return null if isbn10 not valid
✅ should return null if isbn13 not valid
✅ should return valid isbn10 from isbn13
✅ should return valid isbn13 from isbn10
generateIdenfierState
✅ should return correctly formatted identifier state
getIdByField
✅ should return null if item does not exists
✅ should return the ID for an existing item
getNextEnabledAndResultsArray
✅ should return an array of required length and nextEnabled:false when results.length < size
✅ should return an array of required length and nextEnabled:false when results.length = 0
✅ should return an array of required length and nextEnabled:false when results.length = size
✅ should return an array of required length and nextEnabled:true when results.length > size
✅ should return an array of required length and nextEnabled:true when results.length > size and results.length - size > 1
parseLanguages
✅ should return correctly formatted languages state
searchOption
✅ should return correct option if match found
✅ should return null if no exact match found
✅ test/src/server/routes/collection.js
POST /collection/:collectionID/add
✅ should be able to add multiple items
✅ should be able to add to my own collection
✅ should be able to add to private collection I"m collaborator of
✅ should be able to add to public collection I"m collaborator of
✅ should not add duplicate items
✅ should not be able to add to a private collection I’m not a collaborator of
✅ should not be able to add to a public collection I’m not a collaborator of
✅ should throw an error when trying to add an entity of type different than the collection type
✅ should throw an error when trying to add an entity that does not exist
✅ should throw an error when trying to add entity with invalid bbid
✅ should throw error for empty bbid array
POST /collection/:collectionID/remove
✅ should be able to remove from my own collection
✅ should be able to remove from private collection I"m collaborator of
✅ should be able to remove from public collection I"m collaborator of
✅ should be able to remove multiple items
✅ should not be able to remove from a private collection I’m not a collaborator of
✅ should not be able to remove from a public collection I’m not a collaborator of
✅ should throw error for empty bbid array
✅ should throw error when trying to remove an entity that do not exist in the collection
✅ should throw error when trying to remove an entity with invalid bbid
POST /collection/collectionID/collaborator/remove
✅ should allow collaborator to stop collaboration
✅ should allow the owner to remove collaborators
✅ should throw error if a collaborator tries to remove another collaborator
✅ should throw error if collaboratorIds array is empty
✅ should throw error when trying to remove incorrect collaborator
✅ should throw error when unauthorized (neither collaborator nor owner) tries to remove collaborators
POST /collection/collectionID/delete
✅ should be able to delete my collection
✅ should delete all the collaborators along with the collection
✅ should delete all the items along with the collection
✅ should not allow collaborator to delete the collection
✅ should not allow unauthorized user to delete the collection
✅ should remove collection from ES index
POST /collection/create
✅ should add the collection in the ES index
✅ should correctly add collaborators in the collection
✅ should correctly create collection and return with status code 200 for correct data
✅ should correctly create Edition-Group collection and return with status code 200 for correct data
✅ should throw error for empty collection name
✅ should throw error for incorrect collaborator id (collaborator does not exist)
✅ should throw error for incorrect entityType
✅ should throw error for invalid collaborator id (negative number)
✅ should throw error for invalid collaborator id (string)
POST collection/edit
✅ should correctly add a new collaborator and return 200 status code
✅ should correctly remove a collaborator and return 200 status code
✅ should correctly update the collection and return 200 status code
✅ should correctly update the collection to Edition-Group type and return 200 status code
✅ should throw error for empty collection name
✅ should throw error for incorrect collaborator id (collaborator does not exist)
✅ should throw error for incorrect entityType
✅ should throw error for invalid collaborator id (negative number)
✅ should throw error for invalid collaborator id (string)
✅ should throw error when collaborator tries to edit the collection
✅ should throw error when trying to edit entityType of a non empty collection
✅ should throw error when unauthorized user tries to edit the collection
✅ should update the collection in the ES index
✅ test/src/server/routes/editor.js
Editor with Administrator priv
✅ should be able to edit privs of an editor
Editor without Administrator priv
✅ should not be able to edit privs of an editor
getEditorActivity
✅ should give count months with zero or multiple revisions
✅ should not throw error when editor has zero revisions
✅ should return revision data for graph
✅ should throw an error for an invalid endDate
✅ should throw an error for an invalid startDate
✅ should throw an error when startDate is greater than endDate
✅ test/src/server/routes/entity/author.js
Author routes with entity editing priv
✅ should not throw an error if creating new author
✅ should not throw an error if requested author BBID exists
✅ should not throw an error trying to edit an existing author
✅ should not throw error while seeding author
✅ should not throw not authorized error while seeding author
✅ should throw an error if requested BBID is invalid
Author routes without entity editing priv
✅ should throw an error if trying to open author create page
✅ should throw an error trying to edit an existing author
✅ should throw an error when trying to delete an existing author
✅ should throw not authorized error while seeding author
✅ test/src/server/routes/entity/edition-group.js
Edition Group routes with entity editing priv
✅ should not throw an error if creating new edition-group
✅ should not throw an error if requested edition group BBID exists
✅ should not throw an error trying to edit an existing edition group
✅ should not throw error while seeding edition group
✅ should not throw not authorized error while seeding edition group
✅ should throw an error if requested BBID is invalid
Edition Group routes without entity editing priv
✅ should throw an error if trying to open edition-group create page
✅ should throw an error trying to edit an existing edition-group
✅ should throw an error when trying to delete an existing edition-group
✅ should throw not authorized error while seeding edition-group
✅ test/src/server/routes/entity/edition.js
Edition routes with entity editing priv
✅ should not throw an error if creating new edition
✅ should not throw an error if requested edition BBID exists
✅ should not throw an error trying to edit an existing edition
✅ should not throw error while seeding edition
✅ should not throw not authorized error while seeding edition
✅ should throw an error if requested BBID is invalid
Edition routes without entity editing priv
✅ should throw an error if trying to open edition create page
✅ should throw an error trying to edit an existing edition
✅ should throw an error when trying to delete an existing edition
✅ should throw not authorized error while seeding edition
✅ test/src/server/routes/entity/entity.js
deleteRelationships
✅ it should delete only the relationships to the entity being deleted (meaning if entity A has rels to B and C and I deleted B, A should still have a rel to C)
✅ it should return an array containing the other entity to modify (this should also check that the returned entity model has a changed relationshipSetId)
✅ it should return an array with multiple other entities to modify if there are relationships to multiple entities
✅ it should return an empty array if the other entity is a deleted entity (no dataId)
✅ it should return an empty array if there are no relationships to delete
getDefaultAliasIndex
✅ should return 0 if there is no defaultAliasId and no alias marked as default
✅ should return null if there are no aliases in the aliasSet
✅ should return null if there is not aliasSet
✅ should return the index of the alias matching the set's defaultAliasId
✅ should return the index of the alias matching the set's defaultAliasId if it is a string
✅ should return the index of the first alias marked as default if there is no defaultAliasId
processMergeOperation
✅ should add the bbid of the merged entity to the entity_redirect table
✅ should add the entity to be merged to the returned entities
✅ should modify the relationshipSet of any entity related to an entity being merged
✅ should throw an error if there is no mergingEntities in the mergeQueue
✅ should throw an error if trying to merge into an entity not in the mergeQueue
✅ test/src/server/routes/entity/publisher.js
Publisher routes with entity editing priv
✅ should not throw an error if creating new publisher
✅ should not throw an error if requested publisher BBID exists
✅ should not throw an error trying to edit an existing publisher
✅ should not throw error while seeding publisher
✅ should not throw not authorized error while seeding publisher
✅ should throw an error if requested BBID is invalid
Publisher routes without entity editing priv
✅ should throw an error if trying to open publisher create page
✅ should throw an error trying to edit an existing publisher
✅ should throw an error when trying to delete an existing publisher
✅ should throw not authorized error while seeding publisher
✅ test/src/server/routes/entity/series.js
Series routes with entity editing priv
✅ should not throw an error if creating new series
✅ should not throw an error if requested series BBID exists
✅ should not throw an error trying to edit an existing series
✅ should not throw error while seeding series
✅ should not throw not authorized error while seeding series
✅ should throw an error if requested BBID is invalid
Series routes without entity editing priv
✅ should throw an error if trying to open series create page
✅ should throw an error trying to edit an existing series
✅ should throw an error when trying to delete an existing series
✅ should throw not authorized error while seeding series
✅ test/src/server/routes/entity/work.js
Work routes with entity editing priv
✅ should not throw an error if creating new work
✅ should not throw an error if requested work BBID exists
✅ should not throw an error trying to edit an existing work
✅ should not throw error while seeding work
✅ should not throw not authorized error while seeding work
✅ should throw an error if requested BBID is invalid
Work routes without entity editing priv
✅ should throw an error if trying to open work create page
✅ should throw an error trying to edit an existing work
✅ should throw an error when trying to delete an existing work
✅ should throw not authorized error while seeding work
✅ test/src/server/routes/merge.js
Merge routes with entity editing priv /add route
✅ should add an entity to the merge queue
✅ should allow adding another entity of same type to the merge queue
✅ should do nothing and redirect when adding the same entity BBID
✅ should recreate the merge queue if adding another entity type
✅ should throw a 404 error if entity does not exist
✅ should throw an 400 error if adding an invalid BBID
✅ should throw an 404 error if BBID is absent (invalid route)
Merge routes with entity editing priv /cancel route
✅ should clear the merge queue
Merge routes without entity editing priv /add route
✅ should throw 403 error when trying to add an entity to the merge queue
✅ should throw a 403 error if adding an invalid BBID
✅ should throw a 403 error if entity does not exist
✅ should throw an 404 error if BBID is absent (invalid route)
✅ test/src/server/routes/relationship.js
Relationship
✅ should be able to add new relationships without having previous relationships
✅ should be able to add relationship on an entity
✅ should be able to remove relationship of an entity
✅ test/src/server/routes/revision.js
checkValidRevisionId
✅ should not throw an error when revision id is valid and found
✅ should throw an error if requested id is invalid
✅ should throw an error when revision id is a decimal
✅ should throw an error when revision id is unavailable
✅ test/src/server/routes/type-editor/identifier-type.js
Identifier Type routes with Identifier Editor priv
✅ should be able to correctly update the Identifier type and return status code 200
✅ should be able to create a new Identifier type and return with status code 200
✅ should not throw an error while accessing Identifier Type Editor to create new Identifier type
✅ should not throw an error while accessing Identifier Type Editor to edit an existing Identifier type
✅ should throw a 404 error when trying to access Identifier Type Editor with a non-existent id
✅ should throw an error when trying to access Identifier Type Editor with an invalid id
Identifier Type routes without Identifier Editor priv
✅ should not be able to create a new Identifier type
✅ should not be able to update a Identifier type
✅ should throw an error when trying to access Identifier Type Editor with a non-existent id
✅ should throw an error while accessing Identifier Type Editor to create new Identifier type
✅ should throw an error while accessing Identifier Type Editor to edit an existing Identifier type
✅ test/src/server/routes/type-editor/relationship-type.js
Relationship Type routes with Relationship Editor priv
✅ should be able to correctly update the relationship type and return status code 200
✅ should be able to create a new relationship type and return with status code 200
✅ should not throw an error while accessing Relationship Type Editor to create new relationship type
✅ should not throw an error while accessing Relationship Type Editor to edit an existing relationship type
✅ should throw a 404 error when trying to access Relationship Type Editor with a non-existent id
✅ should throw an error when trying to access Relationship Type Editor with an invalid id
Relationship Type routes without Relationship Editor priv
✅ should not be able to create a new relationship type
✅ should not be able to update a relationship type
✅ should throw an error when trying to access Relationship Type Editor with a non-existent id
✅ should throw an error while accessing Relationship Type Editor to create new relationship type
✅ should throw an error while accessing Relationship Type Editor to edit an existing relationship type
✅ test/src/server/routes/unifiedform.js
Unified form routes with entity editing priv
✅ should not throw error when linking existing works to edition
✅ should not throw error while adding relationship to single entity
✅ should not throw error while creating multiple entities
✅ should not throw error while creating single entity
✅ should not throw error while editing single entity
✅ should not throw error while linking existing author to edition using AC
✅ should not throw error while linking existing edition-group to edition
✅ should not throw error while linking existing publisher to edition
✅ should throw bad request error while posting invalid form
Unified form routes without entity editing priv
✅ should throw an error if trying to open unified form create page
✅ test/test-achievement.js
achievement module Author Creator Achievement
✅ I should be given to someone with an author creation
✅ II should be given to someone with 10 author creations
✅ III should be given to someone with 100 author creations
✅ should not be given to someone with 0 author creations
achievement module awardAchievement
✅ should award achievements
✅ should reject invalid achievements
✅ should reject invalid editors
achievement module awardTitle
✅ should award titles
✅ should reject invalid editors
✅ should reject invalid titles
achievement module Explorer Achievement
✅ I should be given to someone with 10 entity views
✅ I should not be given to someone with 9 entity views
✅ II should be given to someone with 100 entity views
✅ III should be given to someone with 1000 entity views
achievement module Fun Runner Achievement
✅ should be given to someone with a revision a day for a week
✅ shouldn't be given to someone without a revision a day for a week
achievement module Hot Off the Press Achievement
✅ should be given to someone with edition revision released this week
✅ shouldn't be given when edition revision released a week ago
achievement module Limited Edition Achievement
✅ I should given to someone with an edition creation
✅ II should be given to someone with 10 edition creations
✅ III should be given to someone with 100 edition creations
✅ should not given to someone with 0 edition creations
achievement module Marathoner Achievement
✅ should be given to someone with a revision a day for 30 days
✅ shouldn't be given to someone without a revision a day for 30 days
achievement module Publisher Achievement
✅ I should be given to someone with an edition group creation
✅ II should be given to someone with 10 edition groups creations
✅ III should be given to someone with 100 edition groups creations
✅ should not be given to someone with 0 edition group creation
achievement module Publisher Creator Achievement
✅ I should be given to someone with a publisher creation
✅ II should be given to someone with 10 publisher creations
✅ III should be given to someone with 100 publisher creations
✅ should not be given to someone with 0 publisher creations
achievement module Revisionist Achievement
✅ I should be given to someone with a revision
✅ II should be given to someone with 50 revisions
✅ III should be given to someone with 250 revisions
✅ should not be given to someone without a revision
achievement module Series Creator Achievement
✅ I should be given to someone with a series creation
✅ II should be given to someone with 10 series creations
✅ III should be given to someone with 100 series creations
✅ should not be given to someone with 0 series creations
achievement module Sprinter Achievement
✅ should be given to someone with 10 revisions in an hour
✅ should not be given to someone with 9 revisions in an hour
achievement module Time Traveller Achievement
✅ should be given to someone with edition revision released after today
✅ shouldn't be given to someone with edition revision already released
achievement module Worker Bee Achievement
✅ I should be given to someone with a work creation
✅ II should be given to someone with 10 work creations
✅ III should be given to someone with 100 work creations
✅ should not be given to someone with 0 work creations
✅ test/test-render-relationship.js
renderRelationship
✅ renders a fully specified relationship
✅ renders a fully specified relationship with numeric bbids
✅ renders a relationship where the source entity is unnamed
✅ throws on a null link phrase
✅ throws on null entities
✅ works with an empty link phrase
✅ test/test-site.js
GET /
✅ should return 200
GET /about
✅ should return 200
GET /contribute
✅ should return 200
GET /develop
✅ should return 200
Loading