[Scouting App] Note scout multiple robots and add keywords
Note scouts often scout multiple robots so the scouting app should support it and
checkboxes were added to select keywords/tags. These tags will likely have to be modified
according to 2023's game.
Mobile UI Preview: https://ibb.co/QdFxwGj
Change-Id: If4fcb3ee97da5f52e428cb0a4b0a8401b4700a02
Signed-off-by: Filip Kujawa <filip.j.kujawa@gmail.com>
diff --git a/scouting/webserver/requests/requests_test.go b/scouting/webserver/requests/requests_test.go
index 24c99f6..85ab916 100644
--- a/scouting/webserver/requests/requests_test.go
+++ b/scouting/webserver/requests/requests_test.go
@@ -314,8 +314,14 @@
builder := flatbuffers.NewBuilder(1024)
builder.Finish((&submit_notes.SubmitNotesT{
- Team: 971,
- Notes: "Notes",
+ Team: 971,
+ Notes: "Notes",
+ GoodDriving: true,
+ BadDriving: false,
+ SketchyClimb: true,
+ SolidClimb: false,
+ GoodDefense: true,
+ BadDefense: false,
}).Pack(builder))
_, err := debug.SubmitNotes("http://localhost:8080", builder.FinishedBytes())
@@ -324,7 +330,16 @@
}
expected := []db.NotesData{
- {TeamNumber: 971, Notes: "Notes"},
+ {
+ TeamNumber: 971,
+ Notes: "Notes",
+ GoodDriving: true,
+ BadDriving: false,
+ SketchyClimb: true,
+ SolidClimb: false,
+ GoodDefense: true,
+ BadDefense: false,
+ },
}
if !reflect.DeepEqual(database.notes, expected) {
@@ -335,8 +350,14 @@
func TestRequestNotes(t *testing.T) {
database := MockDatabase{
notes: []db.NotesData{{
- TeamNumber: 971,
- Notes: "Notes",
+ TeamNumber: 971,
+ Notes: "Notes",
+ GoodDriving: true,
+ BadDriving: false,
+ SketchyClimb: true,
+ SolidClimb: false,
+ GoodDefense: true,
+ BadDefense: false,
}},
}
scoutingServer := server.NewScoutingServer()
@@ -594,11 +615,8 @@
return results, nil
}
-func (database *MockDatabase) AddNotes(teamNumber int, notes string) error {
- database.notes = append(database.notes, db.NotesData{
- TeamNumber: int32(teamNumber),
- Notes: notes,
- })
+func (database *MockDatabase) AddNotes(data db.NotesData) error {
+ database.notes = append(database.notes, data)
return nil
}