Fix scouting test
.contains() only returns 1 element, so the test for the amount
of penalty actions was not working properly.
This patch uses a new method to avoid this problem.
Signed-off-by: Emily Markova <emily.markova@gmail.com>
Change-Id: I052f48b2ec9c167babbb268c5837432cc43a81b7
diff --git a/scouting/scouting_test.cy.js b/scouting/scouting_test.cy.js
index 990e69f..7157880 100644
--- a/scouting/scouting_test.cy.js
+++ b/scouting/scouting_test.cy.js
@@ -119,7 +119,7 @@
' 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);
+ cy.get('#review_data li:contains("Penalties")').its('length').should('eq', 1);
clickButton('Submit');
headerShouldBe(teamNumber + ' Success ');