def test_element_glue_on_border_with_secondary_position(
    element, secondary_pos, expected_glue_pos
):
    pos = (50, 50)
    sink = ConnectionSink(element)
    glue_pos = sink.glue(pos, secondary_pos=secondary_pos)

    assert glue_pos == expected_glue_pos
def test_element_glue_on_border(element, pos, expected_glue_pos):
    sink = ConnectionSink(element)
    glue_pos = sink.glue(pos)

    assert glue_pos == expected_glue_pos