Add some more sophisticated scouting tests
This patch adds a test that validates actually submitting a match.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I3fb1063b5ec89aa843d0bb96f71c3bbfd2601122
diff --git a/scouting/www/app.ts b/scouting/www/app.ts
index 18f08d4..e34283a 100644
--- a/scouting/www/app.ts
+++ b/scouting/www/app.ts
@@ -29,8 +29,10 @@
switchTabTo(tab: Tab) {
let shouldSwitch = true;
- if (tab === 'ImportMatchList') {
- shouldSwitch = window.confirm('Leave data scouting page?');
+ if (this.tab !== tab) {
+ if (!this.block_alerts.nativeElement.checked) {
+ shouldSwitch = window.confirm('Leave current page?');
+ }
}
if (shouldSwitch) {
this.tab = tab;