Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRQA-87412, LRQA-87463 | master #329

Closed
Expand Up @@ -109,6 +109,12 @@
</execute>
</command>

<command name="clickShare">
<execute macro="Button#click">
<var name="button" value="Share" />
</execute>
</command>

<command name="clickSubmitForPublication">
<execute macro="Button#click">
<var name="button" value="Submit for Publication" />
Expand Down
Expand Up @@ -452,6 +452,17 @@
</then>
</if>

<if>
<isset var="viewableBy" />
<then>
<execute macro="Panel#expandPanel">
<var name="panel" value="Permissions" />
</execute>

<execute function="Select" locator1="Select#PERMISSIONS" value1="${viewableBy}" />
</then>
</if>

<execute function="AssertClick" locator1="Button#PUBLISH" value1="Publish" />

<if>
Expand Down Expand Up @@ -1259,6 +1270,55 @@
</if>
</command>

<command name="sharePG">
<var name="key_dmDocumentTitle" value="${dmDocumentTitle}" />

<execute function="AssertClick" locator1="DocumentsAndMedia#DESCRIPTIVE_LIST_DOCUMENT_TITLE" value1="${dmDocumentTitle}" />

<execute macro="DMDocument#viewDocumentTitleCmdPG">
<var name="dmDocumentTitle" value="${dmDocumentTitle}" />
</execute>

<var name="key_text" value="Share" />

<execute function="AssertClick" locator1="Button#ANY" value1="Share" />

<execute macro="IFrame#selectModalFrame" />

<execute function="Type" locator1="DocumentsAndMediaShare#INVITE_TO_COLLABORATE_INPUT" value1="${userEmailAddress}" />

<if>
<equals arg1="${sharingPermissions}" arg2="Update" />
<then>
<execute macro="FormFields#selectRadioOption">
<var name="fieldName" value="sharingEntryPermission" />
<var name="radioOption" value="Update" />
</execute>
</then>
<elseif>
<equals arg1="${sharingPermissions}" arg2="Comment" />
<then>
<execute macro="FormFields#selectRadioOption">
<var name="fieldName" value="sharingEntryPermission" />
<var name="radioOption" value="Comment" />
</execute>
</then>
</elseif>
<else>
<execute macro="FormFields#viewRadioValue">
<var name="fieldName" value="sharingEntryPermission" />
<var name="fieldValue" value="VIEW" />
</execute>
</else>
</if>

<execute macro="Button#clickShare" />

<execute macro="Alert#viewSuccessMessageText">
<var name="successMessage" value="The item was shared successfully." />
</execute>
</command>

<command name="tearDownCP">
<execute macro="Navigator#openURL" />

Expand Down
@@ -0,0 +1,69 @@
<definition>
<command name="_manageCollaborators">
<execute function="Click" locator1="Button#INFO" />

<var name="key_text" value="Manage Collaborators" />

<execute function="AssertClick" locator1="Button#ANY" value1="Manage Collaborators" />
</command>

<command name="changePermission">
<execute macro="DMDocument#viewPG">
<var name="dmDocumentDescription" value="${dmDocumentDescription}" />
<var name="dmDocumentTitle" value="${dmDocumentTitle}" />
</execute>

<execute macro="DMDocument#_manageCollaborators" />

<execute function="SelectFrame" locator1="IFrame#MODAL_IFRAME" />

<var name="key_userName" value="${userName}" />

<execute function="AssertTextEquals" locator1="DocumentsAndMediaShare#MANAGE_COLLABORATORS_NAME" value1="${userName}" />

<execute function="Select" locator1="DocumentsAndMediaShare#MANAGE_COLLABORATORS_ACCESS_DROPDOWN" value1="${selectPermission}" />

<execute function="AssertSelectedLabel" locator1="DocumentsAndMediaShare#MANAGE_COLLABORATORS_ACCESS_DROPDOWN" value1="${selectPermission}" />

<execute macro="Button#clickSave" />

<execute macro="Alert#viewSuccessMessageText">
<var name="successMessage" value="Permissions Changed" />
</execute>
</command>

<command name="removeCollaborator">
<execute macro="DMDocumentSharing#_manageCollaborators" />

<execute function="SelectFrame" locator1="IFrame#MODAL_IFRAME" />

<for list="${collaboratorList}" param="collaborator">
<var name="key_userName" value="${collaborator}" />

<execute function="Click" locator1="DocumentsAndMediaShare#MANAGE_COLLABORATORS_REMOVE_BUTTON" />
</for>

<if>
<isset var="emptyStateMessage" />
<then>
<execute function="AssertElementPresent" locator1="DocumentsAndMediaShare#MANAGE_COLLABORATORS_EMPTY_STATE_MESSAGE" />
</then>
</if>

<execute macro="Button#clickSave" />

<execute macro="Alert#viewSuccessMessageText">
<var name="successMessage" value="Permissions Changed" />
</execute>
</command>

<command name="viewCollaborators">
<execute function="Click" locator1="Button#INFO" />

<for list="${collaboratorList}" param="collaborator">
<var name="key_collaborator" value="${collaborator}" />

<execute function="AssertElementPresent" locator1="DocumentsAndMediaShare#COLLABORATOR_TOOLTIP" value1="${collaborator}" />
</for>
</command>
</definition>
@@ -0,0 +1,50 @@
<html>
<head>
<title>DocumentsAndMediaShare</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">DocumentsAndMediaShare</td></tr>
</thead>
<tbody>
<tr>
<td>INVITE_TO_COLLABORATE_INPUT</td>
<td>//div/input[contains(@id,'userEmailAddress')]</td>
<td></td>
</tr>
<tr>
<td>COLLABORATOR_TOOLTIP</td>
<td>//div[contains(@class,'lfr-portal-tooltip') and contains(@data-title,'${key_collaborator}')]</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<!--MANAGE_COLLABORATORS-->
<tr>
<td>MANAGE_COLLABORATORS_NAME</td>
<td>//div/h4[contains(.,'${key_userName}')]</td>
<td></td>
</tr>
<tr>
<td>MANAGE_COLLABORATORS_ACCESS_DROPDOWN</td>
<td>//li/div[contains(.,'${key_userName}')]//div[3]/div/select</td>
<td></td>
</tr>
<tr>
<td>MANAGE_COLLABORATORS_EMPTY_STATE_MESSAGE</td>
<td>//h3[contains(.,'No Collaborators')]</td>
<td></td>
</tr>
<tr>
<td>MANAGE_COLLABORATORS_REMOVE_BUTTON</td>
<td>//li/div[contains(.,'${key_userName}')]//div[4]/button[//*[name()='svg'][contains(@class,'lexicon-icon')]]</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>