@@ -288,13 +288,14 @@ function SaveSearchModal({
288288
289289 return (
290290 < Modal
291+ data-testid = "save-search-modal"
291292 opened = { opened }
292293 onClose = { closeAndReset }
293294 title = "Save Search"
294295 centered
295296 size = "lg"
296297 >
297- < form onSubmit = { onSubmit } >
298+ < form data-testid = "save-search-form" onSubmit = { onSubmit } >
298299 < Stack >
299300 { chartConfig != null ? (
300301 < Card withBorder >
@@ -339,6 +340,7 @@ function SaveSearchModal({
339340 Name
340341 </ Text >
341342 < InputControlled
343+ data-testid = "save-search-name-input"
342344 control = { control }
343345 name = "name"
344346 rules = { { required : true , validate : isValidName } }
@@ -373,14 +375,20 @@ function SaveSearchModal({
373375 </ Button >
374376 ) ) }
375377 < Tags allowCreate values = { tags } onChange = { setTags } >
376- < Button variant = "outline" color = "gray" size = "xs" >
378+ < Button
379+ data-testid = "add-tag-button"
380+ variant = "outline"
381+ color = "gray"
382+ size = "xs"
383+ >
377384 < i className = "bi bi-plus me-1" > </ i >
378385 Add Tag
379386 </ Button >
380387 </ Tags >
381388 </ Group >
382389 </ Box >
383390 < Button
391+ data-testid = "save-search-submit-button"
384392 variant = "outline"
385393 color = "green"
386394 type = "submit"
@@ -1211,7 +1219,7 @@ function DBSearchPage() {
12111219 />
12121220 ) }
12131221 < OnboardingModal />
1214- < form onSubmit = { onFormSubmit } >
1222+ < form data-testid = "search-form" onSubmit = { onFormSubmit } >
12151223 { /* <DevTool control={control} /> */ }
12161224 < Flex gap = "sm" px = "sm" pt = "sm" wrap = "nowrap" >
12171225 < Group gap = "4px" wrap = "nowrap" >
@@ -1226,6 +1234,7 @@ function DBSearchPage() {
12261234 < Menu withArrow position = "bottom-start" >
12271235 < Menu . Target >
12281236 < ActionIcon
1237+ data-testid = "source-settings-menu"
12291238 variant = "subtle"
12301239 color = "dark.2"
12311240 size = "sm"
@@ -1239,20 +1248,23 @@ function DBSearchPage() {
12391248 < Menu . Dropdown >
12401249 < Menu . Label > Sources</ Menu . Label >
12411250 < Menu . Item
1251+ data-testid = "create-new-source-menu-item"
12421252 leftSection = { < i className = "bi bi-plus-circle" /> }
12431253 onClick = { ( ) => setNewSourceModalOpened ( true ) }
12441254 >
12451255 Create New Source
12461256 </ Menu . Item >
12471257 { IS_LOCAL_MODE ? (
12481258 < Menu . Item
1259+ data-testid = "edit-source-menu-item"
12491260 leftSection = { < i className = "bi bi-gear" /> }
12501261 onClick = { ( ) => setModelFormExpanded ( v => ! v ) }
12511262 >
12521263 Edit Source
12531264 </ Menu . Item >
12541265 ) : (
12551266 < Menu . Item
1267+ data-testid = "edit-sources-menu-item"
12561268 leftSection = { < i className = "bi bi-gear" /> }
12571269 component = { Link }
12581270 href = "/team"
@@ -1292,6 +1304,7 @@ function DBSearchPage() {
12921304 < >
12931305 { ! savedSearchId ? (
12941306 < Button
1307+ data-testid = "save-search-button"
12951308 variant = "outline"
12961309 color = "dark.2"
12971310 px = "xs"
@@ -1303,6 +1316,7 @@ function DBSearchPage() {
13031316 </ Button >
13041317 ) : (
13051318 < Button
1319+ data-testid = "update-search-button"
13061320 variant = "outline"
13071321 color = "dark.2"
13081322 px = "xs"
@@ -1317,6 +1331,7 @@ function DBSearchPage() {
13171331 ) }
13181332 { ! IS_LOCAL_MODE && (
13191333 < Button
1334+ data-testid = "alerts-button"
13201335 variant = "outline"
13211336 color = "dark.2"
13221337 px = "xs"
@@ -1335,6 +1350,7 @@ function DBSearchPage() {
13351350 onChange = { handleUpdateTags }
13361351 >
13371352 < Button
1353+ data-testid = "tags-button"
13381354 variant = "outline"
13391355 color = "dark.2"
13401356 px = "xs"
@@ -1433,6 +1449,7 @@ function DBSearchPage() {
14331449 }
14341450 />
14351451 < TimePicker
1452+ data-testid = "time-picker"
14361453 inputValue = { displayedTimeInputValue }
14371454 setInputValue = { setDisplayedTimeInputValue }
14381455 onSearch = { range => {
@@ -1446,6 +1463,7 @@ function DBSearchPage() {
14461463 showLive = { analysisMode === 'results' }
14471464 />
14481465 < Button
1466+ data-testid = "search-submit-button"
14491467 variant = "outline"
14501468 type = "submit"
14511469 color = { formState . isDirty ? 'green' : 'gray.4' }
0 commit comments