-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,11 @@ | |
class="form-control mt-2" | ||
required | ||
:disabled="saving" | ||
data-cy="edit-username-input" | ||
/> | ||
</label> | ||
|
||
<button class="btn btn-primary" type="submit" :disabled="saving"> | ||
<button class="btn btn-primary" type="submit" :disabled="saving" data-cy="submit-edit-username-form"> | ||
<span v-show="saving" class="spinner-border spinner-border-sm" role="status" aria-hidden="true" /> | ||
{{ $t("Update Username") }} | ||
</button> | ||
|
@@ -35,6 +36,7 @@ | |
class="form-control mt-2" | ||
required | ||
:disabled="savingPassword" | ||
data-cy="edit-current-password-input" | ||
/> | ||
</label> | ||
</div> | ||
|
@@ -49,6 +51,7 @@ | |
class="form-control mt-2" | ||
required | ||
:disabled="savingPassword" | ||
data-cy="edit-new-password-input" | ||
/> | ||
</label> | ||
</div> | ||
|
@@ -63,11 +66,12 @@ | |
class="form-control mt-2" | ||
required | ||
:disabled="savingPassword" | ||
data-cy="edit-new-password-repeat-input" | ||
/> | ||
</label> | ||
</div> | ||
|
||
<button class="btn btn-primary" type="submit" :disabled="savingPassword"> | ||
<button class="btn btn-primary" type="submit" :disabled="savingPassword" data-cy="submit-edit-password-form"> | ||
<span v-show="savingPassword" class="spinner-border spinner-border-sm" role="status" aria-hidden="true" /> | ||
{{ $t("Update Password") }} | ||
</button> | ||
|
@@ -83,6 +87,7 @@ | |
type="checkbox" | ||
:disabled="saving" | ||
@click="debounceCheckboxClick(() => { active = !active; save({ active }); })" | ||
data-cy="edit-active-checkbox" | ||
Check warning on line 90 in src/components/settings/Users/EditUser.vue GitHub Actions / check-linters
|
||
> | ||
<div class="ps-2">{{ $t("Active") }}</div> | ||
</label> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
const SettingsUsersEditPage = { | ||
exports.SettingsUsersEditPage = { | ||
url: Cypress.env("baseUrl") + "/settings/users/edit", | ||
usernameInput: '[data-cy="username-input"]', | ||
newPassWordInput: '[data-cy="password-input"]', | ||
newPasswordRepeatInput: '[data-cy="password-repeat-input"]', | ||
submitEditUserForm: '[data-cy="submit-create-admin-form"]', | ||
submitNewPasswordForm: '[data-cy="submit-new-password-form"]', | ||
activeStatus: '[data-cy="active-status"]', | ||
usernameInput: '[data-cy="edit-username-input"]', | ||
currentPassWordInput: '[data-cy="edit-current-password-input"]', | ||
newPassWordInput: '[data-cy="edit-new-password-input"]', | ||
newPasswordRepeatInput: '[data-cy="edit-new-password-repeat-input"]', | ||
submitEditUserNameForm: '[data-cy="submit-edit-username-form"]', | ||
submitNewPasswordForm: '[data-cy="submit-edit-password-form"]', | ||
activeStatus: '[data-cy="edit-active-checkbox"]', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const settingsUsersEditPage = require('../pages/settings-users-edit-page'); | ||
|
||
class EditUserTask{ | ||
fillAndSubmitNewUserNameForm(username){ | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.usernameInput).clear(); | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.usernameInput).type(username); | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.submitEditUserNameForm).click(); | ||
} | ||
fillAndSubmitNewPasswordForm(password, newPassword, newPasswordRepeat){ | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.currentPassWordInput).type(password); | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.newPassWordInput).type(newPassword); | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.newPasswordRepeatInput).type(newPasswordRepeat); | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.submitNewPasswordForm).click(); | ||
} | ||
inactivateUser(){ | ||
cy.get(settingsUsersEditPage.SettingsUsersEditPage.activeStatus).uncheck(); | ||
} | ||
} | ||
exports.EditUserTask = EditUserTask; |