From 9e388f8f1db0e83436a6896a78c700b37f21e99e Mon Sep 17 00:00:00 2001 From: Rich Bielby Date: Tue, 14 Nov 2023 14:30:04 +0000 Subject: [PATCH] Updated tests a little to be a bit cleaner --- .github/workflows/deploy-shiny.yaml | 4 +- tests/shinytest/UI_tests-current/001.json | 34 ++ tests/shinytest/UI_tests-current/002.json | 355 +++++++++++++++++++++ tests/shinytest/UI_tests-current/003.json | 355 +++++++++++++++++++++ tests/shinytest/UI_tests-current/004.json | 17 + tests/shinytest/UI_tests-current/005.json | 17 + tests/shinytest/UI_tests-current/006.json | 17 + tests/shinytest/UI_tests-current/007.json | 17 + tests/shinytest/UI_tests-current/008.json | 279 ++++++++++++++++ tests/shinytest/UI_tests-current/009.json | 279 ++++++++++++++++ tests/shinytest/UI_tests-current/010.json | 279 ++++++++++++++++ tests/shinytest/UI_tests-current/011.json | 279 ++++++++++++++++ tests/shinytest/UI_tests-current/012.json | 279 ++++++++++++++++ tests/shinytest/UI_tests-current/013.json | 129 ++++++++ tests/shinytest/UI_tests-current/014.json | 129 ++++++++ tests/shinytest/UI_tests-expected/001.json | 14 - tests/shinytest/UI_tests-expected/002.json | 1 + tests/shinytest/UI_tests-expected/003.json | 1 + tests/shinytest/UI_tests-expected/004.json | 1 + tests/shinytest/UI_tests-expected/005.json | 1 + tests/shinytest/UI_tests-expected/006.json | 1 + tests/shinytest/UI_tests-expected/007.json | 1 + tests/shinytest/UI_tests-expected/008.json | 1 + tests/shinytest/UI_tests-expected/009.json | 1 + tests/shinytest/UI_tests-expected/010.json | 1 + tests/shinytest/UI_tests-expected/011.json | 1 + tests/shinytest/UI_tests-expected/012.json | 1 + tests/shinytest/UI_tests-expected/013.json | 1 + tests/shinytest/UI_tests-expected/014.json | 1 + tests/shinytest/UI_tests.R | 12 +- 30 files changed, 2491 insertions(+), 17 deletions(-) create mode 100644 tests/shinytest/UI_tests-current/001.json create mode 100644 tests/shinytest/UI_tests-current/002.json create mode 100644 tests/shinytest/UI_tests-current/003.json create mode 100644 tests/shinytest/UI_tests-current/004.json create mode 100644 tests/shinytest/UI_tests-current/005.json create mode 100644 tests/shinytest/UI_tests-current/006.json create mode 100644 tests/shinytest/UI_tests-current/007.json create mode 100644 tests/shinytest/UI_tests-current/008.json create mode 100644 tests/shinytest/UI_tests-current/009.json create mode 100644 tests/shinytest/UI_tests-current/010.json create mode 100644 tests/shinytest/UI_tests-current/011.json create mode 100644 tests/shinytest/UI_tests-current/012.json create mode 100644 tests/shinytest/UI_tests-current/013.json create mode 100644 tests/shinytest/UI_tests-current/014.json diff --git a/.github/workflows/deploy-shiny.yaml b/.github/workflows/deploy-shiny.yaml index f58584c..7f4edda 100644 --- a/.github/workflows/deploy-shiny.yaml +++ b/.github/workflows/deploy-shiny.yaml @@ -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)" diff --git a/tests/shinytest/UI_tests-current/001.json b/tests/shinytest/UI_tests-current/001.json new file mode 100644 index 0000000..20143fd --- /dev/null +++ b/tests/shinytest/UI_tests-current/001.json @@ -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": { + + } +} diff --git a/tests/shinytest/UI_tests-current/002.json b/tests/shinytest/UI_tests-current/002.json new file mode 100644 index 0000000..fc6b15d --- /dev/null +++ b/tests/shinytest/UI_tests-current/002.json @@ -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
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" + } +} diff --git a/tests/shinytest/UI_tests-current/003.json b/tests/shinytest/UI_tests-current/003.json new file mode 100644 index 0000000..6072213 --- /dev/null +++ b/tests/shinytest/UI_tests-current/003.json @@ -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": "Secondary", + "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 secondary
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": [ + 8.1345873911278801, + 7.9260914993918998, + 7.7895821022590903, + 7.88236604525276, + 9.1432488978630708 + ], + "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": [ + 5.1730966081851104, + 5.0676890205189196, + 4.8870532823357102, + 4.8639989520430298, + 5.5650537149139101 + ], + "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": [ + 2.9614907829427701, + 2.8584024788729701, + 2.9025288199233801, + 3.0183670932097302, + 3.5781951829491501 + ], + "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: secondary state-funded school attendance at national level", + "weekly_absence_rate_nat": "• 8.2% of sessions were recorded as absence", + "weekly_attendance_rate_nat": "• 91.8% of sessions were recorded as attending", + "weekly_illness_rate_nat": "• 3.8% of sessions were recorded as illness" + } +} diff --git a/tests/shinytest/UI_tests-current/004.json b/tests/shinytest/UI_tests-current/004.json new file mode 100644 index 0000000..a6cb128 --- /dev/null +++ b/tests/shinytest/UI_tests-current/004.json @@ -0,0 +1,17 @@ +{ + "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": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "headline_bullet_title_nat": "Headline figures for the latest week - 2023-10-09 to 2023-10-13: secondary state-funded school attendance at national level" + } +} diff --git a/tests/shinytest/UI_tests-current/005.json b/tests/shinytest/UI_tests-current/005.json new file mode 100644 index 0000000..d14198c --- /dev/null +++ b/tests/shinytest/UI_tests-current/005.json @@ -0,0 +1,17 @@ +{ + "input": { + "dash": "headlines", + "geography_choice": "Regional", + "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": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "headline_bullet_title_reg": "Headline figures for the latest week - 2023-10-09 to 2023-10-13: secondary state-funded school attendance at regional level (East Midlands)" + } +} diff --git a/tests/shinytest/UI_tests-current/006.json b/tests/shinytest/UI_tests-current/006.json new file mode 100644 index 0000000..59c508b --- /dev/null +++ b/tests/shinytest/UI_tests-current/006.json @@ -0,0 +1,17 @@ +{ + "input": { + "dash": "headlines", + "geography_choice": "Local authority", + "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": { + "headline_bullet_title_la": "Headline figures for the latest week - 2023-10-09 to 2023-10-13: primary state-funded school attendance at local authority level (East Midlands, Derby)" + } +} diff --git a/tests/shinytest/UI_tests-current/007.json b/tests/shinytest/UI_tests-current/007.json new file mode 100644 index 0000000..e2c5798 --- /dev/null +++ b/tests/shinytest/UI_tests-current/007.json @@ -0,0 +1,17 @@ +{ + "input": { + "dash": "headlines", + "geography_choice": "Local authority", + "la_choice": "Lincolnshire", + "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": { + "headline_bullet_title_la": "Headline figures for the latest week - 2023-10-09 to 2023-10-13: primary state-funded school attendance at local authority level (East Midlands, Lincolnshire)" + } +} diff --git a/tests/shinytest/UI_tests-current/008.json b/tests/shinytest/UI_tests-current/008.json new file mode 100644 index 0000000..24f168a --- /dev/null +++ b/tests/shinytest/UI_tests-current/008.json @@ -0,0 +1,279 @@ +{ + "input": { + "dash": "reasons", + "geography_choice": "National", + "la_choice": "Lincolnshire", + "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_auth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Illness<\/th>\n Medical or dental appointments<\/th>\n Religious observance<\/th>\n Study leave<\/th>\n Traveller<\/th>\n Holiday<\/th>\n Excluded<\/th>\n Other<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 3, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 4, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.columnDefs.4.render", + "options.columnDefs.5.render", + "options.columnDefs.6.render", + "options.columnDefs.7.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "absence_unauth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Holiday<\/th>\n Late after registers closed<\/th>\n Other<\/th>\n No reason yet<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "headline_auth_rate_weekly": { + "html": "
\n
\n

