mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 07:05:57 +08:00
Add data-e2e attributes [SCI-10571]
This commit is contained in:
parent
d5665b9c14
commit
5ab1b4eead
17 changed files with 101 additions and 70 deletions
|
@ -285,12 +285,15 @@ var RepositoryColumns = (function() {
|
|||
let editUrl = $(el).attr('data-edit-column-url');
|
||||
let destroyUrl = $(el).attr('data-destroy-column-url');
|
||||
let thederName;
|
||||
|
||||
if ($(el).find('.modal-tooltiptext').length > 0) {
|
||||
thederName = $(el).find('.modal-tooltiptext').text();
|
||||
} else {
|
||||
thederName = el.innerText;
|
||||
}
|
||||
thederName = _.escape(thederName);
|
||||
|
||||
const e2eName = thederName.toLowerCase().replace(' ', '_');
|
||||
|
||||
if (['row-name', 'archived-by', 'archived-on'].includes(el.id)) {
|
||||
visClass = '';
|
||||
|
@ -303,24 +306,24 @@ var RepositoryColumns = (function() {
|
|||
destroyButton = `<button class="btn icon-btn btn-light btn-xs delete-repo-column manage-repo-column"
|
||||
data-action="destroy"
|
||||
data-modal-url="${destroyUrl}">
|
||||
<span class="sn-icon sn-icon-delete" title="Delete"></span>
|
||||
<span class="sn-icon sn-icon-delete" title="Delete" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-delete"></span>
|
||||
</button>`;
|
||||
}
|
||||
|
||||
let listItem = `<li class="col-list-el ${visLi} ${customColumn} ${editableRow}" data-position="${colIndex}" data-id="${colId}">
|
||||
<i class="grippy sn-icon sn-icon-drag"></i>
|
||||
<i class="grippy sn-icon sn-icon-drag" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-drag"></i>
|
||||
<span class="vis-controls">
|
||||
<span class="vis sn-icon ${visClass}" title="${visText}"></span>
|
||||
<span class="vis sn-icon ${visClass}" title="${visText}" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-visibility"></span>
|
||||
</span>
|
||||
<div class="text truncate" title="${thederName}">${thederName}</div>
|
||||
<div class="text truncate" title="${thederName}" data-e2e="e2e-TX-invItems-manageColumnsModal-${e2eName}-columnName">${thederName}</div>
|
||||
<span class="column-type pull-right shrink-0">${
|
||||
getColumnTypeText(el, colId) || '<i class="sn-icon sn-icon-locked-task"></i>'
|
||||
getColumnTypeText(el, colId) || `<i class="sn-icon sn-icon-locked-task" data-e2e="e2e-IC-invItems-manageColumnsModal-${e2eName}-locked"></i>`
|
||||
}</span>
|
||||
<span class="sci-btn-group manage-controls pull-right" data-view-mode="active">
|
||||
<button class="btn icon-btn btn-light btn-xs edit-repo-column manage-repo-column"
|
||||
data-action="edit"
|
||||
data-modal-url="${editUrl}">
|
||||
<span class="sn-icon sn-icon-edit" title="Edit"></span>
|
||||
<span class="sn-icon sn-icon-edit" title="Edit" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-edit"></span>
|
||||
</button>
|
||||
${destroyButton}
|
||||
</span>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="sci--navigation--top-menu-container">
|
||||
<div v-if="user" class="sci--navigation--top-menu-search left-icon sci-input-container-v2" :class="{'disabled' : !currentTeam}" :title="i18n.t('nav.search')">
|
||||
<input type="text" :placeholder="i18n.t('nav.search')" @change="searchValue"/>
|
||||
<input type="text" :placeholder="i18n.t('nav.search')" @change="searchValue" :data-e2e="'e2e-IF-topMenu-search'"/>
|
||||
<i class="sn-icon sn-icon-search"></i>
|
||||
</div>
|
||||
<div v-if="currentTeam" class="w-64">
|
||||
<div v-if="currentTeam" class="w-64" :data-e2e="'e2e-DD-topMenu-teams'">
|
||||
<SelectDropdown
|
||||
:value="currentTeam"
|
||||
:options="teams"
|
||||
|
|
|
@ -2,28 +2,29 @@
|
|||
<div ref="modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form @submit.prevent="submit">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content" data-e2e="e2e-MD-duplicateInventory">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-e2e="e2e-BT-duplicateInventoryModal-close">
|
||||
<i class="sn-icon sn-icon-close"></i>
|
||||
</button>
|
||||
<h4 class="modal-title truncate !block" id="edit-project-modal-label" :title="repository.name">
|
||||
<h4 class="modal-title truncate !block" id="edit-project-modal-label" data-e2e="e2e-TX-duplicateInventoryModal-title" :title="repository.name">
|
||||
{{ i18n.t('repositories.index.modal_copy.title_html', {name: repository.name }) }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-6">
|
||||
<label class="sci-label">{{ i18n.t("repositories.index.modal_copy.name") }}</label>
|
||||
<label class="sci-label" data-e2e="e2e-TX-duplicateInventoryModal-inputLabel">{{ i18n.t("repositories.index.modal_copy.name") }}</label>
|
||||
<div class="sci-input-container-v2" :class="{'error': error}" :data-error="error">
|
||||
<input type="text" v-model="name" class="sci-input-field"
|
||||
autofocus="true" ref="input"
|
||||
data-e2e="e2e-IF-duplicateInventoryModal-name"
|
||||
:placeholder="i18n.t('repositories.index.modal_copy.name_placeholder')" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ i18n.t('general.cancel') }}</button>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" data-e2e="e2e-BT-duplicateInventoryModal-cancel">{{ i18n.t('general.cancel') }}</button>
|
||||
<button class="btn btn-primary" type="submit" data-e2e="e2e-BT-duplicateInventoryModal-create">
|
||||
{{ i18n.t('repositories.index.modal_copy.copy') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -2,29 +2,30 @@
|
|||
<div ref="modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form @submit.prevent="submit">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content" data-e2e="e2e-MD-newInventory">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-e2e="e2e-BT-newInventoryModal-close">
|
||||
<i class="sn-icon sn-icon-close"></i>
|
||||
</button>
|
||||
<h4 class="modal-title truncate !block" id="edit-project-modal-label">
|
||||
<h4 class="modal-title truncate !block" id="edit-project-modal-label" data-e2e="e2e-TX-newInventoryModal-title">
|
||||
{{ i18n.t('repositories.index.modal_create.title') }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-6">
|
||||
<label class="sci-label">{{ i18n.t("repositories.index.modal_create.name_label") }}</label>
|
||||
<label class="sci-label" data-e2e="e2e-TX-newInventoryModal-inputLabel">{{ i18n.t("repositories.index.modal_create.name_label") }}</label>
|
||||
<div class="sci-input-container-v2" :class="{'error': error}" :data-error="error">
|
||||
<input type="text" v-model="name"
|
||||
class="sci-input-field"
|
||||
autofocus="true" ref="input"
|
||||
data-e2e="e2e-IF-newInventoryModal-name"
|
||||
:placeholder="i18n.t('repositories.index.modal_create.name_placeholder')" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ i18n.t('general.cancel') }}</button>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" data-e2e="e2e-BT-newInventoryModal-cancel">{{ i18n.t('general.cancel') }}</button>
|
||||
<button class="btn btn-primary" type="submit" data-e2e="e2e-BT-newInventoryModal-create">
|
||||
{{ i18n.t('repositories.index.modal_create.submit') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div ref="wrapper" v-show="isShowing" id="repository-item-sidebar-wrapper"
|
||||
class='items-sidebar-wrapper bg-white gap-2.5 self-stretch rounded-tl-4 rounded-bl-4 sn-shadow-menu-lg h-full w-[565px]'>
|
||||
|
||||
<div id="repository-item-sidebar" class="w-full h-full pl-6 bg-white flex flex-col">
|
||||
<div id="repository-item-sidebar" data-e2e="e2e-CO-itemCard" class="w-full h-full pl-6 bg-white flex flex-col">
|
||||
|
||||
<div ref="stickyHeaderRef" id="sticky-header-wrapper"
|
||||
class="sticky top-0 right-0 bg-white flex z-50 flex-col h-[78px] pt-6">
|
||||
|
@ -17,9 +17,9 @@
|
|||
:name="defaultColumns.name"
|
||||
:archived="defaultColumns.archived"
|
||||
@update="update"
|
||||
data-e2e="e2e-TX-repoItemSB-title">
|
||||
data-e2e="e2e-TX-itemCard-title">
|
||||
</repository-item-sidebar-title>
|
||||
<i id="close-icon" @click="toggleShowHideSidebar(null)"
|
||||
<i id="close-icon" data-e2e="e2e-BT-itemCard-close" @click="toggleShowHideSidebar(null)"
|
||||
class="sn-icon sn-icon-close ml-auto cursor-pointer my-auto mx-0"></i>
|
||||
</div>
|
||||
<div id="divider" class="w-500 bg-sn-light-grey flex items-center self-stretch h-px mt-6 mr-6"></div>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<div class="flex flex-col ">
|
||||
<span class="inline-block font-semibold pb-[6px]">{{
|
||||
i18n.t('repositories.item_card.default_columns.repository_name') }}</span>
|
||||
<span class="repository-name text-sn-dark-grey line-clamp-3" :title="repository?.name" data-e2e="e2e-TX-repoItemSBinformation-inventory">
|
||||
<span class="repository-name text-sn-dark-grey line-clamp-3" :title="repository?.name" data-e2e="e2e-TX-itemCard-inventory">
|
||||
{{ repository?.name }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<span class="inline-block font-semibold pb-[6px]">{{
|
||||
i18n.t('repositories.item_card.default_columns.id')
|
||||
}}</span>
|
||||
<span class="inline-block text-sn-dark-grey line-clamp-3" :title="defaultColumns?.code" data-e2e="e2e-TX-repoItemSBinformation-itemID">
|
||||
<span class="inline-block text-sn-dark-grey line-clamp-3" :title="defaultColumns?.code" data-e2e="e2e-TX-itemCard-itemID">
|
||||
{{ defaultColumns?.code }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<span class="inline-block font-semibold pb-[6px]">{{
|
||||
i18n.t('repositories.item_card.default_columns.added_on')
|
||||
}}</span>
|
||||
<span class="inline-block text-sn-dark-grey" :title="defaultColumns?.added_on" data-e2e="e2e-TX-repoItemSBinformation-addedOn">
|
||||
<span class="inline-block text-sn-dark-grey" :title="defaultColumns?.added_on" data-e2e="e2e-TX-itemCard-addedOn">
|
||||
{{ defaultColumns?.added_on }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -92,7 +92,7 @@
|
|||
<span class="inline-block font-semibold pb-[6px]">{{
|
||||
i18n.t('repositories.item_card.default_columns.added_by')
|
||||
}}</span>
|
||||
<span class="inline-block text-sn-dark-grey line-clamp-3" :title="defaultColumns?.added_by" data-e2e="e2e-TX-repoItemSBinformation-addedBy">
|
||||
<span class="inline-block text-sn-dark-grey line-clamp-3" :title="defaultColumns?.added_by" data-e2e="e2e-TX-itemCard-addedBy">
|
||||
{{ defaultColumns?.added_by }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<span class="inline-block font-semibold pb-[6px]">{{
|
||||
i18n.t('repositories.item_card.default_columns.archived_on')
|
||||
}}</span>
|
||||
<span class="inline-block text-sn-dark-grey" :title="defaultColumns.archived_on" data-e2e="e2e-TX-repoItemSBinformation-archivedOn">
|
||||
<span class="inline-block text-sn-dark-grey" :title="defaultColumns.archived_on" data-e2e="e2e-TX-itemCard-archivedOn">
|
||||
{{ defaultColumns.archived_on }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -114,7 +114,7 @@
|
|||
<span class="inline-block font-semibold pb-[6px]">{{
|
||||
i18n.t('repositories.item_card.default_columns.archived_by')
|
||||
}}</span>
|
||||
<span class="inline-block text-sn-dark-grey" :title="defaultColumns.archived_by.full_name" data-e2e="e2e-TX-repoItemSBinformation-archivedBy">
|
||||
<span class="inline-block text-sn-dark-grey" :title="defaultColumns.archived_by.full_name" data-e2e="e2e-TX-itemCard-archivedBy">
|
||||
{{ defaultColumns.archived_by.full_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -148,14 +148,14 @@
|
|||
</div>
|
||||
<div class="font-inter text-sm leading-5 w-full">
|
||||
<div class="flex flex-row justify-between mb-4">
|
||||
<div class="font-semibold" data-e2e="e2e-TX-repoItemSBrelationships-parents">
|
||||
<div class="font-semibold" data-e2e="e2e-TX-itemCard-parents">
|
||||
{{ i18n.t('repositories.item_card.relationships.parents.count', { count: parentsCount || 0 }) }}
|
||||
</div>
|
||||
<a
|
||||
v-if="permissions.can_connect_rows"
|
||||
class="relationships-add-link btn-text-link font-normal"
|
||||
@click="handleOpenAddRelationshipsModal($event, 'parent')"
|
||||
data-e2e="e2e-TL-repoItemSBrelationships-addParents"
|
||||
data-e2e="e2e-BT-itemCard-addParent"
|
||||
>
|
||||
{{ i18n.t('repositories.item_card.add_relationship_button_text') }}
|
||||
</a>
|
||||
|
@ -196,14 +196,14 @@
|
|||
|
||||
<div class="font-inter text-sm leading-5 w-full">
|
||||
<div class="flex flex-row justify-between" :class="{ 'mb-4': childrenCount }">
|
||||
<div class="font-semibold" data-e2e="e2e-TX-repoItemSBrelationships-children">
|
||||
<div class="font-semibold" data-e2e="e2e-TX-itemCard-children">
|
||||
{{ i18n.t('repositories.item_card.relationships.children.count', { count: childrenCount || 0 }) }}
|
||||
</div>
|
||||
<a
|
||||
v-if="permissions.can_connect_rows"
|
||||
class="relationships-add-link btn-text-link font-normal"
|
||||
@click="handleOpenAddRelationshipsModal($event, 'child')"
|
||||
data-e2e="e2e-TL-repoItemSBrelationships-addChildren"
|
||||
data-e2e="e2e-BT-itemCard-addChild"
|
||||
>
|
||||
{{ i18n.t('repositories.item_card.add_relationship_button_text') }}
|
||||
</a>
|
||||
|
@ -249,7 +249,7 @@
|
|||
class="flex flex-row text-lg font-semibold w-[350px] mb-6 leading-7 items-center justify-between transition-colors duration-300"
|
||||
ref="assigned-label"
|
||||
id="assigned-label"
|
||||
data-e2e="e2e-TX-repoItemSB-assigned"
|
||||
data-e2e="e2e-TX-itemCard-assigned"
|
||||
>
|
||||
{{ i18n.t('repositories.item_card.section.assigned', {
|
||||
count: assignedModules ?
|
||||
|
@ -261,7 +261,7 @@
|
|||
'disabled': actions?.assign_repository_row && actions.assign_repository_row.disabled
|
||||
}"
|
||||
:data-assign-url="actions?.assign_repository_row ? actions.assign_repository_row.assign_url : ''"
|
||||
:data-repository-row-id="repositoryRowId" @click="showRepositoryAssignModal" data-e2e="e2e-TL-repoItemSBassigned-assignToTask">
|
||||
:data-repository-row-id="repositoryRowId" @click="showRepositoryAssignModal" data-e2e="e2e-TL-repoItemSB-assignToTask">
|
||||
{{ i18n.t('repositories.item_card.assigned.assign') }}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -320,7 +320,7 @@
|
|||
:class="{ 'pb-6': customColumns?.length }">
|
||||
<div id="divider" class="w-500 bg-sn-light-grey flex px-8 items-center self-stretch h-px mb-6"></div>
|
||||
<div id="bottom-button-wrapper" class="flex h-10 justify-end">
|
||||
<button type="button" class="btn btn-primary print-label-button" data-e2e="e2e-BT-repoItemSB-print"
|
||||
<button type="button" class="btn btn-primary print-label-button" data-e2e="e2e-BT-itemCard-print"
|
||||
:data-rows="JSON.stringify([repositoryRowId])"
|
||||
:data-repository-id="repository?.id">
|
||||
{{ i18n.t('repositories.item_card.print_label') }}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<button class="ml-2 btn"
|
||||
id="share-button"
|
||||
type="button"
|
||||
data-e2e="e2e-BT-tasks-shareTask"
|
||||
:class="shareClass"
|
||||
:title="shareValue"
|
||||
@click="openModal">
|
||||
|
|
|
@ -106,19 +106,22 @@ export default {
|
|||
menu.push({
|
||||
text: this.attachment.attributes.wopi_context.button_text,
|
||||
url: this.attachment.attributes.urls.edit_asset,
|
||||
url_target: '_blank'
|
||||
url_target: '_blank',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-openInWopi'
|
||||
});
|
||||
}
|
||||
if (this.attachment.attributes.asset_type === 'gene_sequence' && this.attachment.attributes.urls.open_vector_editor_edit) {
|
||||
menu.push({
|
||||
text: this.i18n.t('open_vector_editor.edit_sequence'),
|
||||
emit: 'open_ove_editor'
|
||||
emit: 'open_ove_editor',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-openInOve'
|
||||
});
|
||||
}
|
||||
if (this.attachment.attributes.asset_type === 'marvinjs' && this.attachment.attributes.urls.marvin_js_start_edit) {
|
||||
menu.push({
|
||||
text: this.i18n.t('assets.file_preview.edit_in_marvinjs'),
|
||||
emit: 'open_marvinjs_editor'
|
||||
emit: 'open_marvinjs_editor',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-openInMarvin'
|
||||
});
|
||||
}
|
||||
if (this.attachment.attributes.asset_type !== 'marvinjs'
|
||||
|
@ -126,7 +129,8 @@ export default {
|
|||
&& this.attachment.attributes.urls.start_edit_image) {
|
||||
menu.push({
|
||||
text: this.i18n.t('assets.file_preview.edit_in_scinote'),
|
||||
emit: 'open_scinote_editor'
|
||||
emit: 'open_scinote_editor',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-openInImageEditor'
|
||||
});
|
||||
}
|
||||
if (this.canOpenLocally) {
|
||||
|
@ -143,18 +147,21 @@ export default {
|
|||
menu.push({
|
||||
text: this.i18n.t('Download'),
|
||||
url: this.attachment.attributes.urls.download,
|
||||
url_target: '_blank'
|
||||
url_target: '_blank',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-download'
|
||||
});
|
||||
if (this.attachment.attributes.urls.move_targets) {
|
||||
menu.push({
|
||||
text: this.i18n.t('assets.context_menu.move'),
|
||||
emit: 'move'
|
||||
emit: 'move',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-move'
|
||||
});
|
||||
}
|
||||
if (this.attachment.attributes.urls.delete) {
|
||||
menu.push({
|
||||
text: this.i18n.t('assets.context_menu.delete'),
|
||||
emit: 'delete'
|
||||
emit: 'delete',
|
||||
data_e2e: 'e2e-BT-attachmentOptions-delete'
|
||||
});
|
||||
}
|
||||
if (this.attachment.attributes.urls.toggle_view_mode) {
|
||||
|
@ -164,6 +171,7 @@ export default {
|
|||
text: this.i18n.t(`assets.context_menu.${viewMode}_html`),
|
||||
emit: 'viewMode',
|
||||
params: viewMode,
|
||||
data_e2e: `e2e-BT-attachmentOptions-${viewMode}`,
|
||||
dividerBefore: i === 0
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div ref="modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content" data-e2e="e2e-MD-manageColumns">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-e2e="e2e-BT-manageColumnsModal-close">
|
||||
<i class="sn-icon sn-icon-close"></i>
|
||||
</button>
|
||||
<h4 class="modal-title truncate !block">
|
||||
<h4 class="modal-title truncate !block" data-e2e="e2e-TX-manageColumnsModal-title">
|
||||
{{ i18n.t('experiments.table.column_display_modal.title') }}
|
||||
</h4>
|
||||
</div>
|
||||
|
@ -30,18 +30,18 @@
|
|||
>
|
||||
<div v-if="element.field == 'pinnedSeparator'" class="h-[1px] w-full bg-sn-sleepy-grey"></div>
|
||||
<template v-else>
|
||||
<div class="opacity-0 group-hover/column:!opacity-100 element-grip cursor-pointer">
|
||||
<div class="opacity-0 group-hover/column:!opacity-100 element-grip cursor-pointer" :data-e2e="'e2e-BT-manageColumnsModal-'+element.field+'-drag'">
|
||||
<i class="sn-icon sn-icon-drag"></i>
|
||||
</div>
|
||||
<div v-if="element.field === 'name'" class="w-6 h-6"></div>
|
||||
<template v-else>
|
||||
<i v-if="columnVisbile(element)" @click="toggleColumn(element, true)"
|
||||
class="sn-icon sn-icon-visibility-show cursor-pointer"></i>
|
||||
class="sn-icon sn-icon-visibility-show cursor-pointer" :data-e2e="'e2e-BT-manageColumnsModal-'+element.field+'-hide'"></i>
|
||||
<i v-else @click="toggleColumn(element, false)"
|
||||
class="sn-icon sn-icon-visibility-hide cursor-pointer"></i>
|
||||
class="sn-icon sn-icon-visibility-hide cursor-pointer" :data-e2e="'e2e-BT-manageColumnsModal-'+element.field+'-show'"></i>
|
||||
</template>
|
||||
<div class="truncate">{{ element.headerName }}</div>
|
||||
<div class="ml-auto cursor-pointer">
|
||||
<div class="truncate" :data-e2e="'e2e-TX-manageColumnsModal-'+element.field+'-columnName'">{{ element.headerName }}</div>
|
||||
<div class="ml-auto cursor-pointer" :data-e2e="'e2e-BT-manageColumnsModal-'+element.field+'-pin'">
|
||||
<i v-if="columnPinned(element)" @click="unPinColumn(element)" class="sn-icon sn-icon-pinned"></i>
|
||||
<i v-else @click="pinColumn(element)" class="sn-icon sn-icon-pin"></i>
|
||||
</div>
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary mr-auto" @click="resetToDefault">
|
||||
<button type="button" class="btn btn-secondary mr-auto" @click="resetToDefault" data-e2e="e2e-BT-manageColumnsModal-resetToDefault">
|
||||
{{ i18n.t('experiments.table.column_display_modal.reset_to_default') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -41,9 +41,8 @@ export default {
|
|||
if (item.type === 'link') {
|
||||
newItem.url = item.path;
|
||||
}
|
||||
|
||||
newItem.data_e2e = `e2e-BT-cardActions-${item.name}`;
|
||||
newItem.params = item;
|
||||
|
||||
return newItem;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -2,17 +2,17 @@ export default {
|
|||
template: `
|
||||
<div class="w-full grid items-center group gap-2 grid-cols-[auto_1.5rem]"
|
||||
:class="{'cursor-pointer': params.enableSorting}"
|
||||
:data-e2e="'e2e-CO-TableHeader-' + params.column.colId "
|
||||
:data-e2e="'e2e-CO-tableHeader-' + params.column.colId "
|
||||
@click="onSortRequested((activeSort == 'asc' ? 'desc' : 'asc'), $event)">
|
||||
<div v-if="params.html" class="customHeaderLabel truncate" v-html="params.html"></div>
|
||||
<div v-else class="customHeaderLabel truncate">{{ params.displayName }}</div>
|
||||
<div v-if="activeSort == 'asc'" class="customSortDownLabel text-sn-black">
|
||||
<div v-if="activeSort == 'asc'" class="customSortDownLabel text-sn-black" data-e2e="e2e-BT-tableHeader-sortedAsc">
|
||||
<i class="sn-icon sn-icon-sort-up"></i>
|
||||
</div>
|
||||
<div v-if="activeSort == 'desc'" class="customSortUpLabel text-sn-black">
|
||||
<div v-if="activeSort == 'desc'" class="customSortUpLabel text-sn-black" data-e2e="e2e-BT-tableHeader-sortedDesc">
|
||||
<i class="sn-icon sn-icon-sort-down"></i>
|
||||
</div>
|
||||
<div v-if="activeSort == null && params.enableSorting" class="text-sn-black tw-hidden group-hover:block">
|
||||
<div v-if="activeSort == null && params.enableSorting" class="text-sn-black tw-hidden group-hover:block" data-e2e="e2e-BT-tableHeader-sortUpDown">
|
||||
<i class="sn-icon sn-icon-sort"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
:btnText="i18n.t(`toolbar.${currentViewRender}_view`)"
|
||||
:caret="true"
|
||||
:position="'right'"
|
||||
:data-e2e="'e2e-DD-topToolbar-viewDropdown'"
|
||||
@setCardsView="$emit('setCardsView')"
|
||||
@setTableView="$emit('setTableView')"
|
||||
></MenuDropdown>
|
||||
|
@ -41,6 +42,7 @@
|
|||
:btnText="i18n.t(`toolbar.${currentViewMode}_state`)"
|
||||
:caret="true"
|
||||
:position="'right'"
|
||||
:data-e2e="'e2e-DD-topToolbar-stateDropdown'"
|
||||
></MenuDropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -53,7 +55,8 @@
|
|||
{{ action.label }}
|
||||
</a>
|
||||
<div class="sci-input-container-v2"
|
||||
:class="{'w-48': showSearch, 'w-11': !showSearch}">
|
||||
:class="{'w-48': showSearch, 'w-11': !showSearch}"
|
||||
:data-e2e="'e2e-BT-topToolbar-search'">
|
||||
<input
|
||||
ref="searchInput"
|
||||
class="sci-input-field !pr-9"
|
||||
|
@ -62,16 +65,18 @@
|
|||
@blur="hideSearch"
|
||||
:value="searchValue"
|
||||
:placeholder="'Search...'"
|
||||
:data-e2e="'e2e-IF-topToolbar-search'"
|
||||
@change="$emit('search:change', $event.target.value)"
|
||||
/>
|
||||
<i v-if="searchValue.length === 0" class="sn-icon sn-icon-search !m-2.5 !ml-auto right-0"></i>
|
||||
<i v-else class="sn-icon sn-icon-close !m-2.5 !ml-auto right-0 cursor-pointer z-10"
|
||||
@click="$emit('search:change', '')"></i>
|
||||
</div>
|
||||
<FilterDropdown v-if="filters.length" :filters="filters" @applyFilters="applyFilters" />
|
||||
<FilterDropdown v-if="filters.length" :filters="filters" @applyFilters="applyFilters" :data-e2e="'e2e-BT-topToolbar-filters'"/>
|
||||
<button
|
||||
v-if="currentViewRender === 'table'"
|
||||
@click="showColumnsModal = true"
|
||||
:data-e2e="'e2e-BT-topToolbar-manageColumns'"
|
||||
:title="i18n.t('experiments.table.column_display_modal.title')"
|
||||
class="btn btn-light icon-btn btn-black"
|
||||
>
|
||||
|
@ -187,12 +192,14 @@ export default {
|
|||
{
|
||||
text: this.i18n.t('toolbar.active_state'),
|
||||
url: this.activePageUrl,
|
||||
active: this.currentViewMode === 'active'
|
||||
active: this.currentViewMode === 'active',
|
||||
data_e2e: 'e2e-BT-topToolbar-viewState-active'
|
||||
},
|
||||
{
|
||||
text: this.i18n.t('toolbar.archived_state'),
|
||||
url: this.archivedPageUrl,
|
||||
active: this.currentViewMode === 'archived'
|
||||
active: this.currentViewMode === 'archived',
|
||||
data_e2e: 'e2e-BT-topToolbar-viewState-archived'
|
||||
}
|
||||
];
|
||||
},
|
||||
|
@ -202,9 +209,19 @@ export default {
|
|||
const active = this.currentViewRender === type;
|
||||
switch (type) {
|
||||
case 'cards':
|
||||
return { text: this.i18n.t('toolbar.cards_view'), emit: 'setCardsView', active };
|
||||
return {
|
||||
text: this.i18n.t('toolbar.cards_view'),
|
||||
emit: 'setCardsView',
|
||||
active,
|
||||
data_e2e: 'e2e-BT-topToolbar-view-cards'
|
||||
};
|
||||
case 'table':
|
||||
return { text: this.i18n.t('toolbar.table_view'), emit: 'setTableView', active };
|
||||
return {
|
||||
text: this.i18n.t('toolbar.table_view'),
|
||||
emit: 'setTableView',
|
||||
active,
|
||||
data_e2e: 'e2e-BT-topToolbar-view-table'
|
||||
};
|
||||
case 'custom':
|
||||
return { text: view.name, url: view.url, active };
|
||||
default:
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
title: t('experiments.canvas.new_my_module_tooltip'),
|
||||
data: { view_mode: 'active' },
|
||||
remote: true do %>
|
||||
<span class="sn-icon sn-icon-new-task"></span>
|
||||
<span class="sn-icon sn-icon-new-task" data-e2e="e2e-BT-canvasToolbar-createTask"></span>
|
||||
<span class="hidden-sm hidden-xs"><%= t('experiments.canvas.new_my_module') %></span>
|
||||
<% end %>
|
||||
<%=link_to canvas_edit_experiment_url(@experiment),
|
||||
|
@ -27,7 +27,7 @@
|
|||
title: t('experiments.canvas.canvas_edit'),
|
||||
data: { action: 'edit' },
|
||||
class: 'ajax btn btn-light' do %>
|
||||
<span class="sn-icon sn-icon-edit"></span>
|
||||
<span class="sn-icon sn-icon-edit" data-e2e="e2e-BT-canvasToolbar-editWorkflow"></span>
|
||||
<span class="hidden-sm hidden-xs"><%= t('experiments.canvas.canvas_edit') %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="true"
|
||||
data-e2e="e2e-DD-tasks-taskStatus"
|
||||
style="<%= "background-color: #{status.color}" %>;">
|
||||
<span>
|
||||
<% if my_module.status_changing %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<span class="button-text"><%= t("repositories.add_new_record") %></span>
|
||||
</button>
|
||||
<button type="button" data-toggle="tooltip" data-placement="bottom" title="<%= t('repositories.show.button_tooltip.import') %>"
|
||||
class="btn btn-light editImport auto-shrink-button"
|
||||
class="btn btn-light editImport auto-shrink-button" data-e2e="e2e-BT-topToolbar-importInventoryItems"
|
||||
id="importRecordsButton" data-view-mode="active">
|
||||
<span class="sn-icon sn-icon-import"></span>
|
||||
<span class="button-text"><%= t('repositories.index.options_dropdown.import_items') %></span>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<h1 data-view-mode="archived"><span><%= t('labels.archived')%></span> <%= t('libraries.index.head_title_archived') %></h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-body" data-e2e="e2e-inventories-container">
|
||||
<div class="content-body" data-e2e="e2e-CO-inventories">
|
||||
<div id="repositoriesTable" class="fixed-content-body">
|
||||
<repositories-table
|
||||
actions-url="<%= actions_toolbar_team_repositories_path(current_team) %>"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="manangeRepositoryColumnLabel" data-task-page="<%= my_module_page ? 'true' : '' %>">
|
||||
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invInventoryRT-manageColumns">
|
||||
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invItems-manageColumns">
|
||||
<div class="modal-content">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if user_signed_in? %>
|
||||
<div id="sciNavigationTopMenuContainer" data-turbolinks-permanent data-behaviour="vue">
|
||||
<div id="sciNavigationTopMenuContainer" data-turbolinks-permanent data-behaviour="vue" data-e2e="e2e-CO-topMenu">
|
||||
<top-menu-container
|
||||
url="<%= top_menu_navigations_path %>"
|
||||
notifications-url="<%= user_notifications_path %>"
|
||||
|
|
Loading…
Add table
Reference in a new issue