1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-10 00:05:24 +02:00

Xt 485/give front end elements data cy attributes (#5483)

* kubernetes attributes done, swarm attributes halfway, aci to go

* all attributes for cypress selectors added

* kubernetes attributes done, swarm attributes halfway, aci to go

* all attributes for cypress selectors added

* all attributes for cypress selectors added

* fixed files from rebase, added docker sidebar element attributes

* kubernetes attributes done, swarm attributes halfway, aci to go

* all attributes for cypress selectors added

* all attributes for cypress selectors added

* removed files to match develop

* ammended comments

* removed bindings for switch
This commit is contained in:
testA113 2021-08-26 12:05:28 +12:00 committed by GitHub
parent d6e291db15
commit 7c02e4b725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 471 additions and 151 deletions

View file

@ -17,6 +17,7 @@
helper-elements="filter"
search-property="Name"
translation="{nothingSelected: 'Select one or more users and/or teams', search: 'Search...'}"
data-cy="component-selectUser"
>
</span>
</div>

View file

@ -27,6 +27,7 @@
ng-disabled="(ctrl.availableUsersAndTeams | filter:{ticked:true}).length === 0 || ctrl.actionInProgress"
ng-click="ctrl.authorizeAccess()"
button-spinner="ctrl.actionInProgress"
data-cy="access-createAccess"
>
<span ng-hide="ctrl.state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create access</span>
<span ng-show="ctrl.state.actionInProgress">Creating access...</span>

View file

@ -21,6 +21,7 @@
groups="$ctrl.groups"
show-groups="true"
has-backend-pagination="true"
data-cy="edgeGroupCreate-availableEndpoints"
></group-association-table>
</div>
</div>
@ -43,6 +44,7 @@
groups="$ctrl.groups"
show-groups="true"
has-backend-pagination="true"
data-cy="edgeGroupCreate-associatedEndpoints"
></group-association-table>
</div>
</div>

View file

@ -5,10 +5,18 @@
<div class="toolBarTitle"> <i class="fa" ng-class="$ctrl.titleIcon" aria-hidden="true" style="margin-right: 2px;"></i> {{ $ctrl.titleText }} </div>
</div>
<div class="actionBar">
<button type="button" class="btn btn-sm btn-danger" ng-disabled="$ctrl.state.selectedItemCount === 0" ng-click="$ctrl.removeAction($ctrl.state.selectedItems)">
<button
type="button"
class="btn btn-sm btn-danger"
ng-disabled="$ctrl.state.selectedItemCount === 0"
ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"
data-cy="endpoint-removeEndpointButton"
>
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
</button>
<button type="button" class="btn btn-sm btn-primary" ui-sref="portainer.endpoints.new"> <i class="fa fa-plus space-right" aria-hidden="true"></i>Add endpoint </button>
<button type="button" class="btn btn-sm btn-primary" ui-sref="portainer.endpoints.new" data-cy="endpoint-addEndpointButton">
<i class="fa fa-plus space-right" aria-hidden="true"></i>Add endpoint
</button>
</div>
<div class="searchBar">
<i class="fa fa-search searchIcon" aria-hidden="true"></i>
@ -20,10 +28,11 @@
ng-model="$ctrl.state.textFilter"
ng-change="$ctrl.onTextFilterChange()"
ng-model-options="{ debounce: 300 }"
data-cy="endpoint-searchInput"
/>
</div>
<div class="table-responsive">
<table class="table table-hover nowrap-cells">
<table class="table table-hover nowrap-cells" data-cy="endpoint-endpointTable">
<thead>
<tr>
<th>

View file

@ -5,10 +5,18 @@
<div class="toolBarTitle"> <i class="fa" ng-class="$ctrl.titleIcon" aria-hidden="true" style="margin-right: 2px;"></i> {{ $ctrl.titleText }} </div>
</div>
<div class="actionBar">
<button type="button" class="btn btn-sm btn-danger" ng-disabled="$ctrl.state.selectedItemCount === 0" ng-click="$ctrl.removeAction($ctrl.state.selectedItems)">
<button
type="button"
class="btn btn-sm btn-danger"
ng-disabled="$ctrl.state.selectedItemCount === 0"
ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"
data-cy="endpointGroup-removeGroupButton"
>
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
</button>
<button type="button" class="btn btn-sm btn-primary" ui-sref="portainer.groups.new"> <i class="fa fa-plus space-right" aria-hidden="true"></i>Add group </button>
<button type="button" class="btn btn-sm btn-primary" ui-sref="portainer.groups.new" data-cy="endpointGroup-addGroupButton">
<i class="fa fa-plus space-right" aria-hidden="true"></i>Add group
</button>
</div>
<div class="searchBar">
<i class="fa fa-search searchIcon" aria-hidden="true"></i>
@ -20,15 +28,16 @@
placeholder="Search..."
auto-focus
ng-model-options="{ debounce: 300 }"
data-cy="endpointGroup-searchInput"
/>
</div>
<div class="table-responsive">
<table class="table table-hover nowrap-cells">
<table class="table table-hover nowrap-cells" data-cy="endpointGroup-endpointGroupTable">
<thead>
<tr>
<th>
<span class="md-checkbox">
<input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" />
<input id="select_all" type="checkbox" ng-model="$ctrl.state.selectAll" ng-change="$ctrl.selectAll()" data-cy="endpointGroup-selectAllCheckbox" />
<label for="select_all"></label>
</span>
<a ng-click="$ctrl.changeOrderBy('Name')">

View file

@ -54,10 +54,18 @@
authorization="PortainerStackDelete"
ng-disabled="$ctrl.state.selectedItemCount === 0"
ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"
data-cy="stack-removeStackButton"
>
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
</button>
<button ng-disabled="!$ctrl.createEnabled" type="button" class="btn btn-sm btn-primary" ui-sref="docker.stacks.newstack" authorization="PortainerStackCreate">
<button
ng-disabled="!$ctrl.createEnabled"
type="button"
class="btn btn-sm btn-primary"
ui-sref="docker.stacks.newstack"
authorization="PortainerStackCreate"
data-cy="stack-addStackButton"
>
<i class="fa fa-plus space-right" aria-hidden="true"></i>Add stack
</button>
</div>
@ -71,10 +79,11 @@
placeholder="Search..."
auto-focus
ng-model-options="{ debounce: 300 }"
data-cy="stack-searchInput"
/>
</div>
<div class="table-responsive">
<table class="table table-hover nowrap-cells">
<table class="table table-hover nowrap-cells" data-cy="stack-stackTable">
<thead>
<tr>
<th uib-dropdown dropdown-append-to-body auto-close="disabled" is-open="$ctrl.filters.state.open">
@ -202,10 +211,10 @@
</span>
</td>
</tr>
<tr ng-if="!$ctrl.dataset">
<tr ng-if="!$ctrl.dataset" data-cy="stacks-loadingTableRow">
<td colspan="6" class="text-center text-muted">Loading...</td>
</tr>
<tr ng-if="$ctrl.state.filteredDataSet.length === 0">
<tr ng-if="$ctrl.state.filteredDataSet.length === 0" data-cy="stacks-noStackTableRow">
<td colspan="6" class="text-center text-muted">No stack available.</td>
</tr>
</tbody>

View file

@ -5,7 +5,13 @@
<div class="toolBarTitle"> <i class="fa" ng-class="$ctrl.titleIcon" aria-hidden="true" style="margin-right: 2px;"></i> {{ $ctrl.titleText }} </div>
</div>
<div class="actionBar">
<button type="button" class="btn btn-sm btn-danger" ng-disabled="$ctrl.state.selectedItemCount === 0" ng-click="$ctrl.removeAction($ctrl.state.selectedItems)">
<button
type="button"
class="btn btn-sm btn-danger"
ng-disabled="$ctrl.state.selectedItemCount === 0"
ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"
data-cy="user-removeUserButton"
>
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove
</button>
</div>
@ -21,7 +27,7 @@
/>
</div>
<div class="table-responsive">
<table class="table table-hover nowrap-cells">
<table class="table table-hover nowrap-cells" data-cy="user-userTable">
<thead>
<tr>
<th>

View file

@ -6,7 +6,9 @@
</div>
<div class="actionBar" ng-if="$ctrl.showSnapshotAction">
<button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.snapshotAction()"> <i class="fa fa-sync space-right" aria-hidden="true"></i>Refresh </button>
<button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.snapshotAction()" data-cy="home-refreshEndpointsButton">
<i class="fa fa-sync space-right" aria-hidden="true"></i>Refresh
</button>
</div>
<div class="searchBar">
@ -19,10 +21,11 @@
ng-model-options="{ debounce: 300 }"
placeholder="Search by name, group, tag, status, URL..."
auto-focus
data-cy="home-endpointsSearchInput"
/>
</div>
<div class="blocklist">
<div class="blocklist" data-cy="home-endpointList">
<endpoint-item
ng-if="$ctrl.hasBackendPagination()"
dir-paginate="endpoint in $ctrl.state.filteredEndpoints | itemsPerPage: $ctrl.state.paginatedItemLimit"
@ -42,10 +45,10 @@
is-admin="$ctrl.isAdmin"
tags="$ctrl.tags"
></endpoint-item>
<div ng-if="$ctrl.state.loading" class="text-center text-muted">
<div ng-if="$ctrl.state.loading" class="text-center text-muted" data-cy="home-loadingEndpoints">
Loading...
</div>
<div ng-if="!$ctrl.state.loading && !$ctrl.state.filteredEndpoints.length" class="text-center text-muted">
<div ng-if="!$ctrl.state.loading && !$ctrl.state.filteredEndpoints.length" class="text-center text-muted" data-cy="home-noEndpoints">
No endpoint available.
</div>
</div>
@ -57,7 +60,7 @@
<span style="margin-right: 5px;">
Items per page
</span>
<select class="form-control" ng-model="$ctrl.state.paginatedItemLimit" ng-change="$ctrl.changePaginationLimit()">
<select class="form-control" ng-model="$ctrl.state.paginatedItemLimit" ng-change="$ctrl.changePaginationLimit()" data-cy="home-paginationSelect">
<option value="0" ng-if="!$ctrl.hasBackendPagination()">All</option>
<option value="10">10</option>
<option value="25">25</option>

View file

@ -1,6 +1,6 @@
<div class="form-group">
<div class="col-sm-12">
<por-switch-field ng-model="$ctrl.model.RepositoryAuthentication" label="Authentication" on-change="($ctrl.onChangeAuth)"></por-switch-field>
<por-switch-field ng-model="$ctrl.model.RepositoryAuthentication" label="Authentication" on-change="($ctrl.onChangeAuth)" data-cy="component-gitAuthToggle"></por-switch-field>
</div>
</div>
<div class="small text-warning" style="margin: 5px 0 15px 0;" ng-if="$ctrl.model.RepositoryAuthentication && $ctrl.showAuthExplanation">
@ -18,6 +18,7 @@
name="repository_username"
placeholder="git username"
ng-change="$ctrl.onChangeUsername($ctrl.model.RepositoryUsername)"
data-cy="component-gitUsernameInput"
/>
</div>
</div>
@ -35,6 +36,7 @@
placeholder="personal access token"
ng-change="$ctrl.onChangePassword($ctrl.model.RepositoryPassword)"
ng-required="!$ctrl.isEdit"
data-cy="component-gitPasswordInput"
/>
</div>
</div>

View file

@ -7,6 +7,14 @@
<div class="form-group">
<label for="stack_repository_reference_name" class="col-sm-1 control-label text-left">Repository reference</label>
<div class="col-sm-11">
<input type="text" class="form-control" ng-model="$ctrl.value" id="stack_repository_reference_name" placeholder="refs/heads/master" ng-change="$ctrl.onChange($ctrl.value)" />
<input
type="text"
class="form-control"
ng-model="$ctrl.value"
id="stack_repository_reference_name"
placeholder="refs/heads/master"
ng-change="$ctrl.onChange($ctrl.value)"
data-cy="component-gitRefInput"
/>
</div>
</div>

View file

@ -13,6 +13,7 @@
ng-change="$ctrl.onChange($ctrl.value)"
id="stack_repository_url"
placeholder="https://github.com/portainer/portainer-compose"
data-cy="component-gitUrlInput"
/>
</div>
</div>

View file

@ -1,3 +1,4 @@
<label class="switch" ng-class="$ctrl.className" style="margin-bottom: 0;">
<input type="checkbox" name="{{::$ctrl.name}}" id="{{::$ctrl.id}}" ng-model="$ctrl.ngModel" ng-disabled="$ctrl.disabled" ng-change="$ctrl.onChange($ctrl.ngModel)" /><i></i>
<input type="checkbox" name="{{::$ctrl.name}}" id="{{::$ctrl.id}}" ng-model="$ctrl.ngModel" ng-disabled="$ctrl.disabled" ng-change="$ctrl.onChange($ctrl.ngModel)" />
<i></i>
</label>

View file

@ -8,7 +8,7 @@ angular.module('portainer.app').directive('rdHeaderContent', [
scope.username = Authentication.getUserDetails().username;
},
template:
'<div class="breadcrumb-links"><div class="pull-left" ng-transclude></div><div class="pull-right" ng-if="username"><a ui-sref="portainer.account" style="margin-right: 5px;"><u><i class="fa fa-wrench" aria-hidden="true"></i> my account </u></a><a ui-sref="portainer.logout({performApiLogout: true})" class="text-danger" style="margin-right: 25px;"><u><i class="fa fa-sign-out-alt" aria-hidden="true"></i> log out</u></a></div></div>',
'<div class="breadcrumb-links"><div class="pull-left" ng-transclude></div><div class="pull-right" ng-if="username"><a ui-sref="portainer.account" style="margin-right: 5px;"><u><i class="fa fa-wrench" aria-hidden="true"></i> my account </u></a><a ui-sref="portainer.logout({performApiLogout: true})" class="text-danger" style="margin-right: 25px;" data-cy="template-logoutButton"><u><i class="fa fa-sign-out-alt" aria-hidden="true"></i> log out</u></a></div></div>',
restrict: 'E',
};
return directive;

View file

@ -1,5 +1,5 @@
<li class="sidebar-list sidebar-menu">
<sidebar-menu-item path="{{::$ctrl.path }}" path-params="$ctrl.pathParams" icon-class="{{::$ctrl.iconClass}}">
<sidebar-menu-item path="{{::$ctrl.path }}" path-params="$ctrl.pathParams" icon-class="{{::$ctrl.iconClass}}" data-cy="portainerSidebar-{{ ::$ctrl.label }}">
<div class="sidebar-menu-head">
<button ng-click="$ctrl.onClickArrow($event)" class="small sidebar-menu-indicator">
<i class="fas" ng-class="$ctrl.isOpen() ? 'fa-chevron-down' : 'fa-chevron-right'"></i>

View file

@ -27,6 +27,7 @@
typeahead-no-results="$ctrl.state.noResult"
typeahead-show-hint="true"
typeahead-min-length="0"
data-cy="tags-tagInput"
/>
</div>
<div class="col-sm-9 col-lg-10" ng-if="!$ctrl.allowCreate && $ctrl.tags.length === 0">

View file

@ -52,13 +52,13 @@
<!-- !username input -->
<div class="input-group" ng-if="ctrl.state.showStandardLogin">
<span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span>
<input id="username" type="text" class="form-control" name="username" ng-model="ctrl.formValues.Username" auto-focus />
<input id="username" type="text" class="form-control" name="username" ng-model="ctrl.formValues.Username" auto-focus data-cy="auth-usernameInput" />
</div>
<!-- password input -->
<div class="input-group" ng-if="ctrl.state.showStandardLogin">
<span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span>
<input id="password" type="password" class="form-control" name="password" ng-model="ctrl.formValues.Password" />
<input id="password" type="password" class="form-control" name="password" ng-model="ctrl.formValues.Password" data-cy="auth-passwordInput" />
</div>
<div class="form-group" ng-if="ctrl.state.showStandardLogin">
@ -70,6 +70,7 @@
ng-click="ctrl.authenticateUser()"
button-spinner="ctrl.state.loginInProgress"
ng-disabled="ctrl.state.loginInProgress"
data-cy="auth-loginButton"
>
<span ng-hide="ctrl.state.loginInProgress"><i class="fa fa-sign-in-alt" aria-hidden="true"></i> Login</span>
<span ng-show="ctrl.state.loginInProgress">Login in progress...</span>

View file

@ -16,7 +16,7 @@
<div class="boxselector_wrapper">
<div ng-click="resetEndpointURL()">
<input type="radio" id="agent_endpoint" ng-model="state.EnvironmentType" value="agent" />
<label for="agent_endpoint">
<label for="agent_endpoint" data-cy="endpointCreate-agentSelectButton">
<div class="boxselector_header">
<i class="fa fa-bolt" aria-hidden="true" style="margin-right: 2px;"></i>
Agent
@ -26,7 +26,7 @@
</div>
<div ng-click="setDefaultPortainerInstanceURL()">
<input type="radio" id="edge_agent_endpoint" ng-model="state.EnvironmentType" value="edge_agent" />
<label for="edge_agent_endpoint">
<label for="edge_agent_endpoint" data-cy="endpointCreate-edgeAgentSelectButton">
<div class="boxselector_header">
<i class="fa fa-cloud" aria-hidden="true" style="margin-right: 2px;"></i>
Edge Agent
@ -36,7 +36,7 @@
</div>
<div ng-click="resetEndpointURL()">
<input type="radio" id="docker_endpoint" ng-model="state.EnvironmentType" value="docker" />
<label for="docker_endpoint">
<label for="docker_endpoint" data-cy="endpointCreate-dockerSelectButton">
<div class="boxselector_header">
<i class="fab fa-docker" aria-hidden="true" style="margin-right: 2px;"></i>
Docker
@ -46,7 +46,7 @@
</div>
<div ng-click="resetEndpointURL()">
<input type="radio" id="kubernetes_endpoint" ng-model="state.EnvironmentType" value="kubernetes" />
<label for="kubernetes_endpoint">
<label for="kubernetes_endpoint" data-cy="endpointCreate-kubeSelectButton">
<div class="boxselector_header">
<i class="fas fa-dharmachakra" aria-hidden="true" style="margin-right: 2px;"></i>
Kubernetes
@ -56,7 +56,7 @@
</div>
<div>
<input type="radio" id="azure_endpoint" ng-model="state.EnvironmentType" value="azure" />
<label for="azure_endpoint">
<label for="azure_endpoint" data-cy="endpointCreate-azureSelectButton">
<div class="boxselector_header">
<i class="fab fa-microsoft" aria-hidden="true" style="margin-right: 2px;"></i>
Azure
@ -190,6 +190,7 @@
placeholder="e.g. docker-prod01 / kubernetes-cluster01"
required
auto-focus
data-cy="endpointCreate-nameInput"
/>
</div>
</div>
@ -207,7 +208,9 @@
<label for="connect_socket" class="col-sm_12 control-label text-left">
Connect via socket
</label>
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="formValues.ConnectSocket" /><i></i> </label>
<label class="switch" style="margin-left: 20px;">
<input type="checkbox" ng-model="formValues.ConnectSocket" /><i data-cy="endpointCreate-connectSocketSwitch"></i>
</label>
</div>
</div>
@ -216,7 +219,9 @@
<label for="override_socket" class="col-sm_12 control-label text-left">
Override default socket path
</label>
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="formValues.OverrideSocket" /><i></i> </label>
<label class="switch" style="margin-left: 20px;">
<input type="checkbox" ng-model="formValues.OverrideSocket" /><i data-cy="endpointCreate-overrideSocketSwitch"></i>
</label>
</div>
<div ng-if="formValues.OverrideSocket">
@ -234,6 +239,7 @@
ng-model="formValues.SocketPath"
placeholder="e.g. /var/run/docker.sock (on Linux) or //./pipe/docker_engine (on Windows)"
required
data-cy="endpointCreate-socketPathInput"
/>
</div>
</div>
@ -267,6 +273,7 @@
ng-model="formValues.URL"
placeholder="e.g. 10.0.0.10:2375 or mydocker.mydomain.com:2375"
required
data-cy="endpointCreate-endpointUrlDockerInput"
/>
<input
ng-if="state.EnvironmentType === 'agent'"
@ -276,6 +283,7 @@
ng-model="formValues.URL"
placeholder="e.g. 10.0.0.10:9001 or tasks.portainer_agent:9001"
required
data-cy="endpointCreate-endpointUrlAgentInput"
/>
</div>
</div>
@ -296,7 +304,15 @@
<portainer-tooltip position="bottom" message="URL of the Portainer instance that the agent will use to initiate the communications."></portainer-tooltip>
</label>
<div class="col-sm-9 col-lg-10">
<input type="text" class="form-control" name="endpoint_url" ng-model="formValues.URL" placeholder="e.g. 10.0.0.10:9000 or portainer.mydomain.com" required />
<input
type="text"
class="form-control"
name="endpoint_url"
ng-model="formValues.URL"
placeholder="e.g. 10.0.0.10:9000 or portainer.mydomain.com"
required
data-cy="endpointCreate-portainerServerUrlInput"
/>
</div>
</div>
<div class="form-group" ng-show="endpointCreationForm.endpoint_url.$invalid">
@ -322,6 +338,7 @@
class="form-control"
ng-model="formValues.CheckinInterval"
ng-options="+(opt.value) as opt.key for opt in state.availableEdgeAgentCheckinOptions"
data-cy="endpointCreate-pollFrequencySelect"
></select>
</div>
</div>
@ -338,7 +355,14 @@
</portainer-tooltip>
</label>
<div class="col-sm-9 col-lg-10">
<input type="text" class="form-control" id="endpoint_public_url" ng-model="formValues.PublicURL" placeholder="e.g. 10.0.0.10 or mydocker.mydomain.com" />
<input
type="text"
class="form-control"
id="endpoint_public_url"
ng-model="formValues.PublicURL"
placeholder="e.g. 10.0.0.10 or mydocker.mydomain.com"
data-cy="endpointCreate-publicIpInput"
/>
</div>
</div>
</div>
@ -356,6 +380,7 @@
ng-model="formValues.AzureApplicationId"
placeholder="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
required
data-cy="endpointCreate-azureAppIdInput"
/>
</div>
</div>
@ -378,6 +403,7 @@
ng-model="formValues.AzureTenantId"
placeholder="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
required
data-cy="endpointCreate-azureTenantIdInput"
/>
</div>
</div>
@ -400,6 +426,7 @@
ng-model="formValues.AzureAuthenticationKey"
placeholder="cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk="
required
data-cy="endpointCreate-azureAuthKeyInput"
/>
</div>
</div>
@ -425,7 +452,13 @@
Group
</label>
<div class="col-sm-9 col-lg-10">
<select ng-options="group.Id as group.Name for group in groups" ng-model="formValues.GroupId" id="endpoint_group" class="form-control"></select>
<select
ng-options="group.Id as group.Name for group in groups"
ng-model="formValues.GroupId"
id="endpoint_group"
class="form-control"
data-cy="endpointCreate-endpointGroup"
></select>
</div>
</div>
<!-- !group -->
@ -448,6 +481,7 @@
ng-disabled="state.actionInProgress || !endpointCreationForm.$valid || (formValues.TLS && ((formValues.TLSVerify && !formValues.TLSCACert) || (formValues.TLSClientCert && (!formValues.TLSCert || !formValues.TLSKey))))"
ng-click="addDockerEndpoint()"
button-spinner="state.actionInProgress"
data-cy="endpointCreate-createDockerEndpoint"
>
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Add endpoint</span>
<span ng-show="state.actionInProgress">Creating endpoint...</span>
@ -459,6 +493,7 @@
ng-disabled="state.actionInProgress || !endpointCreationForm.$valid"
ng-click="addAgentEndpoint()"
button-spinner="state.actionInProgress"
data-cy="endpointCreate-createAgentEndpoint"
>
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Add endpoint</span>
<span ng-show="state.actionInProgress">Creating endpoint...</span>
@ -470,6 +505,7 @@
ng-disabled="state.actionInProgress || !endpointCreationForm.$valid"
ng-click="addEdgeAgentEndpoint()"
button-spinner="state.actionInProgress"
data-cy="endpointCreate-createEdgeAgentEndpoint"
>
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Add endpoint</span>
<span ng-show="state.actionInProgress">Creating endpoint...</span>
@ -492,6 +528,7 @@
ng-disabled="state.actionInProgress || !endpointCreationForm.$valid"
ng-click="addAzureEndpoint()"
button-spinner="state.actionInProgress"
data-cy="endpointCreate-createAzureEndpoint"
>
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Add endpoint</span>
<span ng-show="state.actionInProgress">Creating endpoint...</span>

View file

@ -70,7 +70,15 @@
URL
</label>
<div class="col-sm-11">
<input type="text" class="form-control" ng-model="settings.TemplatesURL" id="templates_url" placeholder="https://myserver.mydomain/templates.json" required />
<input
type="text"
class="form-control"
ng-model="settings.TemplatesURL"
id="templates_url"
placeholder="https://myserver.mydomain/templates.json"
required
data-cy="settings-templateUrl"
/>
</div>
</div>
</div>
@ -95,6 +103,7 @@
class="form-control"
ng-model="settings.EdgeAgentCheckinInterval"
ng-options="+(opt.value) as opt.key for opt in state.availableEdgeAgentCheckinOptions"
data-cy="settings-pollFrequencySelect"
></select>
</div>
</div>
@ -103,7 +112,7 @@
<label for="toggle_enableEdgeComputeFeatures" class="control-label text-left">
Enable edge compute features
</label>
<label class="switch" style="margin-left: 20px;">
<label class="switch" style="margin-left: 20px;" data-cy="settings-edgeToggle">
<input type="checkbox" name="toggle_enableEdgeComputeFeatures" ng-model="formValues.enableEdgeComputeFeatures" /><i></i>
</label>
</div>
@ -118,6 +127,7 @@
ng-click="saveApplicationSettings()"
ng-disabled="state.actionInProgress || !settings.TemplatesURL"
button-spinner="state.actionInProgress"
data-cy="settings-saveSettingsButton"
>
<span ng-hide="state.actionInProgress">Save settings</span>
<span ng-show="state.actionInProgress">Saving...</span>

View file

@ -1,7 +1,7 @@
<!-- Sidebar -->
<div id="sidebar-wrapper">
<div class="sidebar-header">
<a ui-sref="portainer.home">
<a ui-sref="portainer.home" data-cy="portainerSidebar-homeImage">
<img ng-if="logo" ng-src="{{ logo }}" class="img-responsive logo" />
<img ng-if="!logo" src="~@/assets/images/logo.png" class="img-responsive logo" alt="Portainer" />
</a>
@ -9,7 +9,7 @@
</div>
<div class="sidebar-content">
<ul class="sidebar">
<sidebar-menu-item path="portainer.home" icon-class="fa-home fa-fw" class-name="sidebar-list">Home</sidebar-menu-item>
<sidebar-menu-item path="portainer.home" icon-class="fa-home fa-fw" class-name="sidebar-list" data-cy="portainerSidebar-home">Home</sidebar-menu-item>
<li class="sidebar-title endpoint-name" ng-if="applicationState.endpoint.name">
<span class="fa fa-plug space-right"></span>{{ applicationState.endpoint.name }}
@ -55,9 +55,9 @@
</sidebar-section>
<sidebar-section title="Edge compute" ng-if="isAdmin && applicationState.application.enableEdgeComputeFeatures">
<sidebar-menu-item path="edge.groups" icon-class="fa-object-group fa-fw" class-name="sidebar-list">Edge Groups</sidebar-menu-item>
<sidebar-menu-item path="edge.stacks" icon-class="fa-layer-group fa-fw" class-name="sidebar-list">Edge Stacks</sidebar-menu-item>
<sidebar-menu-item path="edge.jobs" icon-class="fa-clock fa-fw" class-name="sidebar-list">Edge Jobs</sidebar-menu-item>
<sidebar-menu-item path="edge.groups" icon-class="fa-object-group fa-fw" class-name="sidebar-list" data-cy="portainerSidebar-edgeGroups">Edge Groups</sidebar-menu-item>
<sidebar-menu-item path="edge.stacks" icon-class="fa-layer-group fa-fw" class-name="sidebar-list" data-cy="portainerSidebar-edgeStacks">Edge Stacks</sidebar-menu-item>
<sidebar-menu-item path="edge.jobs" icon-class="fa-clock fa-fw" class-name="sidebar-list" data-cy="portainerSidebar-edgeJobs">Edge Jobs</sidebar-menu-item>
</sidebar-section>
<sidebar-section ng-if="isAdmin || isTeamLeader" title="Settings">
@ -68,8 +68,8 @@
is-sidebar-open="toggle"
children-paths="['portainer.users.user' ,'portainer.teams' ,'portainer.teams.team' ,'portainer.roles' ,'portainer.roles.role' ,'portainer.roles.new']"
>
<sidebar-menu-item path="portainer.teams" class-name="sidebar-sublist">Teams</sidebar-menu-item>
<sidebar-menu-item path="portainer.roles" class-name="sidebar-sublist">Roles</sidebar-menu-item>
<sidebar-menu-item path="portainer.teams" class-name="sidebar-sublist" data-cy="portainerSidebar-teams">Teams</sidebar-menu-item>
<sidebar-menu-item path="portainer.roles" class-name="sidebar-sublist" data-cy="portainerSidebar-roles">Roles</sidebar-menu-item>
</sidebar-menu>
<div ng-if="isAdmin">
@ -80,17 +80,19 @@
is-sidebar-open="toggle"
children-paths="['portainer.endpoints.endpoint', 'portainer.endpoints.new', 'portainer.endpoints.endpoint.access', 'portainer.groups', 'portainer.groups.group', 'portainer.groups.group.access', 'portainer.groups.new', 'portainer.tags']"
>
<sidebar-menu-item path="portainer.groups" class-name="sidebar-sublist">Groups</sidebar-menu-item>
<sidebar-menu-item path="portainer.tags" class-name="sidebar-sublist">Tags</sidebar-menu-item>
<sidebar-menu-item path="portainer.groups" class-name="sidebar-sublist" data-cy="portainerSidebar-endpointGroups">Groups</sidebar-menu-item>
<sidebar-menu-item path="portainer.tags" class-name="sidebar-sublist" data-cy="portainerSidebar-endpointTags">Tags</sidebar-menu-item>
</sidebar-menu>
<sidebar-menu-item path="portainer.registries" icon-class="fa-database fa-fw" class-name="sidebar-list">Registries</sidebar-menu-item>
<sidebar-menu-item path="portainer.registries" icon-class="fa-database fa-fw" class-name="sidebar-list" data-cy="portainerSidebar-registries">
Registries</sidebar-menu-item
>
<sidebar-menu label="Settings" icon-class="fa-cogs fa-fw" path="portainer.settings" is-sidebar-open="toggle" children-paths="['portainer.settings.authentication']">
<sidebar-menu-item path="portainer.settings.authentication" class-name="sidebar-sublist">Authentication</sidebar-menu-item>
<sidebar-menu-item path="portainer.settings.authentication" class-name="sidebar-sublist" data-cy="portainerSidebar-authentication">Authentication</sidebar-menu-item>
<div class="sidebar-sublist">
<a href="http://www.portainer.io/help_about" target="_blank">Help / About</a>
<a href="http://www.portainer.io/help_about" target="_blank" data-cy="portainerSidebar-help">Help / About</a>
</div>
</sidebar-menu>
</div>
@ -104,7 +106,7 @@
</div>
<div>
<img src="~@/assets/images/logo_small.png" class="img-responsive logo" alt="Portainer" />
<span class="version">{{ uiVersion }}</span>
<span class="version" data-cy="portainerSidebar-versionNumber">{{ uiVersion }}</span>
</div>
</div>
</div>

View file

@ -27,6 +27,7 @@
placeholder="e.g. development"
auto-focus
required
data-cy="team-teamNameInput"
/>
</div>
</div>
@ -61,6 +62,7 @@
search-property="Username"
translation="{nothingSelected: 'Select one or more team leaders', search: 'Search...'}"
style="margin-left: 20px;"
data-cy="team-teamLeaderSelect"
>
</span>
</div>
@ -74,6 +76,7 @@
ng-disabled="state.actionInProgress || !teamCreationForm.$valid"
ng-click="addTeam()"
button-spinner="state.actionInProgress"
data-cy="team-createTeamButton"
>
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create team</span>
<span ng-show="state.actionInProgress">Creating team...</span>

View file

@ -25,7 +25,16 @@
</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control" id="username" ng-model="formValues.Username" ng-change="checkUsernameValidity()" placeholder="e.g. jdoe" auto-focus />
<input
type="text"
class="form-control"
id="username"
ng-model="formValues.Username"
ng-change="checkUsernameValidity()"
placeholder="e.g. jdoe"
auto-focus
data-cy="user-usernameInput"
/>
<span class="input-group-addon"><i ng-class="{ true: 'fa fa-check green-icon', false: 'fa fa-times red-icon' }[state.validUsername]" aria-hidden="true"></i></span>
</div>
</div>
@ -37,7 +46,7 @@
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span>
<input type="password" class="form-control" ng-model="formValues.Password" id="password" />
<input type="password" class="form-control" ng-model="formValues.Password" id="password" data-cy="user-passwordInput" />
</div>
</div>
</div>
@ -48,7 +57,7 @@
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span>
<input type="password" class="form-control" ng-model="formValues.ConfirmPassword" id="confirm_password" />
<input type="password" class="form-control" ng-model="formValues.ConfirmPassword" id="confirm_password" data-cy="user-passwordConfirmInput" />
<span class="input-group-addon"
><i
ng-class="{ true: 'fa fa-check green-icon', false: 'fa fa-times red-icon' }[formValues.Password !== '' && formValues.Password === formValues.ConfirmPassword]"
@ -69,7 +78,7 @@
message="Administrators have access to Portainer settings management as well as full control over all defined endpoints and their resources."
></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="formValues.Administrator" /><i></i> </label>
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="formValues.Administrator" data-cy="user-adminCheckbox" /><i></i> </label>
</div>
</div>
<!-- !admin-checkbox -->
@ -94,6 +103,7 @@
search-property="Name"
translation="{nothingSelected: 'Select one or more teams', search: 'Search...'}"
style="margin-left: 20px;"
data-cy="user-teamSelect"
>
</span>
</div>
@ -115,6 +125,7 @@
ng-disabled="state.actionInProgress || !state.validUsername || formValues.Username === '' || (AuthenticationMethod === 1 && formValues.Password === '') || (AuthenticationMethod === 1 && formValues.Password !== formValues.ConfirmPassword)"
ng-click="addUser()"
button-spinner="state.actionInProgress"
data-cy="user-createUserButton"
>
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create user</span>
<span ng-show="state.actionInProgress">Creating user...</span>