Skip to content

Commit

Permalink
LRQA-35459 Refactor page teardown to use Product Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-chu authored and brianchandotcom committed Oct 12, 2017
1 parent beaecfc commit 153ff7b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
22 changes: 16 additions & 6 deletions portal-web/test/functional/com/liferay/portalweb/macros/Page.macro
Expand Up @@ -771,19 +771,29 @@
</execute>

<while>
<condition function="IsElementPresent#isElementPresentClickNavigation" locator1="Home#PAGE_2" />
<condition function="IsElementPresent" locator1="SitePages#PAGE_ELLIPSIS_2" />
<then>
<execute function="MouseOver#mouseOverClickNavigation" locator1="Home#PAGE_2" />
<execute macro="ProductMenuHelper#expandPanel">
<var name="panel" value="Site Administration" />
</execute>

<execute macro="ProductMenuHelper#expandCategory">
<var name="category" value="Navigation" />
</execute>

<execute function="ClickNoError" locator1="Home#DELETE_PAGE_ICON" />
<execute function="MouseOver#mouseOverNotVisible" locator1="SitePages#PAGE_ELLIPSIS_2" />

<execute function="Confirm" value1="Are you sure you want to delete this page?" />
<execute function="Click" locator1="SitePages#PAGE_ELLIPSIS_2" />

<execute function="AssertClickNoError" locator1="MenuItem#ANY_MENU_ITEM" value1="Delete">
<var name="key_menuItem" value="Delete" />
</execute>

<execute function="Refresh" />
<execute function="Confirm" value1="Are you sure you want to delete the selected page?" />
</then>
</while>

<execute function="AssertElementNotPresent#assertElementNotPresentClickDockbar" locator1="Home#DELETE_PAGE_ICON" />
<execute function="AssertElementNotPresent" locator1="SitePages#PAGE_ELLIPSIS_2" />
</command>

<command name="togglePageTemplateInheritChanges">
Expand Down
Expand Up @@ -450,6 +450,11 @@
<td>//div[contains(.,'${key_page}')]/*[@data-qa-id='pageOptions']</td>
<td></td>
</tr>
<tr>
<td>PAGE_ELLIPSIS_2</td>
<td>xpath=(//*[@data-qa-id='pageOptions'])[2]</td>
<td></td>
</tr>
</tbody>
</table>
</body>
Expand Down

0 comments on commit 153ff7b

Please sign in to comment.