Skip to content

Commit

Permalink
Updated tests a little to be a bit cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbielby committed Nov 14, 2023
1 parent a46dd0b commit 9e388f8
Show file tree
Hide file tree
Showing 30 changed files with 2,491 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-shiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ jobs:
run: >
Rscript
-e "rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}')"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_NAME}})"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_OVERFLOW_NAME}})"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_NAME}}, forceUpdate = TRUE)"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_OVERFLOW_NAME}}, forceUpdate = TRUE)"
34 changes: 34 additions & 0 deletions tests/shinytest/UI_tests-current/001.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"input": {
"cookieAccept": 0,
"cookieLink": 0,
"cookieReject": 0,
"cookies": {
"_ga_DG7P4WLB0Y": "GS1.1.1699971773.1.0.1699971773.0.0.0",
"_ga": "GA1.1.1405827607.1699971774"
},
"dash": "headlines",
"ees": 0,
"geography_choice": "National",
"hideAccept": 0,
"hideReject": 0,
"la_choice": "Derby",
"link_to_headlines_tab": 0,
"link_to_la_tab": 0,
"link_to_reasons_tab": 0,
"measure_choice": "Overall",
"navlistPanel": "Homepage",
"region_choice": "East Midlands",
"remove": 0,
"school_choice": "Primary",
"ts_choice": "Latest week - 2023-10-09 to 2023-10-13"
},
"output": {
"daily_schools_count": "18,221 schools provided information on the latest full day of data, i.e. 2023-10-13",
"headline_update_date": "Data was last updated on 2023-10-26.",
"homepage_update_dates": "Data was last updated on 2023-10-26 and is next expected to be updated on 2023-11-09. The latest full week of data was the week commencing 2023-10-09."
},
"export": {

}
}
355 changes: 355 additions & 0 deletions tests/shinytest/UI_tests-current/002.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,355 @@
{
"input": {
"dash": "headlines",
"geography_choice": "National",
"la_choice": "Derby",
"link_to_headlines_tab": 0,
"link_to_la_tab": 0,
"link_to_reasons_tab": 0,
"navlistPanel": "dashboard",
"region_choice": "East Midlands",
"school_choice": "Primary",
"ts_choice": "Latest week - 2023-10-09 to 2023-10-13"
},
"output": {
"absence_rates_daily_plot": {
"x": {
"layout": {
"margin": {
"b": 40,
"l": 60,
"t": 80,
"r": 10
},
"xaxis": {
"domain": [
0,
1
],
"automargin": true,
"title": "Date",
"tickvals": [
"2023-10-09",
"2023-10-10",
"2023-10-11",
"2023-10-12",
"2023-10-13"
],
"zeroline": true,
"zerolinewidth": 2,
"zerolinecolor": "Grey"
},
"yaxis": {
"domain": [
0,
1
],
"automargin": true,
"rangemode": "tozero",
"title": "Absence rate (%)",
"zeroline": true,
"zerolinewidth": 2,
"zerolinecolor": "Grey"
},
"hovermode": "x unified",
"legend": {
"font": {
"size": 11
},
"orientation": "h",
"yanchor": "top",
"y": -0.5,
"xanchor": "center",
"x": 0.5
},
"title": "Daily summary of absence rates for primary<br> state-funded schools at national level",
"font": {
"family": "arial",
"size": 10,
"color": "grey"
},
"showlegend": true
},
"source": "A",
"config": {
"modeBarButtonsToAdd": [
"hoverclosest",
"hovercompare"
],
"showSendToCloud": false
},
"data": [
{
"mode": "lines+markers",
"type": "scatter",
"marker": {
"color": "rgba(31,119,180,1)",
"line": {
"color": "rgba(31,119,180,1)"
}
},
"error_y": {
"color": "rgba(31,119,180,1)"
},
"error_x": {
"color": "rgba(31,119,180,1)"
},
"line": {
"color": "rgba(31,119,180,1)"
},
"xaxis": "x",
"yaxis": "y",
"frame": null
},
{
"mode": "markers+lines",
"type": "scatter",
"x": [
"2023-10-09",
"2023-10-10",
"2023-10-11",
"2023-10-12",
"2023-10-13"
],
"y": [
4.9027779698449301,
4.29900333933554,
4.2440036864763604,
4.3529568752899097,
5.4874191077833299
],
"line": {
"color": "#12436D"
},
"marker": {
"color": "#12436D",
"line": {
"color": "rgba(255,127,14,1)"
}
},
"name": "Overall absence rate",
"hovertemplate": [
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%"
],
"error_y": {
"color": "rgba(255,127,14,1)"
},
"error_x": {
"color": "rgba(255,127,14,1)"
},
"xaxis": "x",
"yaxis": "y",
"frame": null
},
{
"mode": "markers+lines",
"type": "scatter",
"x": [
"2023-10-09",
"2023-10-10",
"2023-10-11",
"2023-10-12",
"2023-10-13"
],
"y": [
3.4248250082479101,
3.0299832693076101,
2.9424002448367599,
2.99913127859995,
3.7291290736059799
],
"line": {
"color": "#28A197"
},
"marker": {
"color": "#28A197",
"line": {
"color": "rgba(44,160,44,1)"
}
},
"name": "Authorised absence rate",
"hovertemplate": [
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%"
],
"error_y": {
"color": "rgba(44,160,44,1)"
},
"error_x": {
"color": "rgba(44,160,44,1)"
},
"xaxis": "x",
"yaxis": "y",
"frame": null
},
{
"mode": "markers+lines",
"type": "scatter",
"x": [
"2023-10-09",
"2023-10-10",
"2023-10-11",
"2023-10-12",
"2023-10-13"
],
"y": [
1.4779529615970199,
1.2690200700279299,
1.3016034416395901,
1.3538255966899599,
1.75829003417735
],
"line": {
"color": "#F46A25"
},
"marker": {
"color": "#F46A25",
"line": {
"color": "rgba(214,39,40,1)"
}
},
"name": "Unauthorised absence rate",
"hovertemplate": [
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%",
"%{y:.1f}%"
],
"error_y": {
"color": "rgba(214,39,40,1)"
},
"error_x": {
"color": "rgba(214,39,40,1)"
},
"xaxis": "x",
"yaxis": "y",
"frame": null
}
],
"highlight": {
"on": "plotly_click",
"persistent": false,
"dynamic": false,
"selectize": false,
"opacityDim": 0.20000000000000001,
"selected": {
"opacity": 1
},
"debounce": 0
},
"shinyEvents": [
"plotly_hover",
"plotly_click",
"plotly_selected",
"plotly_relayout",
"plotly_brushed",
"plotly_brushing",
"plotly_clickannotation",
"plotly_doubleclick",
"plotly_deselect",
"plotly_afterplot",
"plotly_sunburstclick"
],
"base_url": "https://plot.ly"
},
"evals": [

],
"jsHooks": [

],
"deps": [
{
"name": "setprototypeof",
"version": "0.1",
"src": {
"href": "setprototypeof-0.1"
},
"meta": null,
"script": "setprototypeof.js",
"stylesheet": null,
"head": null,
"attachment": null,
"all_files": false
},
{
"name": "typedarray",
"version": "0.1",
"src": {
"href": "typedarray-0.1"
},
"meta": null,
"script": "typedarray.min.js",
"stylesheet": null,
"head": null,
"attachment": null,
"all_files": false
},
{
"name": "jquery",
"version": "3.5.1",
"src": {
"href": "jquery-3.5.1"
},
"meta": null,
"script": "jquery.min.js",
"stylesheet": null,
"head": null,
"attachment": null,
"all_files": true
},
{
"name": "crosstalk",
"version": "1.2.0",
"src": {
"href": "crosstalk-1.2.0"
},
"meta": null,
"script": "js/crosstalk.min.js",
"stylesheet": "css/crosstalk.min.css",
"head": null,
"attachment": null,
"all_files": true
},
{
"name": "plotly-htmlwidgets-css",
"version": "2.11.1",
"src": {
"href": "plotly-htmlwidgets-css-2.11.1"
},
"meta": null,
"script": null,
"stylesheet": "plotly-htmlwidgets.css",
"head": null,
"attachment": null,
"all_files": false
},
{
"name": "plotly-main",
"version": "2.11.1",
"src": {
"href": "plotly-main-2.11.1"
},
"meta": null,
"script": "plotly-latest.min.js",
"stylesheet": null,
"head": null,
"attachment": null,
"all_files": false
}
]
},
"headline_bullet_title_nat": "Headline figures for the latest week - 2023-10-09 to 2023-10-13: primary state-funded school attendance at national level",
"weekly_absence_rate_nat": "• 4.7% of sessions were recorded as absence",
"weekly_attendance_rate_nat": "• 95.3% of sessions were recorded as attending",
"weekly_illness_rate_nat": "• 2.6% of sessions were recorded as illness"
}
}
Loading

0 comments on commit 9e388f8

Please sign in to comment.