# See https://github.com/silverstripe/silverstripe-subsites/issues/357 Feature: Insert an internal link into content As a CMS user I can insert internal links into my content So that I can direct users to different parts of my website Background: Given a "subsite" "Subsite B" And a "page" "My page" with "URLSegment"="my-page", "Content"="My page content" And a "page" "Another page" with "URLSegment"="another-page", "Content"="My other page content" And I am logged in with "CMS_ACCESS_CMSMain" permissions Then I go to "admin/pages" And I click on "My page" in the tree @javascript Scenario: I can insert an internal link # See "insert-a-link.feature" from silverstripe/cms When I select "My page" in the "Content" HTML field And I press the "Insert link" HTML field button And I click "Page on this site" in the ".tox-collection__group" element Then I should see an "form#Form_editorInternalLink" element When I select "Another page" in the "#Form_editorInternalLink_PageID_Holder" tree dropdown And I fill in "my desc" for "Link description" And I click on the "#Form_editorInternalLink_action_insert" element Then the "Content" HTML field should contain "" # Required to avoid "unsaved changes" browser dialog Then I press the "Save" button