-
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.
- Loading branch information
1 parent
87f4df3
commit 7d83b1a
Showing
2 changed files
with
68 additions
and
1 deletion.
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,62 @@ | ||
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', | ||
} | ||
|
||
// const openMoreMenuWithOptions = (numOptions) => { | ||
// cy.get('[data-test="moremenubutton"]').first().click() | ||
|
||
// cy.get('[data-test="more-menu"]') | ||
// .find('li') | ||
// .not('.disabled') | ||
// .should('have.length', numOptions) | ||
|
||
// cy.get('[data-test="more-menu"]') | ||
// .find('li') | ||
// .contains('Show data table') | ||
// .click() | ||
|
||
// //check that the bottom panel is present | ||
// cy.getByDataTest('bottom-panel').should('be.visible') | ||
|
||
// // option switched to "Hide data table" | ||
|
||
// } | ||
|
||
describe('data table', () => { | ||
it('opens data table', () => { | ||
cy.visit(`/?id=${map.id}`, EXTENDED_TIMEOUT) | ||
cy.get('canvas', EXTENDED_TIMEOUT).should('be.visible') | ||
|
||
cy.get('[data-test="moremenubutton"]').first().click() | ||
|
||
cy.get('[data-test="more-menu"]') | ||
.find('li') | ||
.not('.disabled') | ||
.should('have.length', 6) | ||
|
||
cy.get('[data-test="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') | ||
}) | ||
}) |
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