Adds more tests for routes

This commit is contained in:
Amir Raminfar
2021-11-21 19:56:10 -08:00
parent 320bbfe8b2
commit cdca0efd05
3 changed files with 12 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import { createApp } from "vue";
import { createRouter, createWebHistory } from "vue-router";
import { Autocomplete, Button, Dropdown, Switch, Radio, Field, Tooltip, Modal, Config } from "@oruga-ui/oruga-next";
import { bulmaConfig } from "@oruga-ui/theme-bulma";
import { createPinia } from 'pinia'
import { createPinia } from "pinia";
import config from "./stores/config";
import App from "./App.vue";
import { Container, Settings, Index, Show, ContainerNotFound, PageNotFound, Login } from "./pages";
@@ -21,7 +21,7 @@ const routes = [
props: true,
},
{
path: "/container/*",
path: "/container/:pathMatch(.*)",
component: ContainerNotFound,
name: "container-not-found",
},
@@ -41,7 +41,7 @@ const routes = [
name: "login",
},
{
path: "/*",
path: "/:pathMatch(.*)*",
component: PageNotFound,
name: "page-not-found",
},

View File

@@ -3,8 +3,8 @@
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title">
Oops,
<small class="subtitle">this page doesn't exist</small>
404.
<small class="subtitle">This page does not exist.</small>
</h1>
</div>
</div>

View File

@@ -0,0 +1,7 @@
/// <reference types="cypress" />
context("Dozzle routes", { baseUrl: Cypress.env("DOZZLE_DEFAULT") }, () => {
it("show", () => {
cy.visit("/show?name=dozzle").url().should("include", "/container/");
});
});