diff --git a/src/fragmentarium/domain/FragmentDtos.ts b/src/fragmentarium/domain/FragmentDtos.ts index 58ad7de72..9b98ccce8 100644 --- a/src/fragmentarium/domain/FragmentDtos.ts +++ b/src/fragmentarium/domain/FragmentDtos.ts @@ -80,7 +80,7 @@ export type ExternalNumbers = { export default interface FragmentDto { museumNumber: MuseumNumber - accession: MuseumNumber + accession: string editedInOraccProject: string publication: string description: string diff --git a/src/fragmentarium/infrastructure/FragmentRepository.test.ts b/src/fragmentarium/infrastructure/FragmentRepository.test.ts index c58a8996e..5863c8e1e 100644 --- a/src/fragmentarium/infrastructure/FragmentRepository.test.ts +++ b/src/fragmentarium/infrastructure/FragmentRepository.test.ts @@ -13,9 +13,6 @@ import { QueryResult } from 'query/QueryResult' import { FragmentQuery } from 'query/FragmentQuery' import { queryItemFactory } from 'test-support/query-item-factory' import { museumNumberToString } from 'fragmentarium/domain/MuseumNumber' -import { Genre, Genres } from 'fragmentarium/domain/Genres' -import { mesopotamianDateFactory } from 'test-support/date-fixtures' -import { archaeologyFactory } from 'test-support/fragment-fixtures' const apiClient = { fetchJson: jest.fn(), @@ -33,12 +30,6 @@ const folio = new Folio({ name: 'MJG', number: 'K1' }) const word = 'šim' const introduction = 'Introduction' const lemmas = 'foo I+bar II' -const genres: Genre[] = [ - new Genre(['ARCHIVE', 'Letter'], false), - new Genre(['CANONICAL', 'Divination'], true), -] -const mesopotamianDate = mesopotamianDateFactory.build() -const archaeology = archaeologyFactory.build() const museumNumber = { prefix: 'A', number: '7', suffix: '' } const queryResult: QueryResult = { items: [ @@ -323,56 +314,7 @@ const testData: TestData[] = [ fragment, [ `/fragments/${encodeURIComponent(fragmentId)}/introduction`, - { introduction }, - ], - Promise.resolve(fragmentDto) - ), - new TestData( - 'updateGenres', - [fragmentId, new Genres(genres)], - apiClient.postJson, - fragment, - [`/fragments/${encodeURIComponent(fragmentId)}/genres`, { genres }], - Promise.resolve(fragmentDto) - ), - new TestData( - 'updateDate', - [fragmentId, mesopotamianDate], - apiClient.postJson, - fragment, - [ - `/fragments/${encodeURIComponent(fragmentId)}/date`, - { date: mesopotamianDate }, - ], - Promise.resolve(fragmentDto) - ), - new TestData( - 'updateDatesInText', - [fragmentId, [mesopotamianDate]], - apiClient.postJson, - fragment, - [ - `/fragments/${encodeURIComponent(fragmentId)}/dates_in_text`, - { datesInText: [mesopotamianDate] }, - ], - Promise.resolve(fragmentDto) - ), - new TestData( - 'updateNotes', - [fragmentId, notes], - apiClient.postJson, - fragment, - [`/fragments/${encodeURIComponent(fragmentId)}/notes`, { notes }], - Promise.resolve(fragmentDto) - ), - new TestData( - 'updateArchaeology', - [fragmentId, archaeology], - apiClient.postJson, - fragment, - [ - `/fragments/${encodeURIComponent(fragmentId)}/archaeology`, - { archaeology }, + { introduction: introduction }, ], Promise.resolve(fragmentDto) ), diff --git a/src/fragmentarium/infrastructure/FragmentRepository.ts b/src/fragmentarium/infrastructure/FragmentRepository.ts index 4f2bc018b..c6676ff33 100644 --- a/src/fragmentarium/infrastructure/FragmentRepository.ts +++ b/src/fragmentarium/infrastructure/FragmentRepository.ts @@ -81,7 +81,6 @@ function createFragment(dto: FragmentDto): Fragment { return Fragment.create({ ...dto, number: museumNumberToString(dto.museumNumber), - accession: museumNumberToString(dto.accession), museum: Museum.of(dto.museum), joins: createJoins(dto.joins), measures: { diff --git a/src/fragmentarium/ui/SearchForm.tsx b/src/fragmentarium/ui/SearchForm.tsx index 7cad69ca0..9f16749bf 100644 --- a/src/fragmentarium/ui/SearchForm.tsx +++ b/src/fragmentarium/ui/SearchForm.tsx @@ -154,7 +154,7 @@ class SearchForm extends Component { type="text" name="number" value={this.state.number || ''} - placeholder="Museum, accession, CDLI, or ecavation number" + placeholder="Museum, accession, or CDLI number" aria-label="Number" onChange={( event: React.ChangeEvent diff --git a/src/fragmentarium/ui/search/__snapshots__/FragmentariumSearch.test.tsx.snap b/src/fragmentarium/ui/search/__snapshots__/FragmentariumSearch.test.tsx.snap index 7529c509b..a2d8d34c0 100644 --- a/src/fragmentarium/ui/search/__snapshots__/FragmentariumSearch.test.tsx.snap +++ b/src/fragmentarium/ui/search/__snapshots__/FragmentariumSearch.test.tsx.snap @@ -82,7 +82,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli class="form-control" id="number" name="number" - placeholder="Museum, accession, CDLI, or ecavation number" + placeholder="Museum, accession, or CDLI number" type="text" value="" /> diff --git a/src/test-support/fragment-fixtures.ts b/src/test-support/fragment-fixtures.ts index 4ec4dab54..5a133e1b8 100644 --- a/src/test-support/fragment-fixtures.ts +++ b/src/test-support/fragment-fixtures.ts @@ -234,7 +234,7 @@ export const fragmentFactory = Factory.define( const museumNumber = `${chance.word()}.${sequence}` return new Fragment( museumNumber, - `${chance.word()}.${sequence}`, + chance.word(), chance.sentence({ words: 4 }), associations.joins ?? [ [ diff --git a/src/test-support/test-fragment.ts b/src/test-support/test-fragment.ts index 4aaf82c1a..78dabd6d2 100644 --- a/src/test-support/test-fragment.ts +++ b/src/test-support/test-fragment.ts @@ -321,11 +321,7 @@ export const fragmentDto: FragmentDto = { number: 'Fragment', suffix: '', }, - accession: { - prefix: 'A', - number: '38', - suffix: 'b', - }, + accession: '', publication: 'electronic Babylonian Library', description: 'A fragment to be used when testing the eBL application', joins: [ @@ -427,7 +423,7 @@ export const fragmentDto: FragmentDto = { export const fragment = new Fragment( 'Test.Fragment', - 'A.38.b', + '', 'electronic Babylonian Library', [ [