mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-31 02:28:09 +08:00
Replace data-test-id with data-description
This commit is contained in:
+5
-5
@@ -51,32 +51,32 @@ describe("History Selection Operations", () => {
|
||||
|
||||
it("should display the total number of items to apply the operation", async () => {
|
||||
await wrapper.setProps({ selectionSize: 10 });
|
||||
expect(wrapper.find('[data-test-id="selected-count"]').text()).toContain("10");
|
||||
expect(wrapper.find('[data-description="selected count"]').text()).toContain("10");
|
||||
});
|
||||
|
||||
it("should display 'hide' option only on visible items", async () => {
|
||||
const option = '[data-test-id="hide-option"]';
|
||||
const option = '[data-description="hide option"]';
|
||||
expect(wrapper.find(option).exists()).toBe(true);
|
||||
await wrapper.setProps({ filterText: "visible=false" });
|
||||
expect(wrapper.find(option).exists()).toBe(false);
|
||||
});
|
||||
|
||||
it("should display 'unhide' option only on hidden items", async () => {
|
||||
const option = '[data-test-id="unhide-option"]';
|
||||
const option = '[data-description="unhide option"]';
|
||||
expect(wrapper.find(option).exists()).toBe(false);
|
||||
await wrapper.setProps({ filterText: "visible=false" });
|
||||
expect(wrapper.find(option).exists()).toBe(true);
|
||||
});
|
||||
|
||||
it("should display 'delete' option only on non-deleted items", async () => {
|
||||
const option = '[data-test-id="delete-option"]';
|
||||
const option = '[data-description="delete option"]';
|
||||
expect(wrapper.find(option).exists()).toBe(true);
|
||||
await wrapper.setProps({ filterText: "deleted=true" });
|
||||
expect(wrapper.find(option).exists()).toBe(false);
|
||||
});
|
||||
|
||||
it("should display 'undelete' option only on deleted items", async () => {
|
||||
const option = '[data-test-id="undelete-option"]';
|
||||
const option = '[data-description="undelete option"]';
|
||||
expect(wrapper.find(option).exists()).toBe(false);
|
||||
await wrapper.setProps({ filterText: "deleted=true" });
|
||||
expect(wrapper.find(option).exists()).toBe(true);
|
||||
|
||||
+6
-6
@@ -10,21 +10,21 @@
|
||||
</span>
|
||||
</template>
|
||||
<b-dropdown-text>
|
||||
<span v-localize data-test-id="selected-count">With {{ numSelected }} selected...</span>
|
||||
<span v-localize data-description="selected count">With {{ numSelected }} selected...</span>
|
||||
</b-dropdown-text>
|
||||
<b-dropdown-item v-if="showHidden" v-b-modal:show-selected-content data-test-id="unhide-option">
|
||||
<b-dropdown-item v-if="showHidden" v-b-modal:show-selected-content data-description="unhide option">
|
||||
<span v-localize>Unhide</span>
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item v-else v-b-modal:hide-selected-content data-test-id="hide-option">
|
||||
<b-dropdown-item v-else v-b-modal:hide-selected-content data-description="hide option">
|
||||
<span v-localize>Hide</span>
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item v-if="showDeleted" v-b-modal:restore-selected-content data-test-id="undelete-option">
|
||||
<b-dropdown-item v-if="showDeleted" v-b-modal:restore-selected-content data-description="undelete option">
|
||||
<span v-localize>Undelete</span>
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item v-else v-b-modal:delete-selected-content data-test-id="delete-option">
|
||||
<b-dropdown-item v-else v-b-modal:delete-selected-content data-description="delete option">
|
||||
<span v-localize>Delete</span>
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item v-if="!showDeleted" v-b-modal:purge-selected-content data-test-id="purge-option">
|
||||
<b-dropdown-item v-if="!showDeleted" v-b-modal:purge-selected-content data-description="purge option">
|
||||
<span v-localize>Delete (permanently)</span>
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item v-if="showBuildOptions" data-description="build list" @click="buildDatasetList">
|
||||
|
||||
Reference in New Issue
Block a user