Skip to content

Commit

Permalink
use built showcase for tests (#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell authored Dec 21, 2023
1 parent 1e6db73 commit 2596a92
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 216 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/test-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ jobs:
install: false
working-directory: ./vuu-ui
browser: chrome
build: npm run build
start: npm run showcase
wait-on: "http://localhost:5173"
build: npm run showcase:build
start: npm run showcase:preview
wait-on: "http://localhost:4173"
- name: Run end-to-end tests in Edge
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
install: false
working-directory: ./vuu-ui
browser: edge
build: npm run build
start: npm run showcase
wait-on: "http://localhost:5173"
build: npm run showcase:build
start: npm run showcase:preview
wait-on: "http://localhost:4173"

# ensure the vuu example and showcase still build
vuu-and-showcase-build:
# ensure the vuu example still builds
vuu-app-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -76,7 +76,5 @@ jobs:
run: cd ./vuu-ui && npm install
- name: Build Vuu Libraries
run: cd ./vuu-ui && npm run build
- name: Build showcase
run: cd ./vuu-ui && npm run showcase:build
- name: Build Vuu app
run: cd ./vuu-ui && npm run build:app
25 changes: 1 addition & 24 deletions vuu-ui/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,6 @@ const viteConfig: UserConfig = {
},
},
};
// if (isCI) {
// viteConfig = mergeConfig(viteConfig, {
// resolve: {
// alias: {
// "@salt-ds/core": path.resolve(__dirname, "./dist/salt-ds-core"),
// "@salt-ds/data-grid": path.resolve(
// __dirname,
// "./dist/salt-ds-data-grid"
// ),
// "@salt-ds/lab": path.resolve(__dirname, "./dist/salt-ds-lab"),
// "@salt-ds/icons": path.resolve(__dirname, "./dist/salt-ds-icons"),
// },
// },
// optimizeDeps: {
// include: [
// "@salt-ds/core",
// "@salt-ds/data-grid",
// "@salt-ds/lab",
// "@salt-ds/icons",
// ],
// },
// } as UserConfig);
// }

export default defineConfig({
viewportWidth: 1280,
Expand Down Expand Up @@ -78,7 +55,7 @@ export default defineConfig({
},

e2e: {
baseUrl: "http://localhost:5173/",
baseUrl: "http://localhost:4173/",
// eslint-disable-next-line @typescript-eslint/no-unused-vars
setupNodeEvents(on, config) {
// implement node event listeners here
Expand Down
2 changes: 1 addition & 1 deletion vuu-ui/cypress/support/component/commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "cypress-axe";
import { Options } from "cypress-axe";
// import { PerformanceResult, PerformanceTester } from "./PerformanceTester";
import { ReactNode } from "react";
import { ThemeProvider } from "@finos/vuu-shell";
import { ThemeProvider } from "@finos/vuu-utils";

const SupportedThemeModeValues = ["light", "dark"] as const;
type SupportedThemeMode = (typeof SupportedThemeModeValues)[number];
Expand Down
Loading

0 comments on commit 2596a92

Please sign in to comment.