Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jan 11, 2025
1 parent 345dedf commit 97e5bc0
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion e2e/tests/auto-nav-sidebar-dir-convension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test.describe('Auto nav and sidebar dir convention', async () => {
'index md convention',
'index mdx convention',
'same name',
'index in metaIndex In Meta',
'index in metaIndex in meta',
'no meta md',
'no meta mdx',
].join(','),
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/auto-nav-sidebar-no-meta.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ test.describe('Auto nav and sidebar test', async () => {
expect(sidebarTexts.join(',')).toEqual(
[
'API',
'pluginPlugin APlugin B',
'pluginPlugin aPlugin b',
'Commands',
'configBasic ConfigBuild ConfigFront Matter ConfigTheme Config',
'configBasic configBuild configFront matter configTheme config',
].join(','),
);
});
Expand Down
38 changes: 19 additions & 19 deletions e2e/tests/auto-nav-sidebar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ test.describe('Auto nav and sidebar test', async () => {
const h3Texts = await Promise.all(h3.map(element => element.textContent()));
expect(h3Texts.join(',')).toEqual(
[
'Basic Config',
'Theme Config',
'Front Matter Config',
'Build Config',
'Extname Config',
'Basic config',
'Theme config',
'Front matter config',
'Build config',
'Extname config',
'Nested',
'Runtime API',
'Components',
Expand All @@ -69,7 +69,7 @@ test.describe('Auto nav and sidebar test', async () => {
'nav',
'sidebar',
'builderConfig',
'Default Config',
'Default config',
'markdown',
'markdown.remarkPlugins',
'Usage',
Expand All @@ -91,11 +91,11 @@ test.describe('Auto nav and sidebar test', async () => {
const h2Texts = await Promise.all(h2.map(element => element.textContent()));
expect(h2Texts.join(',')).toEqual(
[
'Basic Config',
'Theme Config',
'Front Matter Config',
'Build Config',
'Extname Config',
'Basic config',
'Theme config',
'Front matter config',
'Build config',
'Extname config',
'Nested',
].join(','),
);
Expand All @@ -104,12 +104,12 @@ test.describe('Auto nav and sidebar test', async () => {
const h3Texts = await Promise.all(h3.map(element => element.textContent()));
expect(h3Texts.join(',')).toEqual(
[
'Basic Config',
'Theme Config',
'Front Matter Config',
'Build Config',
'Extname Config',
'Nested Config',
'Basic config',
'Theme config',
'Front matter config',
'Build config',
'Extname config',
'Nested config',
].join(','),
);

Expand All @@ -122,7 +122,7 @@ test.describe('Auto nav and sidebar test', async () => {
'nav',
'sidebar',
'builderConfig',
'Default Config',
'Default config',
'markdown',
'markdown.remarkPlugins',
'Nested H2',
Expand Down Expand Up @@ -173,7 +173,7 @@ test.describe('Auto nav and sidebar test', async () => {

const h3 = await page.$$('.overview-group_8f375 h3');
const h3Texts = await Promise.all(h3.map(element => element.textContent()));
expect(h3Texts.join(',')).toEqual(['Nested Config'].join(','));
expect(h3Texts.join(',')).toEqual(['Nested config'].join(','));

const a = await page.$$('.overview-group_8f375 ul a');
const aTexts = await Promise.all(a.map(element => element.textContent()));
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.describe('basic test', async () => {
await page.goto(`http://localhost:${appPort}`);
const h1 = await page.$('h1');
const text = await page.evaluate(h1 => h1?.textContent, h1);
expect(text).toContain('Hello World');
expect(text).toContain('Hello world');
// expect the .header-anchor to be rendered and take the correct href
const headerAnchor = await page.$('.header-anchor');
const href = await page.evaluate(
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/custom-icon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.describe('custom icon test', async () => {
});
const h1 = await page.$('h1');
const text = await page.evaluate(h1 => h1?.textContent, h1);
await expect(text).toContain('Hello World');
await expect(text).toContain('Hello world');

// TODO: custom icon sometimes failed due to https://github.com/web-infra-dev/rspack/issues/5871
// const headerAnchor = await page.$('.rspress-nav-search-button img');
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/no-config-root.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test.describe('no config.root dev test', async () => {
await page.goto(`http://localhost:${appPort}`);
const h1 = await page.$('h1');
const text = await page.evaluate(h1 => h1?.textContent, h1);
expect(text).toContain('Hello World');
expect(text).toContain('Hello world');
});
});

Expand All @@ -55,6 +55,6 @@ test.describe('no config.root build and preview test', async () => {
});
const h1 = await page.$('h1');
const text = await page.evaluate(h1 => h1?.textContent, h1);
expect(text).toContain('Hello World');
expect(text).toContain('Hello world');
});
});
2 changes: 1 addition & 1 deletion e2e/tests/react-19.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.describe('React 19 test', async () => {
await page.goto(`http://localhost:${appPort}`);
const h1 = await page.$('h1');
const text = await page.evaluate(h1 => h1?.textContent, h1);
expect(text).toContain('Hello World');
expect(text).toContain('Hello world');
});

test('404 page', async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rspress/template-basic/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"activeMatch": "/guide/"
},
{
"text": "Hello World",
"text": "Hello world",
"link": "/hello/",
"activeMatch": "/hello/"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/create-rspress/template-basic/docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can add Front Matter at the beginning of your Markdown file, which is a YAML

```yaml
---
title: Hello World
title: Hello world
---
```

Expand All @@ -39,7 +39,7 @@ You can also access properties defined in Front Matter in the body, for example:

```markdown
---
title: Hello World
title: Hello world
---

# {frontmatter.title}
Expand All @@ -48,7 +48,7 @@ title: Hello World
The previously defined properties will be passed to the component as `frontmatter` properties. So the final output will be:

```html
<h1>Hello World</h1>
<h1>Hello world</h1>
```

## Custom container
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rspress/template-basic/docs/hello.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hello World!
# Hello world!

## Start

Expand Down
6 changes: 3 additions & 3 deletions packages/document/docs/en/guide/basic/use-mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can add Front Matter at the beginning of your Markdown file, which is a YAML

```yaml
---
title: Hello World
title: Hello world
---
```

Expand All @@ -68,7 +68,7 @@ You can also access properties defined in Front Matter in the body, for example:

```markdown
---
title: Hello World
title: Hello world
---

# {frontmatter.title}
Expand All @@ -77,7 +77,7 @@ title: Hello World
The previously defined properties will be passed to the component as `frontmatter` properties. So the final output will be:

```html
<h1>Hello World</h1>
<h1>Hello world</h1>
```

## Custom container
Expand Down
2 changes: 1 addition & 1 deletion packages/document/docs/en/guide/start/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Execute `npm init -y` to initialize a project. You can install Rspress using npm
Then create the file with the following command

```bash
mkdir docs && echo '# Hello World' > docs/index.md
mkdir docs && echo '# Hello world' > docs/index.md
```

Add the following script to `package.json`:
Expand Down
6 changes: 3 additions & 3 deletions packages/document/docs/zh/guide/basic/use-mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export Button = () => <button />;

```yaml
---
title: Hello World
title: Hello world
---
```

Expand All @@ -68,7 +68,7 @@ title: Hello World

```mdx
---
title: Hello World
title: Hello world
---

# {frontmatter.title}
Expand All @@ -77,7 +77,7 @@ title: Hello World
前面定义的属性将作为 `frontmatter` 属性传递给组件。所以最终输出将是:

```html
<h1>Hello World</h1>
<h1>Hello world</h1>
```

## 自定义容器
Expand Down
2 changes: 1 addition & 1 deletion packages/document/docs/zh/guide/start/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mkdir rspress-app && cd rspress-app
然后通过如下命令创建文件:

```bash
mkdir docs && echo '# Hello World' > docs/index.md
mkdir docs && echo '# Hello world' > docs/index.md
```

`package.json` 中加上如下的脚本:
Expand Down

0 comments on commit 97e5bc0

Please sign in to comment.