add data-cy attributes for backup/restore (#6546)

Co-authored-by: testA113 <42307911+aliharriss@users.noreply.github.com>
pull/4407/merge
testA113 3 years ago committed by GitHub
parent 171392c5ca
commit 6fac3fa127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,7 +109,7 @@
<div class="panel-body"> <div class="panel-body">
<!-- toggle --> <!-- toggle -->
<div style="padding-bottom: 12px"> <div style="padding-bottom: 12px">
<a ng-click="togglePanel()"> <a ng-click="togglePanel()" data-cy="init-installPortainerFromBackup">
<i ng-class="{ true: 'glyphicon glyphicon-chevron-down', false: 'glyphicon glyphicon-chevron-right' }[state.showRestorePortainer]" aria-hidden="true"></i <i ng-class="{ true: 'glyphicon glyphicon-chevron-down', false: 'glyphicon glyphicon-chevron-right' }[state.showRestorePortainer]" aria-hidden="true"></i
><span style="padding-left: 10px">Restore Portainer from backup</span> ><span style="padding-left: 10px">Restore Portainer from backup</span>
</a> </a>
@ -131,7 +131,7 @@
<div class="boxselector_wrapper"> <div class="boxselector_wrapper">
<div> <div>
<input type="radio" id="restore_file" checked="checked" /> <input type="radio" id="restore_file" checked="checked" />
<label for="restore_file" style="padding-bottom: 20px"> <label for="restore_file" style="padding-bottom: 20px" data-cy="init-selectLocalFile">
<div class="boxselector_header"> <div class="boxselector_header">
<i class="fa fa-upload" aria-hidden="true" style="margin-right: 2px"></i> <i class="fa fa-upload" aria-hidden="true" style="margin-right: 2px"></i>
Upload backup file Upload backup file
@ -168,6 +168,7 @@
ngf-accept="'application/x-tar,application/x-gzip'" ngf-accept="'application/x-tar,application/x-gzip'"
ng-model="formValues.BackupFile" ng-model="formValues.BackupFile"
auto-focus auto-focus
data-cy="init-selectBackupFileButton"
>Select file</button >Select file</button
> >
<span style="margin-left: 5px"> <span style="margin-left: 5px">
@ -187,7 +188,7 @@
></portainer-tooltip> ></portainer-tooltip>
</label> </label>
<div class="col-sm-4"> <div class="col-sm-4">
<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="init-backupPasswordInput" />
</div> </div>
</div> </div>
<!-- !password-input --> <!-- !password-input -->
@ -210,6 +211,7 @@
ng-disabled="!formValues.BackupFile || state.backupInProgress" ng-disabled="!formValues.BackupFile || state.backupInProgress"
ng-click="uploadBackup()" ng-click="uploadBackup()"
button-spinner="state.backupInProgress" button-spinner="state.backupInProgress"
data-cy="init-restorePortainerButton"
> >
<span ng-hide="state.backupInProgress">Restore Portainer</span> <span ng-hide="state.backupInProgress">Restore Portainer</span>
<span ng-show="state.backupInProgress">Restoring Portainer...</span> <span ng-show="state.backupInProgress">Restoring Portainer...</span>

@ -310,7 +310,7 @@
<div class="form-group"> <div class="form-group">
<label for="password_protect" class="col-sm-1 control-label text-left">Password protect</label> <label for="password_protect" class="col-sm-1 control-label text-left">Password protect</label>
<div class="col-sm-1"> <div class="col-sm-1">
<label class="switch"> <label class="switch" data-cy="settings-s3PasswordToggle">
<input type="checkbox" id="password_protect_s3" name="password_protect_s3" ng-model="formValues.passwordProtectS3" disabled /><i></i> <input type="checkbox" id="password_protect_s3" name="password_protect_s3" ng-model="formValues.passwordProtectS3" disabled /><i></i>
</label> </label>
</div> </div>
@ -320,7 +320,7 @@
<div class="form-group" ng-if="formValues.passwordProtectS3"> <div class="form-group" ng-if="formValues.passwordProtectS3">
<label for="password" class="col-sm-1 control-label text-left">Password</label> <label for="password" class="col-sm-1 control-label text-left">Password</label>
<div class="col-sm-3"> <div class="col-sm-3">
<input type="password" class="form-control" ng-model="formValues.passwordS3" id="password_S3" name="password_S3" required /> <input type="password" class="form-control" ng-model="formValues.passwordS3" id="password_S3" name="password_S3" required data-cy="settings-backups3pw" />
</div> </div>
</div> </div>
<div class="form-group col-md-12" ng-show="backupPortainerForm.password_S3.$invalid"> <div class="form-group col-md-12" ng-show="backupPortainerForm.password_S3.$invalid">
@ -369,7 +369,9 @@
<div class="form-group"> <div class="form-group">
<label for="password_protect" class="col-sm-1 control-label text-left">Password protect</label> <label for="password_protect" class="col-sm-1 control-label text-left">Password protect</label>
<div class="col-sm-1"> <div class="col-sm-1">
<label class="switch"> <input type="checkbox" id="password_protect" name="password_protect" ng-model="formValues.passwordProtect" /><i></i> </label> <label class="switch" data-cy="settings-passwordProtectLocal">
<input type="checkbox" id="password_protect" name="password_protect" ng-model="formValues.passwordProtect" /><i></i>
</label>
</div> </div>
</div> </div>
<!-- !Password protect --> <!-- !Password protect -->
@ -378,7 +380,7 @@
<div class="form-group" ng-if="formValues.passwordProtect"> <div class="form-group" ng-if="formValues.passwordProtect">
<label for="password" class="col-sm-1 control-label text-left">Password</label> <label for="password" class="col-sm-1 control-label text-left">Password</label>
<div class="col-sm-3"> <div class="col-sm-3">
<input type="password" class="form-control" ng-model="formValues.password" id="password" name="password" required /> <input type="password" class="form-control" ng-model="formValues.password" id="password" name="password" required data-cy="settings-backupLocalPassword" />
</div> </div>
</div> </div>
<div class="form-group col-md-12" ng-show="backupPortainerForm.password.$invalid"> <div class="form-group col-md-12" ng-show="backupPortainerForm.password.$invalid">
@ -399,6 +401,7 @@
ng-click="downloadBackup()" ng-click="downloadBackup()"
ng-disabled="backupPortainerForm.$invalid || state.backupInProgress || state.featureLimited" ng-disabled="backupPortainerForm.$invalid || state.backupInProgress || state.featureLimited"
button-spinner="state.backupInProgress" button-spinner="state.backupInProgress"
data-cy="settings-downloadLocalBackup"
> >
<span ng-hide="state.backupInProgress">Download backup</span> <span ng-hide="state.backupInProgress">Download backup</span>
<span ng-show="state.backupInProgress">Downloading backup</span> <span ng-show="state.backupInProgress">Downloading backup</span>

Loading…
Cancel
Save