Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions cypress/integration/dimensions/data.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,39 @@ describe('Data dimension', () => {
expectSourceToNotBeLoading()
expectSelectableDataItemsAmountToBeLeast(PAGE_SIZE)
})
it('can search by uid in global search', () => {
goToStartPage()
openDimension(DIMENSION_ID_DATA)
expectDataDimensionModalToBeVisible()
expectSelectableDataItemsAmountToBeLeast(PAGE_SIZE)

const testUid = 'Uvn6LCg7dVU'
const expectedItemName = 'ANC 1 Coverage'

// searching for a uid returns the matching item
cy.intercept('GET', DATA_ITEMS_URL).as('uidSearchRequest')
inputSearchTerm(testUid)
cy.wait('@uidSearchRequest').then(({ request, response }) => {
expect(request.url).to.contain('page=1')
expect(request.url).to.contain(testUid)
expect(response.statusCode).to.eq(200)
expect(response.body.dataItems.length).to.eq(1)
})
expectSourceToNotBeLoading()
expectSelectableDataItemsAmountToBe(1)
expectItemToBeSelectable(expectedItemName)

// clear the search
cy.intercept('GET', DATA_ITEMS_URL).as('uidSearchClear')
clearSearchTerm()
cy.wait('@uidSearchClear').then(({ request, response }) => {
expect(request.url).to.contain('page=1')
expect(response.statusCode).to.eq(200)
expect(response.body.dataItems.length).to.be.eq(PAGE_SIZE)
})
expectSourceToNotBeLoading()
expectSelectableDataItemsAmountToBeLeast(PAGE_SIZE)
})
// VERSION-TOGGLE: remove when 42 is lowest supported version
it(['>=42'], 'can toggle option view mode', () => {
goToStartPage()
Expand Down
2 changes: 1 addition & 1 deletion docs/data-visualizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ To select items for a dimension, open the dimension modal window by clicking on

#### Select data items

When selecting data items, there are different ways to filter the displayed items. By using the search field at the top, a global search by item name is performed across the currently selected **Data Type**. By selecting a **Data Type** from the dropdown, items can be filtered by type and subtype, where the subtype available depends on the selected data type. The name search and the type/subtype filtering can be combined as well for a more detailed filter. The type of each displayed item is indicated on the right and a corresponding icon is shown on the left of the item.
When selecting data items, there are different ways to filter the displayed items. By using the search field at the top, a global search by item name, id or code is performed across the currently selected **Data Type**. By selecting a **Data Type** from the dropdown, items can be filtered by type and subtype, where the subtype available depends on the selected data type. The name search and the type/subtype filtering can be combined as well for a more detailed filter. The type of each displayed item is indicated on the right and a corresponding icon is shown on the left of the item.

![](resources/images/data-visualizer-cc-data-modal.png)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"typescript-eslint": "^8.35.0"
},
"dependencies": {
"@dhis2/analytics": "29.0.3",
"@dhis2/analytics": "^29.1.0",
"@dhis2/app-runtime": "^3.14.1",
"@dhis2/app-service-datastore": "^1.0.0-beta.3",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/ui": "^10.7.7",
"@dhis2/ui": "^10.12.7",
"decode-uri-component": "^0.2.2",
"history": "^5.3.0",
"lodash-es": "^4.17.21",
Expand Down
Loading
Loading