-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to mocha in dynamic smoke tests (#71)
* test: changes smoke tests from cucumber to mocha * temp: remove slakc * fix config * config change * fix: smoke wrapper * fix: remove smoke wrapper and jira issues * fix * fix: cleanup * fix: spaces and new lines
- Loading branch information
Showing
45 changed files
with
966 additions
and
634 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
import Page from './Page' | ||
import { waitForVisible } from '#support/wait'; | ||
|
||
class AppsList extends Page { | ||
get apps() { | ||
return browser.$$('a'); | ||
} | ||
|
||
get table() { | ||
return browser.$('table'); | ||
} | ||
|
||
open () { | ||
super.open('dhis-web-apps'); | ||
|
||
waitForVisible(this.table); | ||
} | ||
} | ||
|
||
export default AppsList; | ||
export const appsList = new AppsList(); |
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 @@ | ||
import Page from '../Page' | ||
import { waitForWindowToLoad, waitForVisible } from '#support/wait'; | ||
|
||
class DataVisualiser extends Page { | ||
get visualisationList() { | ||
browser.url('api/visualizations.json?fields=id,displayName&paging=false' ); | ||
waitForVisible(browser.$('body pre')); | ||
|
||
return JSON.parse(browser.$('body pre').getHTML(false))['visualizations']; | ||
} | ||
|
||
get gettingStartedElement() { | ||
return browser.$('[data-test="start-screen"]'); | ||
} | ||
|
||
open() { | ||
super.open('dhis-web-data-visualizer') | ||
} | ||
|
||
openFavorite(id) { | ||
super.open('dhis-web-data-visualizer/#/' + id); | ||
waitForWindowToLoad(); | ||
} | ||
|
||
dataExist() { | ||
return !browser.$('//*[contains(translate(text(), "No", "no"), "no data")]').isExisting(); | ||
} | ||
} | ||
|
||
export default DataVisualiser; | ||
export const dataVisualiser = new DataVisualiser(); |
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,27 @@ | ||
import Page from '../Page' | ||
import { waitForWindowToLoad, waitForVisible } from '#support/wait'; | ||
|
||
class EventReports extends Page { | ||
get visualisationList() { | ||
browser.url('api/eventReports.json?fields=id,displayName&paging=false' ); | ||
waitForVisible(browser.$('body pre')); | ||
|
||
return JSON.parse(browser.$('body pre').getHTML(false))['eventReports']; | ||
} | ||
|
||
open() { | ||
super.open('dhis-web-event-reports') | ||
} | ||
|
||
openFavorite(id) { | ||
super.open('dhis-web-event-reports/?id=' + id); | ||
waitForWindowToLoad(); | ||
} | ||
|
||
dataExist() { | ||
return !browser.$('//*[contains(translate(text(), "No", "no"), "no data")]').isExisting(); | ||
} | ||
} | ||
|
||
export default EventReports; | ||
export const eventReports = new EventReports(); |
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,27 @@ | ||
import Page from '../Page' | ||
import { waitForWindowToLoad, waitForVisible } from '#support/wait'; | ||
|
||
class EventVisualiser extends Page { | ||
get visualisationList() { | ||
browser.url('api/eventCharts.json?fields=id,displayName&paging=false' ); | ||
waitForVisible(browser.$('body pre')); | ||
|
||
return JSON.parse(browser.$('body pre').getHTML(false))['eventCharts']; | ||
} | ||
|
||
open() { | ||
super.open('dhis-web-event-visualizer') | ||
} | ||
|
||
openFavorite(id) { | ||
super.open('dhis-web-event-visualizer/?id=' + id); | ||
waitForWindowToLoad(); | ||
} | ||
|
||
dataExist() { | ||
return !browser.$('//*[contains(translate(text(), "No", "no"), "no data")]').isExisting(); | ||
} | ||
} | ||
|
||
export default EventVisualiser; | ||
export const eventVisualiser = new EventVisualiser(); |
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 @@ | ||
import Page from '../Page' | ||
import { waitForWindowToLoad, waitForVisible } from '#support/wait'; | ||
|
||
class Maps extends Page { | ||
get visualisationList() { | ||
browser.url('api/maps.json?fields=id,displayName&paging=false' ); | ||
waitForVisible(browser.$('body pre')); | ||
|
||
return JSON.parse(browser.$('body pre').getHTML(false))['maps']; | ||
} | ||
|
||
get mapsContainerElement() { | ||
return browser.$('#dhis2-map-container'); | ||
} | ||
|
||
open() { | ||
super.open('dhis-web-maps') | ||
} | ||
|
||
openFavorite(id) { | ||
super.open('dhis-web-maps/?id=' + id); | ||
waitForWindowToLoad(); | ||
} | ||
|
||
dataExist() { | ||
return !browser.$('//*[contains(translate(text(), "No", "no"), "no data")]').isExisting(); | ||
} | ||
} | ||
|
||
export default Maps; | ||
export const maps = new Maps(); |
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,27 @@ | ||
import Page from '../Page' | ||
import { waitForWindowToLoad, waitForVisible } from '#support/wait'; | ||
|
||
class PivotTables extends Page { | ||
get visualisationList() { | ||
browser.url('api/reportTables.json?fields=id,displayName&paging=false' ); | ||
waitForVisible(browser.$('body pre')); | ||
|
||
return JSON.parse(browser.$('body pre').getHTML(false))['reportTables']; | ||
} | ||
|
||
open() { | ||
super.open('dhis-web-pivot') | ||
} | ||
|
||
openFavorite(id) { | ||
super.open('dhis-web-pivot/?id=' + id); | ||
waitForWindowToLoad(); | ||
} | ||
|
||
dataExist() { | ||
return !browser.$('//*[contains(translate(text(), "No", "no"), "no data")]').isExisting(); | ||
} | ||
} | ||
|
||
export default PivotTables; | ||
export const pivotTables = new PivotTables(); |
Oops, something went wrong.