-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into fix/load-external-layer
- Loading branch information
Showing
13 changed files
with
383 additions
and
56 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
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,59 @@ | ||
import { getMaps } from '../../elements/map_canvas.js' | ||
import { OrgUnitLayer } from '../../elements/orgunit_layer.js' | ||
import { ThematicLayer } from '../../elements/thematic_layer.js' | ||
|
||
const INDICATOR_NAME = 'ANC 1 Coverage' | ||
|
||
describe('Multiple Layers', () => { | ||
beforeEach(() => { | ||
cy.visit('/') | ||
}) | ||
|
||
const TLayer = new ThematicLayer() | ||
const OULayer = new OrgUnitLayer() | ||
|
||
it('adds a thematic layer and an orgunit layer', () => { | ||
TLayer.openDialog('Thematic') | ||
.selectIndicatorGroup('ANC') | ||
.selectIndicator(INDICATOR_NAME) | ||
.selectTab('Period') | ||
.selectPeriodType('Yearly') | ||
.selectTab('Org Units') | ||
.selectOu('Sierra Leone') | ||
.selectOuLevel('District') | ||
.addToMap() | ||
|
||
TLayer.validateDialogClosed(true) | ||
|
||
TLayer.validateCardTitle(INDICATOR_NAME) | ||
|
||
getMaps().should('have.length', 1) | ||
|
||
OULayer.openDialog('Org units') | ||
.selectOu('Sierra Leone') | ||
.selectOuLevel('District') | ||
.addToMap() | ||
|
||
OULayer.validateDialogClosed(true) | ||
|
||
OULayer.validateCardTitle('Organisation units') | ||
OULayer.validateCardItems(['District']) | ||
|
||
cy.getByDataTest('sortable-layers-list') | ||
.children() | ||
.should('have.length', 2) | ||
|
||
// confirm the order of the cards | ||
cy.getByDataTest('sortable-layers-list') | ||
.children() | ||
.first() | ||
.should('contain', 'Organisation units') | ||
|
||
cy.getByDataTest('sortable-layers-list') | ||
.children() | ||
.last() | ||
.should('contain', INDICATOR_NAME) | ||
|
||
// TODO - add a test for drag/drop reordering of the layers | ||
}) | ||
}) |
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
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.