Commit ba88454
committed
test(test8): fix SelectInputPairElement interaction + use valid values
ROOT CAUSE:
1. SelectInputPairElement combines select dropdown + number input
2. Final value is concatenation: `${selectValue}${inputValue}`
3. Test tried to type "Poke event" into number input (invalid)
4. Stale element references after selectOptions() causes clear() to fail
FIXES:
1. **Use valid SelectInputPairElement pattern**: Select "Dout" from dropdown,
type "2" into number input → produces "Dout2"
2. **Add blur() + delay after selectOptions()**: Prevents stale element when
querying number input after select changes
3. **Fix test expectations**: Changed from impossible "Poke event" to valid
"Dout2" that matches component behavior
COMPONENT BEHAVIOR:
SelectInputPairElement (behavioral_events-description):
- Dropdown options: Din, Dout, Accel, Gyro, Mag (from behavioralEventsDescription())
- Input type: number (can only accept digits)
- onBlur concatenates: selectRef.current.value + inputRef.current.value
- Example: select="Dout" + input="2" → "Dout2"
Test 8 now passes: 8/11 tests passing (73%)1 parent 2edde66 commit ba88454
File tree
1 file changed
+21
-18
lines changed- src/__tests__/integration
1 file changed
+21
-18
lines changedLines changed: 21 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 936 | + | |
942 | 937 | | |
943 | | - | |
944 | | - | |
945 | 938 | | |
946 | 939 | | |
947 | 940 | | |
948 | 941 | | |
949 | | - | |
950 | | - | |
951 | 942 | | |
952 | 943 | | |
953 | | - | |
954 | 944 | | |
955 | 945 | | |
956 | 946 | | |
957 | 947 | | |
958 | | - | |
959 | | - | |
960 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
961 | 963 | | |
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | 967 | | |
966 | | - | |
| 968 | + | |
967 | 969 | | |
968 | | - | |
| 970 | + | |
969 | 971 | | |
970 | 972 | | |
971 | 973 | | |
| |||
981 | 983 | | |
982 | 984 | | |
983 | 985 | | |
984 | | - | |
985 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
986 | 989 | | |
987 | 990 | | |
988 | 991 | | |
| |||
0 commit comments