Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions app/src/tests/tour.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { act, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import Welcome from "../ui/Welcome";
import news from "../news.json";
import Welcome, { newestStable } from "../ui/Welcome";
import { scene as asked, theWindow } from "./setup";

type Heard = (event: { payload: unknown }) => void;

const newest = news.find((one) => one.version === newestStable());
const toldFrom2x = newest?.headline?.es ?? newest?.es[0]?.title ?? "";

async function heardOn(name: string): Promise<Heard> {
const { listen } = await import("@tauri-apps/api/event");
await waitFor(() => {
Expand Down Expand Up @@ -50,7 +54,7 @@ describe("the welcome of a fresh install", () => {
expect(await screen.findByText("Lo esencial")).toBeInTheDocument();
await press("Siguiente");

expect(await screen.findByText("CopyPaste ahora es CoPanda")).toBeInTheDocument();
expect(await screen.findByText(toldFrom2x)).toBeInTheDocument();
await press("Entendido");
expect(theWindow.close).toHaveBeenCalled();
});
Expand All @@ -66,7 +70,7 @@ describe("the welcome of a fresh install", () => {
await press("Siguiente");

expect(await screen.findByText("Lo esencial")).toBeInTheDocument();
expect(screen.queryByText("CopyPaste ahora es CoPanda")).toBeNull();
expect(screen.queryByText(toldFrom2x)).toBeNull();
await press("Listo");
expect(theWindow.close).toHaveBeenCalled();
});
Expand Down
3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ targets = [

[advisories]
yanked = "deny"
ignore = [
{ crate = "zip@4.6.1", reason = "every 4.x is yanked and tauri-plugin-updater 2.x still needs zip ^4" },
]

[licenses]
allow = [
Expand Down
Loading