You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,15 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
12
12
- Contact Owner button in File Page.
13
13
- Share button in File Page.
14
14
- Link Collection and Link Dataset features.
15
+
- With the addition of the new runtime configuration approach, we now support dynamic configuration for languages. If more than one language is configured, the Language Switcher will be shown in the header to allow users to change the language.
15
16
16
17
### Changed
17
18
18
19
- Add pagination support to the Dataset Version Summaries and File Version Summaries use cases by introducing optional pagination object. #885
19
20
- Refactored pagination to use consistent `CollectionItemsPaginationInfo` object in getMyDataCollectionItems, instead of individual limit/selectedPage parameters.
20
21
- Use of the new `sourceLastUpdateTime` query parameter from update dataset and file metadata endpoints to support optimistic concurrency control during editing operations. See [Edit Dataset Metadata](https://guides.dataverse.org/en/6.8/api/native-api.html#edit-dataset-metadata) and [Updating File Metadata](https://guides.dataverse.org/en/6.8/api/native-api.html#updating-file-metadata) guides for more details.
21
22
- Changed the way we were handling DATE type metadata field validation to better match the backend validation and give users better error messages. For example, for an input like “foo AD”, we now show “Production Date is not a valid date. The AD year must be numeric.“. For an input like “99999 AD”, we now show “Production Date is not a valid date. The AD year cant be higher than 9999.“. For an input like “[-9999?], we now show “Production Date is not a valid date. The year in brackets cannot be negative.“, etc.
23
+
- The SPA now fetches the runtime configuration from `config.js` on each load, allowing configurations without rebuilding the app. We don't use `.env` variables at build time anymore.
'renders language options correctly when more than one language is configured',
839
+
{
840
+
env: {
841
+
languages: [
842
+
{ code: 'en', name: 'English' },
843
+
{ code: 'es', name: 'Español' },
844
+
{ code: 'it', name: 'Italiano' }
845
+
]
846
+
}
847
+
},
848
+
() => {
849
+
cy.customMount(<LanguageSwitcher />)
850
+
cy.get('#language-switcher-dropdown').click()
851
+
cy.findByText('English').should('exist')
852
+
cy.findByText('Español').should('exist')
853
+
cy.findByText('Italiano').should('exist')
854
+
}
855
+
)
856
+
```
857
+
858
+
#### E2E tests: intercept public/config.js
859
+
860
+
In e2e tests, the app fetches `public/config.js`. Intercept that request and respond with a body built from your `Cypress.env()` settings using the provided helper.
861
+
862
+
```ts
863
+
// Example e2e spec
864
+
import { buildConfigJsBody } from '../tests/support/bootstrapAppConfig'
865
+
866
+
it(
867
+
'test description',
868
+
{
869
+
env: {
870
+
languages: [
871
+
{ code: 'en', name: 'English' },
872
+
{ code: 'it', name: 'Italiano' }
873
+
],
874
+
defaultLanguage: 'en'
875
+
}
876
+
},
877
+
() => {
878
+
// We intercept config.js request and the body will read from the updated Cypress.env() defined in this test above.
0 commit comments