-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: navigating by the changing url ignored download mode and interpr…
…etation id parameters (#3125) Fixes https://dhis2.atlassian.net/browse/DHIS2-16810 Always dispatch setDownloadMode and setInterpretationId based on the current location parameters. --------- Co-authored-by: Joseph John Aas Cooper <joe@dhis2.org> Co-authored-by: Joe Cooper <33054985+cooper-joe@users.noreply.github.com>
- Loading branch information
1 parent
7f5d178
commit fcc5eaa
Showing
16 changed files
with
219 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { EXTENDED_TIMEOUT } from '../support/util.js' | ||
|
||
const map = { | ||
id: 'eDlFx0jTtV9', | ||
name: 'ANC: LLITN Cov Chiefdom this year', | ||
downloadFileNamePrefix: 'ANC LLITN Cov Chiefdom this year', | ||
cardTitle: 'ANC LLITN coverage', | ||
cardSelector: 'card-ANCLLITNcoverage', | ||
} | ||
|
||
describe('ui', () => { | ||
it('collapses and expands the Layers Panel', () => { | ||
cy.visit(`/#/${map.id}`, EXTENDED_TIMEOUT) | ||
cy.get('canvas', EXTENDED_TIMEOUT).should('be.visible') | ||
|
||
// check that Layers Panel is visible | ||
cy.getByDataTest('add-layer-button').should('be.visible') | ||
cy.getByDataTest('layers-panel').should('be.visible') | ||
cy.getByDataTest(map.cardSelector).should('be.visible') | ||
|
||
// collapse Layers Panel | ||
cy.getByDataTest('layers-toggle-button').click() | ||
|
||
// check that Layers Panel is not visible | ||
cy.getByDataTest('add-layer-button').should('be.visible') // this button is always visible | ||
// should have class collapsed | ||
cy.getByDataTest('layers-panel').should('not.be.visible') | ||
cy.getByDataTest('layers-panel').should('have.css', 'width', '0px') | ||
cy.getByDataTest(map.cardSelector).should('not.exist') | ||
|
||
// expand Layers Panel | ||
cy.getByDataTest('layers-toggle-button').click() | ||
|
||
// check that Layers Panel is visible | ||
cy.getByDataTest('add-layer-button').should('be.visible') | ||
cy.getByDataTest('layers-panel').should('be.visible') | ||
cy.getByDataTest(map.cardSelector).should('be.visible') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.