From bc4c38e8394df0350dd6f923fc74734339ffd73d Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Thu, 19 Dec 2024 19:46:27 -0700 Subject: [PATCH 1/2] site: get rid of landing page --- .../context-libraries/sandwich-contexts.md | 2 + sandwich-site/docs/intro.md | 41 ++++- sandwich-site/docusaurus.config.ts | 1 + sandwich-site/src/pages/index.tsx | 148 +----------------- sandwich-site/src/pages/styles.module.css | 6 +- 5 files changed, 44 insertions(+), 154 deletions(-) diff --git a/sandwich-site/docs/context-libraries/sandwich-contexts.md b/sandwich-site/docs/context-libraries/sandwich-contexts.md index 0fecc7a2..18704081 100644 --- a/sandwich-site/docs/context-libraries/sandwich-contexts.md +++ b/sandwich-site/docs/context-libraries/sandwich-contexts.md @@ -27,3 +27,5 @@ This test will log the various binaries that are available, such as `emacs`, `em ## File contexts The [Test.Sandwich.Contexts.Files](https://hackage.haskell.org/package/sandwich-contexts/docs/Test-Sandwich-Contexts-Files.html) module allows you to introduce named files as contexts. + +## PostgreSQL contexts diff --git a/sandwich-site/docs/intro.md b/sandwich-site/docs/intro.md index df4553e9..8f7947a2 100644 --- a/sandwich-site/docs/intro.md +++ b/sandwich-site/docs/intro.md @@ -5,9 +5,44 @@ sidebar_label: Introduction slug: / --- -import useBaseUrl from '@docusaurus/useBaseUrl'; - -Sandwich is a test framework for Haskell, inspired by and (almost) a drop-in replacement for [Hspec](http://hspec.github.io/). This section will show some of its features. +import useBaseUrl from "@docusaurus/useBaseUrl"; +import "react-responsive-carousel/lib/styles/carousel.min.css"; +import { Carousel } from "react-responsive-carousel"; + +import styles from "../src/pages/styles.module.css"; + +Sandwich is a test framework for Haskell, inspired by and (almost) a drop-in replacement for [Hspec](http://hspec.github.io/). + +Sandwich has a number of powerful features and integrations, such as: +* Interactive terminal UI interface for viewing test progress and results. +* Built-in [profiling](/docs/profiling) support. +* Integrations such as [Hedgehog](/docs/extensions/sandwich-hedgehog), [QuickCheck](/docs/extensions/sandwich-quickcheck), and [Selenium](/docs/extensions/sandwich-webdriver). +* Context libraries that allow you to introduce things like [databases](/docs/context-libraries/sandwich-contexts#postgresql-contexts), [Docker containers](#TODO), or even full [Kubernetes clusters](/docs/context-libraries/sandwich-contexts-kubernetes). + +
+ `${current} of ${total}`}> +
+
Terminal UI interface
+ +
+
+
Jump to failure in editor
+ +
+
+
Slack integration
+ +
+
+
Timing and flamegraphs
+ +
+
+
## Basic tests diff --git a/sandwich-site/docusaurus.config.ts b/sandwich-site/docusaurus.config.ts index b078afee..3a496e88 100644 --- a/sandwich-site/docusaurus.config.ts +++ b/sandwich-site/docusaurus.config.ts @@ -90,6 +90,7 @@ const config: Config = { '@docusaurus/preset-classic', { docs: { + // routeBasePath: "sandwich", sidebarPath: require.resolve('./sidebars.js'), // Please change this to your repo. editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/', diff --git a/sandwich-site/src/pages/index.tsx b/sandwich-site/src/pages/index.tsx index 5a638cc3..d43dd66b 100644 --- a/sandwich-site/src/pages/index.tsx +++ b/sandwich-site/src/pages/index.tsx @@ -1,159 +1,15 @@ import React from "react"; -import clsx from "clsx"; -import Layout from "@theme/Layout"; -import Link from "@docusaurus/Link"; +import { Redirect } from "@docusaurus/router"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -import useBaseUrl from "@docusaurus/useBaseUrl"; -import Typist from "react-typist"; - -import styles from "./styles.module.css"; import "react-responsive-carousel/lib/styles/carousel.min.css"; -import { Carousel } from "react-responsive-carousel"; - -const features = [ - { - title: "Powerful formatters", - imageUrl: "img/print_formatter.png", - description: ( - <> - Use the terminal UI formatter to inspect test results, re-run selected tests, or jump straight to test sources in your editor. Or, choose one of the more traditional formatters. - - ), - }, { - title: "Easy profiling", - imageUrl: "img/speedscope.png", - description: ( - <> - Automatically record timing data for every test suite and visualize it as a flamegraph. - - ), - }, { - title: "Zero-config Selenium tests", - imageUrl: "img/selenium_logo.png", - description: ( - <> - Automatically obtain Selenium driver binaries to match your Chrome or Firefox version, run tests in graphical or headless mode, and even record videos. - - ), - }, -]; - -function Feature({imageUrl, title, description}) { - const imgUrl = useBaseUrl(imageUrl); - return ( -
- {imgUrl && ( -
- {title} -
- )} -

{title}

-

{description}

-
- ); -} function Home() { const {siteConfig} = useDocusaurusContext(); - return ( - -
-
-

{siteConfig.title}

-

{siteConfig.tagline}

- -
- -
-
Terminal UI interface
- -
-
-
Jump to failure in editor
- -
-
-
Slack integration
- -
-
-
Timing and flamegraphs
- -
-
-
- -
- - Read the docs - - - -