Skip to content

Commit

Permalink
add selenium test for upload modal not losing content on close
Browse files Browse the repository at this point in the history
This selenium makes sure that when users reopen upload modal, the content from prior or inprogress uploads is still there
  • Loading branch information
ahmedhamidawan committed Jan 24, 2024
1 parent 31e6f1d commit fe353dc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/galaxy_test/selenium/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,36 @@ def test_upload_paired_list(self):
self.history_panel_wait_for_hid_hidden(3)
self.history_panel_wait_for_hid_hidden(4)

@selenium_test
def test_upload_modal_retains_content(self):
self.home()

# initialize 2 uploads and close modal
self.upload_start_click()
self.upload_queue_local_file(self.get_filename("1.sam"))
self.upload_paste_data("some pasted data")
self.wait_for_and_click_selector("button#btn-close")

# reopen modal and check that the files are still there
self.upload_start_click()
self.wait_for_selector_visible("#upload-row-0.upload-init")
self.wait_for_selector_visible("#upload-row-1.upload-init")

# perform upload and close modal
self.upload_start()
self.wait_for_and_click_selector("button#btn-close")

# add another pasted file, but don't upload it
self.upload_start_click()
self.upload_paste_data("some more pasted data")
self.wait_for_and_click_selector("button#btn-close")

# reopen modal and see 2 uploaded, 1 yet to upload
self.upload_start_click()
self.wait_for_selector_visible("#upload-row-0.upload-success")
self.wait_for_selector_visible("#upload-row-1.upload-success")
self.wait_for_selector_visible("#upload-row-2.upload-init")

@selenium_test
@pytest.mark.gtn_screenshot
@pytest.mark.local
Expand Down

0 comments on commit fe353dc

Please sign in to comment.