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