Skip to content

Commit ecfde01

Browse files
committed
FWF-4369: data-test-id updated
1 parent 4679694 commit ecfde01

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

forms-flow-review/src/components/TaskFilterModal.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
149149
ariaLabelforDropdown={t("dropdown for sort order")}
150150
ariaLabelforInput={t("input for sort order")}
151151
data-testid="sort-order-dropdown"
152+
dataTestIdforInput="sort-order-input"
153+
dataTestIdforDropdown="sort-order-list"
152154
selectedOption={sortOrder}
153155
setNewInput={setSortOrder}
154156
/>
@@ -304,7 +306,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
304306
isAllowInput={false}
305307
ariaLabelforDropdown={t("dropdown for selecting options")}
306308
ariaLabelforInput={t("input for typing option")}
307-
data-testid="access-dropdown"
309+
dataTestIdforInput="access-options-input"
310+
dataTestIdforDropdown="access-options"
308311
selectedOption={accessDropdownValue}
309312
setNewInput={setAccessDropdownValue}
310313
/>
@@ -316,7 +319,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
316319
isAllowInput={false}
317320
ariaLabelforDropdown={t("specific role dropdown")}
318321
ariaLabelforInput={t("specific role input")}
319-
data-testid="role-dropdown"
322+
dataTestIdforInput="specific-roles-input"
323+
dataTestIdforDropdown="specific-roles"
320324
selectedOption={specificRole}
321325
setNewInput={setSpecificRole}
322326
/>
@@ -330,6 +334,7 @@ export const TaskFilterModal = ({ show, onClose }) => {
330334
ariaLabelforDropdown={t("assignee dropdown")}
331335
ariaLabelforInput={t("assignee input")}
332336
data-testid="assignee-dropdown"
337+
dataTestIdforInput="assignee-input"
333338
selectedOption={specificAssignee}
334339
setNewInput={setSpecificAssignee}
335340
name="assigneeOptions"
@@ -343,7 +348,7 @@ export const TaskFilterModal = ({ show, onClose }) => {
343348
type="text"
344349
label={t("Form")}
345350
aria-label={t("Name of the form")}
346-
data-testid="form-name-input"
351+
dataTestId="form-name-input"
347352
icon={<PencilIcon data-testid="close-input" aria-label="Close input" />}
348353
maxLength={200}
349354
value={selectedForm}
@@ -376,7 +381,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
376381
isAllowInput={false}
377382
ariaLabelforDropdown={t("dropdown for sort options")}
378383
ariaLabelforInput={t("input for typing option")}
379-
data-testid="date-sort-dropdown"
384+
dataTestIdforInput="date-sort-input"
385+
dataTestIdforDropdown="date-sort"
380386
selectedOption={sortValue}
381387
setNewInput={setSortValue}
382388
/>
@@ -388,7 +394,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
388394
isAllowInput={false}
389395
ariaLabelforDropdown={t("line of data dropdown ")}
390396
ariaLabelforInput={t("line of data input")}
391-
data-testid="data-line-dropdown"
397+
dataTestIdforInput="data-line-input"
398+
dataTestIdforDropdown="data-line"
392399
selectedOption={dataLineValue}
393400
setNewInput={setDataLineValue}
394401
/>
@@ -403,7 +410,7 @@ export const TaskFilterModal = ({ show, onClose }) => {
403410
type="text"
404411
label={t("Filter Name")}
405412
aria-label={t("Filter Name")}
406-
data-testid="filter-name-input"
413+
dataTestId="filter-name-input"
407414
maxLength={200}
408415
value={filterName}
409416
onChange={handleFilterName}
@@ -421,7 +428,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
421428
dropdownLabel={t("Share This Filter With")}
422429
isAllowInput={false}
423430
ariaLabelforDropdown={t("filter sharing dropdown")}
424-
data-testid="share-filter-dropdown"
431+
dataTestIdforInput="share-filter-input"
432+
dataTestIdforDropdown="share-filter-options"
425433
selectedOption={shareFilter}
426434
setNewInput={setShareFilter}
427435
/>
@@ -433,7 +441,8 @@ export const TaskFilterModal = ({ show, onClose }) => {
433441
isAllowInput={false}
434442
ariaLabelforDropdown={t("candidate dropdown")}
435443
ariaLabelforInput={t("candidate input")}
436-
data-testid="candidate-dropdown"
444+
dataTestIdforInput="candidate-options-input"
445+
dataTestIdforDropdown="candidate-options"
437446
selectedOption={filterRole}
438447
setNewInput={setFilterRole}
439448
/>
@@ -455,7 +464,6 @@ export const TaskFilterModal = ({ show, onClose }) => {
455464
icon={<SaveIcon color={iconColor} />}
456465
dataTestId="save-task-filter"
457466
ariaLabel={t("Save Task Filter")}
458-
data-testid="save-task-filter-button"
459467
disabled={isButtonDisabled}
460468
/>
461469
</div>
@@ -507,7 +515,6 @@ export const TaskFilterModal = ({ show, onClose }) => {
507515
label={t("Filter Results")}
508516
dataTestId="filter-results"
509517
ariaLabel={t("Filter results")}
510-
data-testid="filter-results"
511518
disabled={(specificRole === "" && specificAssignee === "")}
512519
onClick={filterResults}
513520
/>
@@ -518,7 +525,6 @@ export const TaskFilterModal = ({ show, onClose }) => {
518525
onClick={cancelFilter}
519526
dataTestId="cancel-filter"
520527
ariaLabel={t("Cancel filter")}
521-
data-testid="cancel-filter"
522528
/>
523529
</Modal.Footer>
524530
</Modal>

0 commit comments

Comments
 (0)