8000 Cursor test fails: In - From output connection · Issue #8955 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Cursor test fails: In - From output connection #8955
Closed
@rachel-fenichel

Description

@rachel-fenichel

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

This test fails after @BenHenning's focus manager changes to the line cursor:

    test('In - From output connection', function () {
      const fieldBlock = this.blocks.E;
      const outputNode = ASTNode.createConnectionNode(
        fieldBlock.outputConnection,
      );
      this.cursor.setCurNode(outputNode);
      this.cursor.in();
      const curNode = this.cursor.getCurNode();
      assert.equal(curNode.getLocation(), fieldBlock);
    });

The proximate cause is that output connections are not given highlight paths in drawer.updateConnectionHighlights because they live at the block level instead of in the rows.

In the keyboard experimentation plugin we sometimes (always?) use the block's node or the parent input connection's node, rather than placing the cursor on an output connection.

If the cursor is allowed to go to an output connection, updateConnectionHighlights needs to be updated.

If the cursor cannot ever be placed at an output connection, the direct call to this.cursor.setCurNode(outputNode); should throw an error.

Local test updates

To make this test useful again, the initial cursor location can be block A's first input connection. Moving in from there should reach the field block node.

Reproduction steps

Stack trace

Screenshots

No response

Browsers

No response

Metadata

Metadata

Assignees

Labels

issue: bugDescribes why the code or behaviour is wrong

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0