mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-18 23:34:04 +02:00
fix(lint): Correct the issues
Sorry, my ESLint extension was disabled
This commit is contained in:
parent
5198432cfc
commit
1e4bc5ddb5
4 changed files with 11 additions and 8 deletions
|
@ -82,8 +82,8 @@
|
|||
style="scale: 1.4; cursor: pointer;"
|
||||
type="checkbox"
|
||||
:disabled="saving"
|
||||
@click="debounceCheckboxClick(() => { active = !active; save({ active }); })"
|
||||
data-testid="active-checkbox"
|
||||
@click="debounceCheckboxClick(() => { active = !active; save({ active }); })"
|
||||
>
|
||||
<div class="ps-2">{{ $t("Active") }}</div>
|
||||
</label>
|
||||
|
@ -181,8 +181,8 @@ export default {
|
|||
/**
|
||||
* Save user changes
|
||||
* @param {object} user user to save
|
||||
* @param {string} [user.username] username used as login identifier.
|
||||
* @param {boolean} [user.active] is the user authorized to login?
|
||||
* @param {string} user.username username used as login identifier.
|
||||
* @param {boolean} user.active is the user authorized to login?
|
||||
* @returns {void}
|
||||
*/
|
||||
save(user) {
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
class="btn-ban-user btn ms-2 py-1"
|
||||
:class="active ? 'btn-outline-danger' : 'btn-outline-success'"
|
||||
:disabled="processing"
|
||||
@click.prevent="active ? disableConfirm(usersList[index]) : toggleActiveUser(usersList[index])"
|
||||
:data-testid="`toggle-active-user-${username}`"
|
||||
@click.prevent="active ? disableConfirm(usersList[index]) : toggleActiveUser(usersList[index])"
|
||||
>
|
||||
<font-awesome-icon class="" :icon="active ? 'user-slash' : 'user-check'" />
|
||||
</button>
|
||||
|
|
|
@ -35,7 +35,10 @@ test.describe("Multiple Users", () => {
|
|||
// Disable the admin user
|
||||
await page.getByTestId("toggle-active-user-admin").click();
|
||||
// Click on the button containing Yes and having btn-danger class
|
||||
await page.getByRole("button", { name: "Yes", exact: true}).click();
|
||||
await page.getByRole("button", {
|
||||
name: "Yes",
|
||||
exact: true
|
||||
}).click();
|
||||
await expect(page.getByText("You are not logged in.")).toBeVisible();
|
||||
|
||||
// Make sure we're back on the login page after refresh
|
||||
|
|
|
@ -19,7 +19,7 @@ export async function screenshot(testInfo, page) {
|
|||
|
||||
/**
|
||||
* @param {Page} page Page
|
||||
* @param {string} [user="admin"] Username to log in with
|
||||
* @param {string} user Username to log in with
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function login(page, user = "admin") {
|
||||
|
|
Loading…
Add table
Reference in a new issue