3.2%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "headline_unauth_rate_weekly": { + "html": "

\n
\n

1.4%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "reasons_chart_title_nat": "Primary state-funded schools: absence at national level" + } +} diff --git a/tests/shinytest/UI_tests-current/009.json b/tests/shinytest/UI_tests-current/009.json new file mode 100644 index 0000000..14cee5a --- /dev/null +++ b/tests/shinytest/UI_tests-current/009.json @@ -0,0 +1,279 @@ +{ + "input": { + "dash": "reasons", + "geography_choice": "National", + "la_choice": "Lincolnshire", + "link_to_headlines_tab": 0, + "link_to_la_tab": 0, + "link_to_reasons_tab": 0, + "navlistPanel": "dashboard", + "region_choice": "East Midlands", + "school_choice": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "absence_auth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Illness<\/th>\n Medical or dental appointments<\/th>\n Religious observance<\/th>\n Study leave<\/th>\n Traveller<\/th>\n Holiday<\/th>\n Excluded<\/th>\n Other<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 3, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 4, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.columnDefs.4.render", + "options.columnDefs.5.render", + "options.columnDefs.6.render", + "options.columnDefs.7.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "absence_unauth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Holiday<\/th>\n Late after registers closed<\/th>\n Other<\/th>\n No reason yet<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "headline_auth_rate_weekly": { + "html": "
\n
\n

5.1%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "headline_unauth_rate_weekly": { + "html": "

\n
\n

3.1%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "reasons_chart_title_nat": "Secondary state-funded schools: absence at national level" + } +} diff --git a/tests/shinytest/UI_tests-current/010.json b/tests/shinytest/UI_tests-current/010.json new file mode 100644 index 0000000..42860a7 --- /dev/null +++ b/tests/shinytest/UI_tests-current/010.json @@ -0,0 +1,279 @@ +{ + "input": { + "dash": "reasons", + "geography_choice": "Regional", + "la_choice": "Lincolnshire", + "link_to_headlines_tab": 0, + "link_to_la_tab": 0, + "link_to_reasons_tab": 0, + "navlistPanel": "dashboard", + "region_choice": "East Midlands", + "school_choice": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "absence_auth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Illness<\/th>\n Medical or dental appointments<\/th>\n Religious observance<\/th>\n Study leave<\/th>\n Traveller<\/th>\n Holiday<\/th>\n Excluded<\/th>\n Other<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 3, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 4, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.columnDefs.4.render", + "options.columnDefs.5.render", + "options.columnDefs.6.render", + "options.columnDefs.7.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "absence_unauth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Holiday<\/th>\n Late after registers closed<\/th>\n Other<\/th>\n No reason yet<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "headline_auth_rate_weekly": { + "html": "
\n
\n

5.6%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "headline_unauth_rate_weekly": { + "html": "

\n
\n

3.2%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "reasons_chart_title_reg": "Secondary state-funded schools: absence at regional level (East Midlands)" + } +} diff --git a/tests/shinytest/UI_tests-current/011.json b/tests/shinytest/UI_tests-current/011.json new file mode 100644 index 0000000..d43dfce --- /dev/null +++ b/tests/shinytest/UI_tests-current/011.json @@ -0,0 +1,279 @@ +{ + "input": { + "dash": "reasons", + "geography_choice": "Local authority", + "la_choice": "Lincolnshire", + "link_to_headlines_tab": 0, + "link_to_la_tab": 0, + "link_to_reasons_tab": 0, + "navlistPanel": "dashboard", + "region_choice": "East Midlands", + "school_choice": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "absence_auth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Illness<\/th>\n Medical or dental appointments<\/th>\n Religious observance<\/th>\n Study leave<\/th>\n Traveller<\/th>\n Holiday<\/th>\n Excluded<\/th>\n Other<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 3, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 4, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.columnDefs.4.render", + "options.columnDefs.5.render", + "options.columnDefs.6.render", + "options.columnDefs.7.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "absence_unauth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Holiday<\/th>\n Late after registers closed<\/th>\n Other<\/th>\n No reason yet<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "headline_auth_rate_weekly": { + "html": "
\n
\n

6.4%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "headline_unauth_rate_weekly": { + "html": "

\n
\n

2.4%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "reasons_chart_title_la": "Secondary state-funded schools: absence at local authority level (East Midlands, Lincolnshire)" + } +} diff --git a/tests/shinytest/UI_tests-current/012.json b/tests/shinytest/UI_tests-current/012.json new file mode 100644 index 0000000..f85a05e --- /dev/null +++ b/tests/shinytest/UI_tests-current/012.json @@ -0,0 +1,279 @@ +{ + "input": { + "dash": "reasons", + "geography_choice": "Local authority", + "la_choice": "Rutland", + "link_to_headlines_tab": 0, + "link_to_la_tab": 0, + "link_to_reasons_tab": 0, + "navlistPanel": "dashboard", + "region_choice": "East Midlands", + "school_choice": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "absence_auth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Illness<\/th>\n Medical or dental appointments<\/th>\n Religious observance<\/th>\n Study leave<\/th>\n Traveller<\/th>\n Holiday<\/th>\n Excluded<\/th>\n Other<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 3, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 4, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.columnDefs.4.render", + "options.columnDefs.5.render", + "options.columnDefs.6.render", + "options.columnDefs.7.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "absence_unauth_reasons_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Holiday<\/th>\n Late after registers closed<\/th>\n Other<\/th>\n No reason yet<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "ordering": false, + "searching": false, + "lengthChange": false, + "dom": "t", + "columnDefs": [ + { + "targets": -1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 0, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 1, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 2, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3 + ] + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.columnDefs.3.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + }, + "headline_auth_rate_weekly": { + "html": "
\n
\n

7.1%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "headline_unauth_rate_weekly": { + "html": "

\n
\n

1.6%<\/h3>\n

Latest full week<\/p>\n <\/div>\n<\/div>", + "deps": [ + + ] + }, + "reasons_chart_title_la": "Secondary state-funded schools: absence at local authority level (East Midlands, Rutland)" + } +} diff --git a/tests/shinytest/UI_tests-current/013.json b/tests/shinytest/UI_tests-current/013.json new file mode 100644 index 0000000..b2bfa6c --- /dev/null +++ b/tests/shinytest/UI_tests-current/013.json @@ -0,0 +1,129 @@ +{ + "input": { + "dash": "la comparisons", + "geography_choice": "Local authority", + "la_choice": "Rutland", + "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_reasons_la_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Year<\/th>\n Week number<\/th>\n Week commencing<\/th>\n Region name<\/th>\n Local authority name<\/th>\n Overall absence rate<\/th>\n Authorised absence rate<\/th>\n Unauthorised absence rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "columnDefs": [ + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 7, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, + { + "targets": 1, + "searchable": false, + "visible": false + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + } + } +} diff --git a/tests/shinytest/UI_tests-current/014.json b/tests/shinytest/UI_tests-current/014.json new file mode 100644 index 0000000..1d45081 --- /dev/null +++ b/tests/shinytest/UI_tests-current/014.json @@ -0,0 +1,129 @@ +{ + "input": { + "dash": "la comparisons", + "geography_choice": "Local authority", + "la_choice": "Rutland", + "link_to_headlines_tab": 0, + "link_to_la_tab": 0, + "link_to_reasons_tab": 0, + "navlistPanel": "dashboard", + "region_choice": "East Midlands", + "school_choice": "Secondary", + "ts_choice": "Latest week - 2023-10-09 to 2023-10-13" + }, + "output": { + "absence_reasons_la_table": { + "x": { + "filter": "none", + "vertical": false, + "container": "\n \n \n
Year<\/th>\n Week number<\/th>\n Week commencing<\/th>\n Region name<\/th>\n Local authority name<\/th>\n Overall absence rate<\/th>\n Authorised absence rate<\/th>\n Unauthorised absence rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>", + "options": { + "scrollX": true, + "columnDefs": [ + { + "targets": 5, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 6, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "targets": 7, + "render": "function(data, type, row, meta) {\n return type !== 'display' ? data : DTWidget.formatPercentage(data, 1, 3, \",\", \".\", null);\n }" + }, + { + "className": "dt-center", + "targets": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, + { + "targets": 1, + "searchable": false, + "visible": false + } + ], + "order": [ + + ], + "autoWidth": false, + "orderClasses": false, + "ajax": { + "type": "POST", + "data": "function(d) {\nd.search.caseInsensitive = true;\nd.search.smart = true;\nd.escape = false;\nvar encodeAmp = function(x) { x.value = x.value.replace(/&/g, \"%26\"); }\nencodeAmp(d.search);\n$.each(d.columns, function(i, v) {encodeAmp(v.search);});\n}" + }, + "serverSide": true, + "processing": true + }, + "selection": { + "mode": "none", + "selected": null, + "target": "row", + "selectable": null + } + }, + "evals": [ + "options.columnDefs.0.render", + "options.columnDefs.1.render", + "options.columnDefs.2.render", + "options.ajax.data" + ], + "jsHooks": [ + + ], + "deps": [ + { + "name": "jquery", + "version": "3.6.0", + "src": { + "href": "jquery-3.6.0" + }, + "meta": null, + "script": "jquery-3.6.0.min.js", + "stylesheet": null, + "head": null, + "attachment": null, + "all_files": true + }, + { + "name": "dt-core", + "version": "1.13.4", + "src": { + "href": "dt-core-1.13.4" + }, + "meta": null, + "script": "js/jquery.dataTables.min.js", + "stylesheet": [ + "css/jquery.dataTables.min.css", + "css/jquery.dataTables.extra.css" + ], + "head": null, + "attachment": null, + "package": null, + "all_files": false + }, + { + "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 + } + ] + } + } +} diff --git a/tests/shinytest/UI_tests-expected/001.json b/tests/shinytest/UI_tests-expected/001.json index 2527de3..dc86ff6 100644 --- a/tests/shinytest/UI_tests-expected/001.json +++ b/tests/shinytest/UI_tests-expected/001.json @@ -1,17 +1,7 @@ { "input": { - "cookieAccept": 0, - "cookieLink": 0, - "cookieReject": 0, - "cookies": { - "_ga_DG7P4WLB0Y": "GS1.1.1699960892.1.0.1699960892.0.0.0", - "_ga": "GA1.1.329438983.1699960893" - }, "dash": "headlines", - "ees": 0, "geography_choice": "National", - "hideAccept": 0, - "hideReject": 0, "la_choice": "Derby", "link_to_headlines_tab": 0, "link_to_la_tab": 0, @@ -19,7 +9,6 @@ "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" }, @@ -27,8 +16,5 @@ "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": { - } } diff --git a/tests/shinytest/UI_tests-expected/002.json b/tests/shinytest/UI_tests-expected/002.json index fc6b15d..611c5b5 100644 --- a/tests/shinytest/UI_tests-expected/002.json +++ b/tests/shinytest/UI_tests-expected/002.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Primary", diff --git a/tests/shinytest/UI_tests-expected/003.json b/tests/shinytest/UI_tests-expected/003.json index 6072213..4637cf8 100644 --- a/tests/shinytest/UI_tests-expected/003.json +++ b/tests/shinytest/UI_tests-expected/003.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/004.json b/tests/shinytest/UI_tests-expected/004.json index a6cb128..d037e96 100644 --- a/tests/shinytest/UI_tests-expected/004.json +++ b/tests/shinytest/UI_tests-expected/004.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/005.json b/tests/shinytest/UI_tests-expected/005.json index d14198c..d8af9cd 100644 --- a/tests/shinytest/UI_tests-expected/005.json +++ b/tests/shinytest/UI_tests-expected/005.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/006.json b/tests/shinytest/UI_tests-expected/006.json index 59c508b..328c236 100644 --- a/tests/shinytest/UI_tests-expected/006.json +++ b/tests/shinytest/UI_tests-expected/006.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Primary", diff --git a/tests/shinytest/UI_tests-expected/007.json b/tests/shinytest/UI_tests-expected/007.json index e2c5798..91e213a 100644 --- a/tests/shinytest/UI_tests-expected/007.json +++ b/tests/shinytest/UI_tests-expected/007.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Primary", diff --git a/tests/shinytest/UI_tests-expected/008.json b/tests/shinytest/UI_tests-expected/008.json index 24f168a..9a1c8cf 100644 --- a/tests/shinytest/UI_tests-expected/008.json +++ b/tests/shinytest/UI_tests-expected/008.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Primary", diff --git a/tests/shinytest/UI_tests-expected/009.json b/tests/shinytest/UI_tests-expected/009.json index 14cee5a..c025744 100644 --- a/tests/shinytest/UI_tests-expected/009.json +++ b/tests/shinytest/UI_tests-expected/009.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/010.json b/tests/shinytest/UI_tests-expected/010.json index 42860a7..ea0b6ae 100644 --- a/tests/shinytest/UI_tests-expected/010.json +++ b/tests/shinytest/UI_tests-expected/010.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/011.json b/tests/shinytest/UI_tests-expected/011.json index d43dfce..f456584 100644 --- a/tests/shinytest/UI_tests-expected/011.json +++ b/tests/shinytest/UI_tests-expected/011.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/012.json b/tests/shinytest/UI_tests-expected/012.json index f85a05e..825cb64 100644 --- a/tests/shinytest/UI_tests-expected/012.json +++ b/tests/shinytest/UI_tests-expected/012.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests-expected/013.json b/tests/shinytest/UI_tests-expected/013.json index b2bfa6c..2208364 100644 --- a/tests/shinytest/UI_tests-expected/013.json +++ b/tests/shinytest/UI_tests-expected/013.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Primary", diff --git a/tests/shinytest/UI_tests-expected/014.json b/tests/shinytest/UI_tests-expected/014.json index 1d45081..507ffa4 100644 --- a/tests/shinytest/UI_tests-expected/014.json +++ b/tests/shinytest/UI_tests-expected/014.json @@ -6,6 +6,7 @@ "link_to_headlines_tab": 0, "link_to_la_tab": 0, "link_to_reasons_tab": 0, + "measure_choice": "Overall", "navlistPanel": "dashboard", "region_choice": "East Midlands", "school_choice": "Secondary", diff --git a/tests/shinytest/UI_tests.R b/tests/shinytest/UI_tests.R index 99de900..0af65dc 100644 --- a/tests/shinytest/UI_tests.R +++ b/tests/shinytest/UI_tests.R @@ -11,6 +11,7 @@ listInputs <- c( "geography_choice", "region_choice", "la_choice", + "measure_choice", "link_to_coverage", "link_to_headlines_tab", "link_to_la_tab", @@ -23,7 +24,16 @@ listInputs <- c( # 1. Does it load ------------------------------------------------------------------------------------------------------------------- message("Test 1") Sys.sleep(1) -app$snapshot() +app$snapshot( + list( + input = listInputs, + output = c( + "daily_schools_count", + "headline_update_date", + "homepage_update_dates" + ) + ) +) # Checking headlines tab