mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
fix selenium test
This commit is contained in:
@@ -92,6 +92,7 @@
|
||||
<template v-slot:foot(email)>
|
||||
<b-form-input
|
||||
v-model="shareWithEmail"
|
||||
class="user-email-input-form"
|
||||
placeholder="Please enter user email(s) using comma separated values"
|
||||
/>
|
||||
</template>
|
||||
@@ -103,7 +104,7 @@
|
||||
@click.stop="setSharing(actions.share_with, shareWithEmail)"
|
||||
v-b-tooltip.hover.bottom
|
||||
:title="shareWithEmail ? `Share with ${shareWithEmail}` : 'Please enter user email'"
|
||||
class="sharing_icon"
|
||||
class="sharing_icon submit-sharing-with"
|
||||
>
|
||||
<font-awesome-icon class="share_with" icon="user-plus" size="lg" />
|
||||
</b-button>
|
||||
|
||||
@@ -395,7 +395,8 @@ histories:
|
||||
sharing:
|
||||
selectors:
|
||||
unshare_user_button: '.unshare_user'
|
||||
share_with_a_user_button: '#share_with_a_user'
|
||||
user_email_input: '.user-email-input-form'
|
||||
submit_sharing_with: '.submit-sharing-with'
|
||||
make_accessible: '.make-accessible label'
|
||||
make_publishable: '.make-publishable label'
|
||||
labels:
|
||||
|
||||
@@ -96,10 +96,6 @@ class HistorySharingTestCase(SeleniumTestCase):
|
||||
self.home()
|
||||
self.click_history_option("Share or Publish")
|
||||
|
||||
def navigate_to_history_user_share_page(self):
|
||||
self.navigate_to_history_share_page()
|
||||
self.components.histories.sharing.share_with_a_user_button.wait_for_and_click()
|
||||
|
||||
def share_history_with_user(self, user_id=None, user_email=None, assert_valid=False, screenshot=False):
|
||||
"""Share the current history with a target user by ID or email.
|
||||
|
||||
@@ -107,16 +103,14 @@ class HistorySharingTestCase(SeleniumTestCase):
|
||||
is also specified. The ``user_email`` however is always used to check
|
||||
the result if ``assert_valid`` is True.
|
||||
"""
|
||||
self.navigate_to_history_user_share_page()
|
||||
form_selector = "form#share"
|
||||
form = self.wait_for_selector(form_selector)
|
||||
# If expose_user_info is on would fill form out with this
|
||||
# line, in future dispatch on actual select2 div present or not.
|
||||
# self.select2_set_value(form_selector, email)
|
||||
self.fill(form, {"email": user_id or user_email})
|
||||
self.navigate_to_history_share_page()
|
||||
self.components.histories.sharing.user_email_input.wait_for_and_send_keys(user_id or user_email)
|
||||
self.components.histories.sharing.user_email_input.wait_for_and_send_keys(user_id or user_email)
|
||||
|
||||
if screenshot:
|
||||
self.screenshot("history_sharing_user")
|
||||
self.click_submit(form)
|
||||
self.components.histories.sharing.submit_sharing_with.wait_for_and_click()
|
||||
|
||||
if assert_valid:
|
||||
self.assert_no_error_message()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user