Issue 524 - Readonly dropdown column content#530
Conversation
- test both the editable and readonly versions of the dropdown
| DashTable.getCell(2, 6).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); | ||
| DashTable.getCell(3, 6).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); | ||
|
|
||
| DashTable.getCell(0, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); |
There was a problem hiding this comment.
also check the readonly column
| DashTable.getCell(0, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Wet')); | ||
| DashTable.getCell(1, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Snowy')); | ||
| DashTable.getCell(2, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Tropical Beaches')); | ||
| DashTable.getCell(3, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); |
There was a problem hiding this comment.
also check the readonly column
| DashTable.getCell(0, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Wet')); | ||
| DashTable.getCell(1, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Snowy')); | ||
| DashTable.getCell(2, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Tropical Beaches')); | ||
| DashTable.getCell(3, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); |
There was a problem hiding this comment.
also check the readonly column
| DashTable.getCell(0, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); | ||
| DashTable.getCell(1, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); | ||
| DashTable.getCell(2, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); | ||
| DashTable.getCell(3, 7).within(() => cy.get('.dash-cell-value').should('have.html', 'label: Humid')); |
There was a problem hiding this comment.
also check the readonly column
| ) | ||
| } | ||
| }} | ||
| />) |
There was a problem hiding this comment.
visual tests for readonly and editable dropdowns
There was a problem hiding this comment.
Used in conjonction with the updated standalone tests above
| 'bbb-readonly': { | ||
| clearable: true, | ||
| options: ['Humid', 'Wet', 'Snowy', 'Tropical Beaches'].map(i => ({ | ||
| label: `label: ${i}`, |
There was a problem hiding this comment.
Differentiate between the label and value to catch these differences in the tests.
|
|
||
| enum CellType { | ||
| Dropdown, | ||
| DropdownLabel, |
There was a problem hiding this comment.
To make it easier to distinguish between the general label case and the dropdown one. Processing is different.
|
|
||
| DashTable.getFilterById('bbb').within(() => cy.get('input').should('have.value', 'Tr')); | ||
| DashTable.getCellById(0, 'bbb-readonly').within(() => cy.get('.dash-cell-value').should('have.html', 'Tropical Beaches')); | ||
| DashTable.getCellById(0, 'bbb-readonly').within(() => cy.get('.dash-cell-value').should('have.html', 'label: Tropical Beaches')); |
There was a problem hiding this comment.
Update tests involving dropdowns so as to expect the label: prefix
alexcjohnson
left a comment
There was a problem hiding this comment.
Works for me - nicely done. 💃
Closes #524. Fixes regression introduced by #281.