Merge pull request #9546 from backstage/emmaindal/techdocs-cli-tests

[TechDocs CLI] adding cypress testing
This commit is contained in:
Emma Indal
2022-02-21 15:54:53 +01:00
committed by GitHub
30 changed files with 1235 additions and 30 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ const timeout = 25000;
jest.setTimeout(timeout * 2);
describe('end-to-end', () => {
const cwd = path.resolve(__dirname, 'fixture');
const cwd = path.resolve(__dirname, 'example-docs');
afterEach(async () => {
// On Windows the pid of a spawned process may be wrong
@@ -0,0 +1 @@
site/
@@ -0,0 +1,92 @@
## hello mock docs
!!! test
Testing something
Abbreviations:
Some text about MOCDOC
This is a paragraph.
{: #test_id .test_class }
Apple
: A fruit.
```javascript
import { test } from 'something';
const addThingToThing = (a, b) a + b;
```
- [abc](#abc)
- [xyz](#xyz)
## abc
This is a b c.
## xyz
This is x y z.
# Emojis
:bulb: :smile:
# Code blocks
```javascript
import { test } from 'something';
const addThingToThing = (a, b) a + b;
```
# Grouped Code blocks
=== "JavaScript"
```javascript
import { test } from 'something';
const addThingToThing = (a, b) a + b;
```
=== "Java"
```java
public void function() {
test();
}
```
```java tab="java"
public void function() {
test();
}
```
```java tab="java 2"
public void function() {
test();
}
```
# MDX truly sane lists
- attributes
- customer
- first_name
- test
- family_name
- email
- person
- first_name
- family_name
- birth_date
- subscription_id
- request
<!-- prettier-ignore -->
*[MOCDOC]: Mock Documentation
@@ -2,7 +2,9 @@ site_name: docs-test-fixture
site_description: Documentation site test fixture
nav:
- HOME: README.md
- Home: index.md
- SubDocs: '!include ./sub-docs/mkdocs.yml'
- Plugins: '*include ./plugins/*/mkdocs.yml'
plugins:
- techdocs-core
@@ -0,0 +1,4 @@
# Plugin A
This is a description of Plugin A. This file exists to prove that glob'd
includes using the `*include` syntax work as expected.
@@ -0,0 +1,5 @@
site_name: Plugin A
site_description: A description of Plugin A
nav:
- Introduction: index.md
@@ -0,0 +1,4 @@
# Plugin B
This is a description of Plugin B. This file exists to prove that glob'd
includes using the `*include` syntax work as expected.
@@ -0,0 +1,5 @@
site_name: Plugin B
site_description: A description of Plugin B
nav:
- Introduction: index.md
@@ -0,0 +1 @@
### This is an md file in another docs folder using the [MkDocs Monorepo Plugin](https://github.com/spotify/mkdocs-monorepo-plugin)
@@ -0,0 +1,4 @@
site_name: subdocs
nav:
- Home 2: 'index.md'
@@ -1 +0,0 @@
# Test Fixture