Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(explore): Allow basic keyboard navigation within arithmetic builder #85220

Conversation

Zylphrex
Copy link
Member

The navigations weren't fully working so fix it up here and add tests.

The navigations weren't fully working so fix it up here and add tests.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 14, 2025
Copy link

codecov bot commented Feb 14, 2025

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
8578 6 8572 3
View the top 3 failed test(s) by shortest run time
token ArithmeticTokenOperator renders multiply operator
Stack Traces | 0.104s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"token": ObjectContaining {"kind": "op", "operator": "*"}, "type": "DELETE_TOKEN"}
Received
       1
          Object {
        -   "token": ObjectContaining {
        +   "focusOverride": Object {
        +     "itemKey": "str:0",
        +   },
        +   "token": TokenOperator {
        +     "key": "op:0",
              "kind": "op",
        +     "location": Object {
        +       "end": Object {
        +         "column": 2,
        +         "line": 1,
        +         "offset": 1,
        +       },
        +       "source": undefined,
        +       "start": Object {
        +         "column": 1,
        +         "line": 1,
        +         "offset": 0,
        +       },
        +     },
              "operator": "*",
            },
            "type": "DELETE_TOKEN",
          },
       2
          Object {
        -   "token": ObjectContaining {
        -     "kind": "op",
        -     "operator": "*",
        -   },
        -   "type": "DELETE_TOKEN",
        +   "type": "RESET_FOCUS_OVERRIDE",
          },

Number of calls: 2
    at Object.<anonymous> (.../arithmeticBuilder/token/index.spec.tsx:355:24)
token ArithmeticTokenParenthesis renders left parenthesis
Stack Traces | 0.107s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"token": ObjectContaining {"kind": "paren", "parenthesis": "("}, "type": "DELETE_TOKEN"}
Received
       1
          Object {
        -   "token": ObjectContaining {
        +   "focusOverride": Object {
        +     "itemKey": "str:0",
        +   },
        +   "token": TokenParenthesis {
        +     "key": "paren:0",
              "kind": "paren",
        +     "location": Object {
        +       "end": Object {
        +         "column": 2,
        +         "line": 1,
        +         "offset": 1,
        +       },
        +       "source": undefined,
        +       "start": Object {
        +         "column": 1,
        +         "line": 1,
        +         "offset": 0,
        +       },
        +     },
              "parenthesis": "(",
            },
            "type": "DELETE_TOKEN",
          },
       2
          Object {
        -   "token": ObjectContaining {
        -     "kind": "paren",
        -     "parenthesis": "(",
        -   },
        -   "type": "DELETE_TOKEN",
        +   "type": "RESET_FOCUS_OVERRIDE",
          },

Number of calls: 2
    at Object.<anonymous> (.../arithmeticBuilder/token/index.spec.tsx:396:24)
token ArithmeticTokenParenthesis renders right parenthesis
Stack Traces | 0.115s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"token": ObjectContaining {"kind": "paren", "parenthesis": ")"}, "type": "DELETE_TOKEN"}
Received
       1
          Object {
        -   "token": ObjectContaining {
        +   "focusOverride": Object {
        +     "itemKey": "str:0",
        +   },
        +   "token": TokenParenthesis {
        +     "key": "paren:0",
              "kind": "paren",
        +     "location": Object {
        +       "end": Object {
        +         "column": 2,
        +         "line": 1,
        +         "offset": 1,
        +       },
        +       "source": undefined,
        +       "start": Object {
        +         "column": 1,
        +         "line": 1,
        +         "offset": 0,
        +       },
        +     },
              "parenthesis": ")",
            },
            "type": "DELETE_TOKEN",
          },
       2
          Object {
        -   "token": ObjectContaining {
        -     "kind": "paren",
        -     "parenthesis": ")",
        -   },
        -   "type": "DELETE_TOKEN",
        +   "type": "RESET_FOCUS_OVERRIDE",
          },

Number of calls: 2
    at Object.<anonymous> (.../arithmeticBuilder/token/index.spec.tsx:416:24)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@Zylphrex Zylphrex merged commit 0638e46 into master Feb 14, 2025
42 checks passed
@Zylphrex Zylphrex deleted the txiao/feat/allow-basic-keyboard-navigation-within-arithmetic-builder branch February 14, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants