-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16224 from jmchilton/edit_attributes
E2E Tests for Edit Dataset Attributes Page
- Loading branch information
Showing
12 changed files
with
183 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ref, computed } from "vue"; | ||
|
||
export function useMultiselect() { | ||
const editing = ref(false); | ||
const ariaExpanded = computed(() => { | ||
return editing.value ? "true" : "false"; | ||
}); | ||
|
||
function onOpen() { | ||
editing.value = true; | ||
} | ||
|
||
function onClose() { | ||
editing.value = false; | ||
} | ||
|
||
return { editing, ariaExpanded, onOpen, onClose }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
from galaxy.selenium.axe_results import FORMS_VIOLATIONS | ||
from .framework import ( | ||
managed_history, | ||
selenium_test, | ||
SeleniumTestCase, | ||
) | ||
|
||
TEST_ANNOTATION = "my cool annotation" | ||
TEST_INFO = "my cool info" | ||
|
||
|
||
class TestHistoryPanel(SeleniumTestCase): | ||
ensure_registered = True | ||
|
||
@selenium_test | ||
@managed_history | ||
def test_history_dataset_rename(self): | ||
original_name = "1.txt" | ||
new_name = "newname.txt" | ||
|
||
history_entry = self.perform_single_upload(self.get_filename(original_name)) | ||
hid = history_entry.hid | ||
self.wait_for_history() | ||
self.history_panel_wait_for_hid_ok(hid) | ||
self.history_panel_item_edit(hid=hid) | ||
edit_dataset_attributes = self.components.edit_dataset_attributes | ||
name_component = edit_dataset_attributes.name_input | ||
assert name_component.wait_for_value() == original_name | ||
edit_dataset_attributes._.assert_no_axe_violations_with_impact_of_at_least( | ||
"critical", excludes=FORMS_VIOLATIONS | ||
) | ||
name_component.wait_for_and_clear_and_send_keys(new_name) | ||
edit_dataset_attributes.save_button.wait_for_and_click() | ||
edit_dataset_attributes.alert.wait_for_visible() | ||
|
||
# assert success message, name updated in form and in history panel | ||
assert edit_dataset_attributes.alert.has_class("alert-success") | ||
assert name_component.wait_for_value() == new_name | ||
assert self.history_panel_item_component(hid=hid).name.wait_for_text() == new_name | ||
|
||
@selenium_test | ||
@managed_history | ||
def test_history_dataset_update_annotation_and_info(self): | ||
history_entry = self.perform_single_upload(self.get_filename("1.txt")) | ||
hid = history_entry.hid | ||
self.wait_for_history() | ||
self.history_panel_wait_for_hid_ok(hid) | ||
self.history_panel_item_edit(hid=hid) | ||
edit_dataset_attributes = self.components.edit_dataset_attributes | ||
annotation_component = edit_dataset_attributes.annotation_input | ||
annotation_component.wait_for_and_clear_and_send_keys(TEST_ANNOTATION) | ||
|
||
info_component = edit_dataset_attributes.info_input | ||
info_component.wait_for_and_clear_and_send_keys(TEST_INFO) | ||
|
||
edit_dataset_attributes.save_button.wait_for_and_click() | ||
edit_dataset_attributes.alert.wait_for_visible() | ||
|
||
# assert success message, name updated in form and in history panel | ||
assert edit_dataset_attributes.alert.has_class("alert-success") | ||
|
||
# reopen and check that attributes are updated | ||
self.home() | ||
self.history_panel_item_edit(hid=hid) | ||
|
||
assert annotation_component.wait_for_value() == TEST_ANNOTATION | ||
assert info_component.wait_for_value() == TEST_INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters