-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add fullscreen option to visualization items [DHIS2-9879] (#1358)
Adds fullscreen button to Visualization items * No cypress tests added since it isn't currently possible to test the fullscreen api in cypress. I'll be keeping an eye on if/when this gets implemented in cypress (cypress-io/cypress#7776) * Minor refactor: move check for whether to show ItemHeaderButtons (pluginIsAvailable) out of ItemHeaderButtons and to Item, so that the logic doesn't get too complex in ItemHeaderButtons (would have been first checking pluginIsAvailable, then checking the fullsreen prop)
- Loading branch information
1 parent
132322d
commit 746d7b0
Showing
15 changed files
with
239 additions
and
16 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,5 @@ | ||
> 0.5% | ||
last 2 versions | ||
Firefox ESR | ||
not ie 11 | ||
not dead |
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,15 @@ | ||
Feature: Item context menu fullscreen | ||
|
||
Background: | ||
Given I open the "Antenatal Care" dashboard | ||
And the "Antenatal Care" dashboard displays in view mode | ||
|
||
@nonmutating | ||
Scenario: Text item does not have a context menu | ||
Then the text item does not have a context menu | ||
|
||
@nonmutating | ||
Scenario: Chart item has a fullscreen option | ||
Then the chart item has a fullscreen option in the context menu | ||
|
||
|
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,18 @@ | ||
import { Then } from 'cypress-cucumber-preprocessor/steps' | ||
import { | ||
getDashboardItem, | ||
itemMenuButton, | ||
clickMenuButton, | ||
} from '../../../selectors/dashboardItem' | ||
import { dashboards } from '../../../assets/backends' | ||
|
||
Then('the text item does not have a context menu', () => { | ||
getDashboardItem(dashboards['Antenatal Care'].items.text.itemUid) | ||
.find(itemMenuButton) | ||
.should('not.exist') | ||
}) | ||
|
||
Then('the chart item has a fullscreen option in the context menu', () => { | ||
clickMenuButton(dashboards['Antenatal Care'].items.chart.itemUid) | ||
cy.contains('View fullscreen').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
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.