-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3169 from dhis2/feat/release-DHIS2-18441-and-DHIS…
…2-13038 feat: release DHIS2-18441 and DHIS2-13038
- Loading branch information
Showing
222 changed files
with
3,616 additions
and
4,149 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@testing-library/dom' | ||
import '@testing-library/jest-dom' | ||
import ResizeObserver from 'resize-observer-polyfill' | ||
|
||
global.ResizeObserver = ResizeObserver | ||
|
||
configure({ | ||
testIdAttribute: 'data-test', | ||
}) |
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { When } from '@badeball/cypress-cucumber-preprocessor' | ||
import { clickViewActionButton } from '../../elements/viewDashboard.js' | ||
|
||
When('I click to preview the print layout', () => { | ||
clickViewActionButton('More') | ||
cy.get('[data-test="more-actions-button"]').click() | ||
cy.get('[data-test="print-menu-item"]').click() | ||
cy.get('[data-test="print-layout-menu-item"]').click() | ||
}) |
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
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,31 @@ | ||
Feature: Slideshow | ||
|
||
Scenario: I view a dashboard in slideshow | ||
Given I open the "Delivery" dashboard | ||
When I click the slideshow button | ||
Then item 1 is shown in fullscreen | ||
When I click the next slide button | ||
Then item 2 is shown in fullscreen | ||
When I click the previous slide button | ||
Then item 1 is shown in fullscreen | ||
When I click the exit slideshow button | ||
Then the normal view is shown | ||
|
||
|
||
Scenario: I view fullscreen on the second item of the dashboard | ||
Given I open the "Delivery" dashboard | ||
When I click the fullscreen button on the second item | ||
Then item 2 is shown in fullscreen | ||
When I click the exit slideshow button | ||
Then the normal view is shown | ||
|
||
Scenario: I view fullscreen on the third item of the dashboard and navigate backwards | ||
Given I open the "Delivery" dashboard | ||
When I click the fullscreen button on the third item | ||
Then item 3 is shown in fullscreen | ||
When I click the previous slide button | ||
Then item 2 is shown in fullscreen | ||
When I click the previous slide button | ||
Then item 1 is shown in fullscreen | ||
When I click the exit slideshow button | ||
Then the normal view is shown |
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 @@ | ||
'../common/index.js' |
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,103 @@ | ||
import { When, Then } from '@badeball/cypress-cucumber-preprocessor' | ||
import { | ||
getDashboardItem, | ||
clickMenuButton, | ||
} from '../../elements/dashboardItem.js' | ||
|
||
const sortedDashboardItemIds = ['GaVhJpqABYX', 'qXsjttMYuoZ', 'Rwb3oXJ3bZ9'] | ||
|
||
const assertItemIsVisible = (slideshowItemIndex) => { | ||
getDashboardItem(sortedDashboardItemIds[slideshowItemIndex]).should( | ||
'have.css', | ||
'opacity', | ||
'1' | ||
) | ||
} | ||
|
||
const assertItemIsNotVisible = (slideshowItemIndex) => { | ||
getDashboardItem(sortedDashboardItemIds[slideshowItemIndex]).should( | ||
'have.css', | ||
'opacity', | ||
'0' | ||
) | ||
} | ||
|
||
const getSlideshowExitButton = () => | ||
cy.getByDataTest('slideshow-exit-button', { timeout: 15000 }) | ||
|
||
When('I click the slideshow button', () => { | ||
cy.get('button').contains('Slideshow').realClick() | ||
}) | ||
|
||
Then('item 1 is shown in fullscreen', () => { | ||
getSlideshowExitButton().should('be.visible') | ||
|
||
// check that only the first item is shown | ||
assertItemIsVisible(0) | ||
assertItemIsNotVisible(1) | ||
assertItemIsNotVisible(2) | ||
|
||
cy.getByDataTest('slideshow-page-counter').should('have.text', '1 / 11') | ||
|
||
// visible item does not have context menu button | ||
getDashboardItem(sortedDashboardItemIds[0]) | ||
.findByDataTest('dashboarditem-menu-button') | ||
.should('not.exist') | ||
}) | ||
|
||
When('I click the exit slideshow button', () => { | ||
getSlideshowExitButton().realClick() | ||
}) | ||
|
||
Then('the normal view is shown', () => { | ||
getSlideshowExitButton().should('not.exist') | ||
|
||
// check that multiple items are shown | ||
assertItemIsVisible(0) | ||
assertItemIsVisible(1) | ||
assertItemIsVisible(2) | ||
|
||
// items have context menu button | ||
getDashboardItem(sortedDashboardItemIds[0]) | ||
.findByDataTest('dashboarditem-menu-button') | ||
.should('be.visible') | ||
|
||
getDashboardItem(sortedDashboardItemIds[1]) | ||
.findByDataTest('dashboarditem-menu-button') | ||
.should('be.visible') | ||
}) | ||
|
||
// When I click the next slide button | ||
When('I click the next slide button', () => { | ||
cy.getByDataTest('slideshow-next-button').realClick() | ||
}) | ||
|
||
Then('item 2 is shown in fullscreen', () => { | ||
assertItemIsNotVisible(0) | ||
assertItemIsVisible(1) | ||
assertItemIsNotVisible(2) | ||
|
||
cy.getByDataTest('slideshow-page-counter').should('have.text', '2 / 11') | ||
}) | ||
|
||
When('I click the previous slide button', () => { | ||
cy.getByDataTest('slideshow-prev-button').realClick() | ||
}) | ||
|
||
When('I click the fullscreen button on the second item', () => { | ||
clickMenuButton(sortedDashboardItemIds[1]) | ||
cy.contains('View fullscreen').realClick() | ||
}) | ||
|
||
When('I click the fullscreen button on the third item', () => { | ||
clickMenuButton(sortedDashboardItemIds[2]) | ||
cy.contains('View fullscreen').realClick() | ||
}) | ||
|
||
Then('item 3 is shown in fullscreen', () => { | ||
assertItemIsNotVisible(0) | ||
assertItemIsNotVisible(1) | ||
assertItemIsVisible(2) | ||
|
||
cy.getByDataTest('slideshow-page-counter').should('have.text', '3 / 11') | ||
}) |
Oops, something went wrong.