def METHOD_NAME(create_outlineexplorer, qtbot):
    """
    Test that clicking on the 'Go to cursor position' button located in the
    toolbar of the outline explorer is working as expected when the cursor
    is located in the editor under the last item of the outline tree widget.
    Regression test for spyder-ide/spyder#7744.
    """
    outlineexplorer, _ = create_outlineexplorer('text')
    # Move the mouse cursor in the editor to the last line :
    editor = outlineexplorer.treewidget.current_editor
    line_count = editor._editor.document().blockCount() - 2
    editor._editor.go_to_line(line_count)
    assert editor._editor.get_text_line(line_count) == "        pass"
    # Click on the 'Go to cursor position' button of the outline explorer's
    # toolbar :
    qtbot.mouseClick(
        outlineexplorer.get_toolbutton(OutlineExplorerToolbuttons.GoToCursor),
        Qt.LeftButton)
    assert outlineexplorer.treewidget.currentItem().text(0) == 'method1'