feat(ui): enhance user experience with new features including QR code display, improved toast messages, and localized strings for various components
Some checks failed
CI / test-backend (push) Successful in 3s
CI / build-frontend (push) Successful in 1m48s
CI / test-backend (pull_request) Successful in 18s
CI / test-lang (push) Successful in 2m5s
Build and Publish Docker Image / build (pull_request) Has been skipped
CI / test-lang (pull_request) Successful in 1m14s
OSV-Scanner PR Scan / scan-pr (pull_request) Successful in 29s
CI / build-frontend (pull_request) Successful in 9m43s
CI / lint (push) Successful in 9m53s
CI / lint (pull_request) Successful in 9m49s
Build Test / Build and Test (pull_request) Successful in 12m57s
Tests / test (push) Successful in 14m2s
Benchmarks / benchmark (push) Successful in 14m29s
Build and Publish Docker Image / build-dev (pull_request) Successful in 19m25s
Tests / test (pull_request) Failing after 23m6s
Benchmarks / benchmark (pull_request) Successful in 29m13s
Build Test / Build and Test (push) Successful in 45m58s
Some checks failed
CI / test-backend (push) Successful in 3s
CI / build-frontend (push) Successful in 1m48s
CI / test-backend (pull_request) Successful in 18s
CI / test-lang (push) Successful in 2m5s
Build and Publish Docker Image / build (pull_request) Has been skipped
CI / test-lang (pull_request) Successful in 1m14s
OSV-Scanner PR Scan / scan-pr (pull_request) Successful in 29s
CI / build-frontend (pull_request) Successful in 9m43s
CI / lint (push) Successful in 9m53s
CI / lint (pull_request) Successful in 9m49s
Build Test / Build and Test (pull_request) Successful in 12m57s
Tests / test (push) Successful in 14m2s
Benchmarks / benchmark (push) Successful in 14m29s
Build and Publish Docker Image / build-dev (pull_request) Successful in 19m25s
Tests / test (pull_request) Failing after 23m6s
Benchmarks / benchmark (pull_request) Successful in 29m13s
Build Test / Build and Test (push) Successful in 45m58s
This commit is contained in:
@@ -61,7 +61,17 @@ describe("BlockedPage.vue (Banished UI)", () => {
|
||||
return mount(BlockedPage, {
|
||||
global: {
|
||||
mocks: {
|
||||
$t: (key) => key,
|
||||
$t: (key) => {
|
||||
const translations = {
|
||||
"banishment.title": "Banished",
|
||||
"banishment.description": "Manage Banished users and nodes",
|
||||
"banishment.lift_banishment": "Lift Banishment",
|
||||
"banishment.user": "User",
|
||||
"banishment.node": "Node",
|
||||
"banishment.banished_at": "Banished at",
|
||||
};
|
||||
return translations[key] || key;
|
||||
},
|
||||
},
|
||||
stubs: {
|
||||
MaterialDesignIcon: {
|
||||
|
||||
@@ -2,6 +2,15 @@ import { mount } from "@vue/test-utils";
|
||||
import { describe, it, expect, vi, beforeEach } from "vitest";
|
||||
import MicronEditorPage from "@/components/micron-editor/MicronEditorPage.vue";
|
||||
import { micronStorage } from "@/js/MicronStorage";
|
||||
import DialogUtils from "@/js/DialogUtils";
|
||||
|
||||
// Mock DialogUtils
|
||||
vi.mock("@/js/DialogUtils", () => ({
|
||||
default: {
|
||||
confirm: vi.fn().mockResolvedValue(true),
|
||||
alert: vi.fn().mockResolvedValue(),
|
||||
},
|
||||
}));
|
||||
|
||||
// Mock micronStorage
|
||||
vi.mock("@/js/MicronStorage", () => ({
|
||||
@@ -127,8 +136,10 @@ describe("MicronEditorPage.vue", () => {
|
||||
// Find reset button
|
||||
const resetButton = wrapper.find('.mdi-stub[data-icon-name="refresh"]').element.parentElement;
|
||||
await resetButton.click();
|
||||
await wrapper.vm.$nextTick();
|
||||
await wrapper.vm.$nextTick(); // Wait for async resetAll to complete
|
||||
|
||||
expect(window.confirm).toHaveBeenCalled();
|
||||
expect(DialogUtils.confirm).toHaveBeenCalled();
|
||||
expect(micronStorage.clearAll).toHaveBeenCalled();
|
||||
expect(wrapper.vm.tabs.length).toBe(2); // Resets to Main + Guide
|
||||
expect(wrapper.vm.activeTabIndex).toBe(0);
|
||||
|
||||
@@ -125,6 +125,16 @@ describe("NetworkVisualiser.vue", () => {
|
||||
const mountVisualiser = () => {
|
||||
return mount(NetworkVisualiser, {
|
||||
global: {
|
||||
mocks: {
|
||||
$t: (msg) => {
|
||||
const translations = {
|
||||
"visualiser.reticulum_mesh": "Reticulum Mesh",
|
||||
"visualiser.total_nodes": "Nodes",
|
||||
"visualiser.total_edges": "Links",
|
||||
};
|
||||
return translations[msg] || msg;
|
||||
},
|
||||
},
|
||||
stubs: {
|
||||
Toggle: {
|
||||
template:
|
||||
|
||||
@@ -10,6 +10,9 @@ describe("Toast.vue", () => {
|
||||
vi.useFakeTimers();
|
||||
wrapper = mount(Toast, {
|
||||
global: {
|
||||
mocks: {
|
||||
$t: (msg) => msg,
|
||||
},
|
||||
stubs: {
|
||||
TransitionGroup: { template: "<div><slot /></div>" },
|
||||
MaterialDesignIcon: {
|
||||
|
||||
Reference in New Issue
Block a user