-
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.
chore: add data table cypress test and enable orgunitinfo test (#3114)
- Loading branch information
1 parent
5f03005
commit 7c84557
Showing
7 changed files
with
87 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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', | ||
} | ||
|
||
describe('data table', () => { | ||
it('opens data table', () => { | ||
cy.visit(`/#/${map.id}`, EXTENDED_TIMEOUT) | ||
cy.get('canvas', EXTENDED_TIMEOUT).should('be.visible') | ||
|
||
cy.getByDataTest('moremenubutton').first().click() | ||
|
||
cy.getByDataTest('more-menu') | ||
.find('li') | ||
.not('.disabled') | ||
.should('have.length', 6) | ||
|
||
cy.getByDataTest('more-menu') | ||
.find('li') | ||
.contains('Show data table') | ||
.click() | ||
|
||
//check that the bottom panel is present | ||
cy.getByDataTest('bottom-panel').should('be.visible') | ||
|
||
// check number of columns | ||
cy.getByDataTest('bottom-panel') | ||
.find('[role="columnheader"]') | ||
.should('have.length', 10) | ||
|
||
// try the filtering | ||
cy.getByDataTest('bottom-panel') | ||
.find('[role="columnheader"]') | ||
.containsExact('Name') | ||
.siblings('input') | ||
.type('Kakua') | ||
|
||
// check that the filter worked | ||
cy.getByDataTest('bottom-panel') | ||
.find('.ReactVirtualized__Table__row') | ||
.should('have.length', 1) | ||
}) | ||
}) |
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