mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
Merge pull request #6513 from mvrazic/mv_SCI_9581
Modified and added e2e tags mostly for inventories section.
This commit is contained in:
commit
475a1fbd46
16 changed files with 28 additions and 26 deletions
|
@ -17,7 +17,7 @@ var DasboardRecentWorkWidget = (function() {
|
||||||
recentWorkItemType.attr('title', `${item.type} ID: ${item.code}`);
|
recentWorkItemType.attr('title', `${item.type} ID: ${item.code}`);
|
||||||
recentWorkItemType.tooltip();
|
recentWorkItemType.tooltip();
|
||||||
}
|
}
|
||||||
recentWorkItemType.attr('data-e2e', `e2e-dashRecentWork-${item.name}`);
|
recentWorkItemType.attr('data-e2e', `e2e-TL-dashRecentWork-${item.name}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
orderable: false,
|
orderable: false,
|
||||||
render: function() {
|
render: function() {
|
||||||
return `<div class="sci-checkbox-container">
|
return `<div class="sci-checkbox-container">
|
||||||
<input class='repository-row-selector sci-checkbox' type='checkbox' data-e2e='e2e-inventories-inventoryCheckbox'>
|
<input class='repository-row-selector sci-checkbox' type='checkbox' data-e2e="e2e-CB-inventory">
|
||||||
<span class='sci-checkbox-label'></span>
|
<span class='sci-checkbox-label'></span>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
targets: 1,
|
targets: 1,
|
||||||
className: 'item-name',
|
className: 'item-name',
|
||||||
render: function(value, type, row) {
|
render: function(value, type, row) {
|
||||||
return `<a href="${row.repositoryUrl}">${value}</a>`;
|
return `<a href="${row.repositoryUrl}" data-e2e="e2e-TL-inventories-${value}">${value}</a>`;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
targets: 5,
|
targets: 5,
|
||||||
|
|
|
@ -671,7 +671,7 @@ var RepositoryDatatable = (function(global) {
|
||||||
visible: true,
|
visible: true,
|
||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
return "<a href='" + row.recordInfoUrl + "'"
|
return "<a href='" + row.recordInfoUrl + "'"
|
||||||
+ "class='record-info-link'>" + data + '</a>';
|
+ "class='record-info-link' data-e2e='e2e-TL-invInventory-" + data + "'>" + data + '</a>';
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
// Added on column
|
// Added on column
|
||||||
|
|
|
@ -29,7 +29,8 @@ module RepositoriesDatatableHelper
|
||||||
'data-copy-modal-url': team_repository_copy_modal_path(team, repository_id: repository),
|
'data-copy-modal-url': team_repository_copy_modal_path(team, repository_id: repository),
|
||||||
'data-rename-modal-url': team_repository_rename_modal_path(team, repository_id: repository),
|
'data-rename-modal-url': team_repository_rename_modal_path(team, repository_id: repository),
|
||||||
'data-shared': repository.shared_with?(team),
|
'data-shared': repository.shared_with?(team),
|
||||||
'data-i-shared': repository.i_shared?(team)
|
'data-i-shared': repository.i_shared?(team),
|
||||||
|
'data-e2e': "e2e-RT-inventories-tableItemRow-#{repository.id}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ module RepositoryDatatableHelper
|
||||||
row = public_send("#{repository.class.name.underscore}_default_columns", record)
|
row = public_send("#{repository.class.name.underscore}_default_columns", record)
|
||||||
row.merge!(
|
row.merge!(
|
||||||
DT_RowId: record.id,
|
DT_RowId: record.id,
|
||||||
DT_RowAttr: { 'data-state': row_style(record) },
|
DT_RowAttr: { 'data-state': row_style(record), 'data-e2e': "e2e-RT-invInventory-row-#{record.id}" },
|
||||||
recordInfoUrl: Rails.application.routes.url_helpers.repository_repository_row_path(repository, record),
|
recordInfoUrl: Rails.application.routes.url_helpers.repository_repository_row_path(repository, record),
|
||||||
rowRemindersUrl:
|
rowRemindersUrl:
|
||||||
Rails.application.routes.url_helpers
|
Rails.application.routes.url_helpers
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="quick-start-buttons">
|
<div class="quick-start-buttons" data-e2e="e2e-CO-dashboard-quickStartButtons" >
|
||||||
<div class="new-task btn btn-secondary"><i class="sn-icon sn-icon-new-task"></i><%= t("dashboard.quick_start.new_task") %></div>
|
<div class="new-task btn btn-secondary"><i class="sn-icon sn-icon-new-task"></i><%= t("dashboard.quick_start.new_task") %></div>
|
||||||
<% if can_create_protocols_in_repository?(current_team) %>
|
<% if can_create_protocols_in_repository?(current_team) %>
|
||||||
<button data-toggle="modal" data-target="#newProtocolModal" class="btn btn-secondary">
|
<button data-toggle="modal" data-target="#newProtocolModal" class="btn btn-secondary">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="widget-body">
|
<div class="widget-body">
|
||||||
<div class="recent-work-container perfect-scrollbar" data-url="<%= dashboard_recent_works_path %>"></div>
|
<div class="recent-work-container perfect-scrollbar" data-url="<%= dashboard_recent_works_path %>" data-e2e="e2e-CO-dashboard-recentWork"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<% provide :head_title, t('nav.label.dashboard') %>
|
<% provide :head_title, t('nav.label.dashboard') %>
|
||||||
|
|
||||||
<% if current_team %>
|
<% if current_team %>
|
||||||
<div class="dashboard-view" data-e2e="e2e-dashboard-container">
|
<div class="dashboard-view" data-e2e="e2e-CO-dashboard">
|
||||||
<div class="dashboard-background"></div>
|
<div class="dashboard-background"></div>
|
||||||
<div class="dashboard-header">
|
<div class="dashboard-header">
|
||||||
<%= render partial: 'quick_start' %>
|
<%= render partial: 'quick_start' %>
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<div class="sci--layout-navigation-left">
|
<div class="sci--layout-navigation-left">
|
||||||
<%= render "shared/navigation/left" if user_signed_in? %>
|
<%= render "shared/navigation/left" if user_signed_in? %>
|
||||||
</div>
|
</div>
|
||||||
<div class="sci--layout-navigation-navigator overflow-hidden relative" data-e2e="e2e-projects-navigator-container">
|
<div class="sci--layout-navigation-navigator overflow-hidden relative" data-e2e="e2e-CO-projects-navigator">
|
||||||
<%= render "shared/navigation/navigator" %>
|
<%= render "shared/navigation/navigator" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="sci--layout-navigation-breadcrumbs">
|
<div class="sci--layout-navigation-breadcrumbs">
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<div id="projectsToolbar" class="projects-toolbar">
|
<div id="projectsToolbar" class="projects-toolbar">
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<div class="project-actions">
|
<div class="project-actions" data-e2e="e2e-CO-projects-actionsToolbar">
|
||||||
<span class="left">
|
<span class="left">
|
||||||
<!-- new project button -->
|
<!-- new project button -->
|
||||||
<% if current_team && can_create_projects?(current_team) %>
|
<% if current_team && can_create_projects?(current_team) %>
|
||||||
<%= link_to new_project_path(project_folder_id: current_folder),
|
<%= link_to new_project_path(project_folder_id: current_folder),
|
||||||
class: 'btn btn-primary new-project-btn',
|
class: 'btn btn-primary new-project-btn',
|
||||||
title: t('projects.index.new_tooltip'),
|
title: t('projects.index.new_tooltip'),
|
||||||
data: { view_mode: 'active', e2e: 'e2e-new-project-button' },
|
data: { view_mode: 'active', e2e: 'e2e-BT-project-newProject' },
|
||||||
remote: true do %>
|
remote: true do %>
|
||||||
<span class="sn-icon sn-icon-new-task" aria-hidden="true"></span>
|
<span class="sn-icon sn-icon-new-task" aria-hidden="true"></span>
|
||||||
<span class="hidden-xs"><%= t('projects.index.new') %></span>
|
<span class="hidden-xs"><%= t('projects.index.new') %></span>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<div class="modal" id="create-repo-modal" tabindex="-1" role="dialog" aria-labelledby="create-repo-modal-label">
|
<div class="modal" id="create-repo-modal" tabindex="-1" role="dialog" aria-labelledby="create-repo-modal-label">
|
||||||
<%= form_with model: @repository, url: repositories_path, html: { data: { remote: true } } do |f| %>
|
<%= form_with model: @repository, url: repositories_path, html: { data: { remote: true } } do |f| %>
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invNewInventory">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-e2e="e2e-BT-invNewInventory-close"><i class="sn-icon sn-icon-close"></i></button>
|
||||||
<h3 class="modal-title" id="create-repo-modal-label">
|
<h3 class="modal-title" id="create-repo-modal-label">
|
||||||
<%= t("repositories.index.modal_create.title") %>
|
<%= t("repositories.index.modal_create.title") %>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group sci-input-container">
|
<div class="form-group sci-input-container" data-e2e="e2e-IF-invNewInventory-input">
|
||||||
<label><%= t("repositories.index.modal_create.name_label") %> </label>
|
<label><%= t("repositories.index.modal_create.name_label") %> </label>
|
||||||
<%= f.text_field :name,
|
<%= f.text_field :name,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
<button type="button" data-e2e="e2e-BT-invNewInventory-cancel" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||||
<%= f.submit t("repositories.index.modal_create.submit"), class: "btn btn-success" %>
|
<%= f.submit t("repositories.index.modal_create.submit"), class: "btn btn-success", 'data-e2e':"e2e-BT-invNewInventory-create" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="modal fade" id="modal-info-repository-row" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
<div class="modal fade" id="modal-info-repository-row" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content" data-e2e="e2e-MD-invInventoryItem">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close" data-e2e="e2e-BT-invInventoryItem-cancel"></i></button>
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<%= t('repository_row.modal_info.head_title', repository_row: @repository_row.name) %>
|
<%= t('repository_row.modal_info.head_title', repository_row: @repository_row.name) %>
|
||||||
<%= @repository_row.archived? ? I18n.t('atwho.res.archived') : '' %>
|
<%= @repository_row.archived? ? I18n.t('atwho.res.archived') : '' %>
|
||||||
|
@ -138,8 +138,8 @@
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.close')%></button>
|
<button data-e2e="e2e-BT-invInventoryItem-close" type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.close')%></button>
|
||||||
<button type="button" class="btn btn-primary print-label-button" data-rows="[<%= @repository_row.id %>]"><%= t('repository_row.modal_print_label.print_label') %></button>
|
<button data-e2e="e2e-BT-invInventoryItem-print" type="button" class="btn btn-primary print-label-button" data-rows="[<%= @repository_row.id %>]"><%= t('repository_row.modal_print_label.print_label') %></button>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
data-snapshot-provisioning="<%= @snapshot_provisioning %>"
|
data-snapshot-provisioning="<%= @snapshot_provisioning %>"
|
||||||
data-status-url="<%= repository_status_path(@repository) %>">
|
data-status-url="<%= repository_status_path(@repository) %>">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="repository-table-head-<%= repository.id %> hidden" >
|
<tr class="repository-table-head-<%= repository.id %> hidden" data-e2e="e2e-RT-invInventory-tableHeadRow-<%= repository.id %>">
|
||||||
<th id="checkbox" data-unmanageable="true">
|
<th id="checkbox" data-unmanageable="true">
|
||||||
<div class="sci-checkbox-container">
|
<div class="sci-checkbox-container">
|
||||||
<input name="select_all" value="1" type="checkbox" class="sci-checkbox">
|
<input name="select_all" value="1" type="checkbox" class="sci-checkbox">
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<div
|
<div
|
||||||
|
data-e2e="e2e-CO-invInventory-<%= config[:item_id] %>"
|
||||||
class="inline-editing-container inline-init-handler"
|
class="inline-editing-container inline-init-handler"
|
||||||
data-field-to-update="<%= config[:field_to_udpate] %>"
|
data-field-to-update="<%= config[:field_to_udpate] %>"
|
||||||
data-params-group="<%= config[:params_group] %>"
|
data-params-group="<%= config[:params_group] %>"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% left_menu_elements.each_with_index do |item, index| %>
|
<% left_menu_elements.each_with_index do |item, index| %>
|
||||||
<%= link_to item[:url], title: item[:name], class:"sci--layout--menu-item", data: { e2e: "e2e-left-menu-item-#{item[:name].downcase}", active: item[:submenu].blank? && item[:active], disabled: current_user.teams.blank?, submenu: item[:submenu].any? } do %>
|
<%= link_to item[:url], title: item[:name], class:"sci--layout--menu-item", data: { e2e: "e2e-BT-leftMenu-#{item[:name].downcase}", active: item[:submenu].blank? && item[:active], disabled: current_user.teams.blank?, submenu: item[:submenu].any? } do %>
|
||||||
<i class="sn-icon <%= item[:icon] %>"></i>
|
<i class="sn-icon <%= item[:icon] %>"></i>
|
||||||
<%= item[:name] %>
|
<%= item[:name] %>
|
||||||
<i class="sn-icon <%= item[:active] ? 'sn-icon-down' : 'sn-icon-right' %> show-submenu"></i>
|
<i class="sn-icon <%= item[:active] ? 'sn-icon-down' : 'sn-icon-right' %> show-submenu"></i>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<% if item[:submenu].any? %>
|
<% if item[:submenu].any? %>
|
||||||
<div class="sci--layout--menu-submenu" data-id="<%= index %>" data-collapsed="<%= !item[:active] %>" style="--submenu-items:<%= item[:submenu].length %>">
|
<div class="sci--layout--menu-submenu" data-id="<%= index %>" data-collapsed="<%= !item[:active] %>" style="--submenu-items:<%= item[:submenu].length %>">
|
||||||
<% item[:submenu].each do |subitem| %>
|
<% item[:submenu].each do |subitem| %>
|
||||||
<%= link_to subitem[:url], title: subitem[:name], class:"sci--layout--menu-item", data: { e2e: "e2e-left-menu-item-#{subitem[:name].downcase}", active: subitem[:active], disabled: current_user.teams.blank? } do %>
|
<%= link_to subitem[:url], title: subitem[:name], class:"sci--layout--menu-item", data: { e2e: "e2e-BT-leftMenu-#{item[:name].downcase}-#{subitem[:name].downcase}", active: subitem[:active], disabled: current_user.teams.blank? } do %>
|
||||||
<i class="sn-icon sn-icon-dot-small"></i>
|
<i class="sn-icon sn-icon-dot-small"></i>
|
||||||
<%= subitem[:name] %>
|
<%= subitem[:name] %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% provide(:head_title, t("devise.sessions.new.head_title")) %>
|
<% provide(:head_title, t("devise.sessions.new.head_title")) %>
|
||||||
<% content_for(:body_class, 'sign-in-layout') %>
|
<% content_for(:body_class, 'sign-in-layout') %>
|
||||||
<div class="sign-in-container" data-e2e="e2e-signin-container">
|
<div class="sign-in-container" data-e2e="e2e-CO-signin">
|
||||||
<div class="sign-in-form-wrapper">
|
<div class="sign-in-form-wrapper">
|
||||||
<div class="center-block center-block-narrow">
|
<div class="center-block center-block-narrow">
|
||||||
<h1 class="log-in-title"><%=t "devise.sessions.new.title" %></h1>
|
<h1 class="log-in-title"><%=t "devise.sessions.new.title" %></h1>
|
||||||
|
|
Loading…
Reference in a new issue