scouting: Skip team selection after clicking on a team in the match list
It's not really useful to have the scouts go through the Team
Selection screen. The information is known to be correct. With this
patch, the user is automatically brought to the 'Init' screen when
they click on a team in the match list.
I also took this opportunity to clean up some stale signals/events
that weren't being used.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I2da4178465c217664c21251ffc1db46c42ca7445
diff --git a/scouting/scouting_test.cy.js b/scouting/scouting_test.cy.js
index d79bf5a..1d7620a 100644
--- a/scouting/scouting_test.cy.js
+++ b/scouting/scouting_test.cy.js
@@ -99,25 +99,24 @@
cy.get('.badge').eq(89).contains('Final 1 Match 3');
});
- it('should: prefill the match information.', () => {
- headerShouldBe('Matches');
-
- clickSemiFinal2Match3Team5254();
-
+ it('should: be let users enter match information manually.', () => {
+ switchToTab('Entry');
headerShouldBe(' Team Selection ');
- cy.get('#match_number').should('have.value', '3');
- cy.get('#team_number').should('have.value', '5254');
- cy.get('#set_number').should('have.value', '2');
- cy.get('#comp_level').should('have.value', '3: sf');
+
+ setInputTo('#match_number', '3');
+ setInputTo('#team_number', '5254');
+ setInputTo('#set_number', '2');
+ setInputTo('#comp_level', '3: sf');
+
+ clickButton('Next');
+
+ headerShouldBe('5254 Init ');
});
//TODO(FILIP): Verify last action when the last action header gets added.
it('should: be able to submit data scouting.', () => {
clickSemiFinal2Match3Team5254();
- headerShouldBe(' Team Selection ');
- clickButton('Next');
-
// Select Starting Position.
headerShouldBe('5254 Init ');
cy.get('[type="radio"]').first().check();
@@ -150,9 +149,6 @@
it('should: be able to return to correct screen with undo for pick and place.', () => {
clickSemiFinal2Match3Team5254();
- headerShouldBe(' Team Selection ');
- clickButton('Next');
-
// Select Starting Position.
cy.get('[type="radio"]').first().check();
clickButton('Start Match');