Merge "scouting: Make the deployment work with new rules_pkg" into main
diff --git a/scouting/scouting_test.cy.js b/scouting/scouting_test.cy.js
index 2727104..990e69f 100644
--- a/scouting/scouting_test.cy.js
+++ b/scouting/scouting_test.cy.js
@@ -102,7 +102,12 @@
cy.contains(/Harmony/).click();
clickButton('End Match');
+
+ clickButton('UNDO');
+ clickButton('End Match');
+
headerShouldBe(teamNumber + ' Review and Submit ');
+
cy.get('#review_data li')
.eq(0)
.should('have.text', ' Started match at position 1 ');
@@ -113,6 +118,8 @@
'have.text',
' Ended Match; stageType: kHARMONY, trapNote: false, spotlight: false '
);
+ // Ensure that the penalties action is only submitted once.
+ cy.get('#review_data li').contains('Penalties').should('have.length', 1);
clickButton('Submit');
headerShouldBe(teamNumber + ' Success ');
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index 1a757a0..3c8aba9 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -334,6 +334,9 @@
break;
case ActionType.EndMatchAction:
this.section = 'Endgame';
+ // Also delete the penalty action.
+ this.undoLastAction();
+ break;
case ActionType.MobilityAction:
this.mobilityCompleted = false;
break;
diff --git a/scouting/www/entry/entry.ng.html b/scouting/www/entry/entry.ng.html
index 1b3a966..67d9f9f 100644
--- a/scouting/www/entry/entry.ng.html
+++ b/scouting/www/entry/entry.ng.html
@@ -467,6 +467,9 @@
<span *ngSwitchCase="ActionType.EndAutoPhaseAction">
Ended auto phase
</span>
+ <span *ngSwitchCase="ActionType.EndTeleopPhaseAction">
+ Ended teleop phase
+ </span>
<span *ngSwitchCase="ActionType.EndMatchAction">
Ended Match; stageType: {{stringifyStageType((action.actionTaken |
cast: EndMatchActionT).stageType)}}, trapNote: