Skip to content

Commit 0124f6c

Browse files
committed
docs(website): fixed links
1 parent 83fa305 commit 0124f6c

File tree

7 files changed

+115
-52
lines changed

7 files changed

+115
-52
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
of complex software systems faster, more collaborative and easier to scale.
1414

1515
⭐️ Get started with Serenity/JS!
16-
- [Serenity/JS web testing tutorial](https://serenity-js.org/handbook/tutorials/your-first-web-scenario)
17-
- [Serenity/JS Handbook](https://serenity-js.org/handbook) and [Getting Started guides](https://serenity-js.org/handbook/getting-started/)
18-
- [API documentation](https://serenity-js.org/api/core)
16+
- [Serenity/JS Tutorial](https://serenity-js.org/handbook/tutorials/)
17+
- [Serenity/JS Handbook](https://serenity-js.org/handbook/)
18+
- [API documentation](https://serenity-js.org/api/)
1919
- [Serenity/JS Project Templates on GitHub](https://serenity-js.org/handbook/project-templates/)
2020

2121
👋 Join the Serenity/JS Community!

docusaurus.config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ const config: Config = {
103103
sidebarPath: './src/sidebars/handbook.ts',
104104
showLastUpdateAuthor: false,
105105
showLastUpdateTime: true,
106+
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
107+
const sidebarItems = await defaultSidebarItemsGenerator(args);
108+
// DEBUG sidebar items
109+
// console.log({ sidebarItems })
110+
return sidebarItems.filter(item => ! item.id.endsWith('index'));
111+
},
106112
},
107113
blog: {
108114
...remarkOptions,
@@ -125,7 +131,6 @@ const config: Config = {
125131
],
126132

127133
themeConfig: {
128-
// Replace with your project's social card
129134
image: 'images/serenity-js-social-card.jpg', // open graph
130135
colorMode: {
131136
disableSwitch: false,
@@ -186,11 +191,11 @@ const config: Config = {
186191
title: 'Handbook',
187192
items: [
188193
{ label: 'Why Serenity/JS', to: '/handbook/' },
189-
{ label: 'Getting started', to: '/handbook/getting-started' },
190-
{ label: 'Web testing', to: '/handbook/web-testing' },
191-
{ label: 'API testing', to: '/handbook/api-testing' },
192-
{ label: 'Mobile testing', to: '/handbook/mobile-testing' },
194+
{ label: 'Tutorials', to: '/handbook/tutorials' },
193195
{ label: 'Core Design Patterns', to: '/handbook/design' },
196+
{ label: 'Web Testing', to: '/handbook/web-testing' },
197+
{ label: 'API Testing', to: '/handbook/api-testing' },
198+
{ label: 'Mobile Testing', to: '/handbook/mobile-testing' },
194199
{ label: 'Reporting', to: '/handbook/reporting' },
195200
{ label: 'Test runners', to: '/handbook/test-runners' },
196201
{ label: 'Integration', to: '/handbook/integration' },

redirects.config.ts

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,44 @@ export default {
88
// { from: '/community/sponsors.html', to: '' },
99
// { from: '/support.html', to: '' },
1010

11+
{ from: '/handbook/web-testing/your-first-web-scenario/', to: '/handbook/tutorials/your-first-web-scenario/' },
12+
{ from: '/handbook/api-testing/your-first-api-scenario/', to: '/handbook/tutorials/your-first-api-scenario/' },
13+
{ from: '/handbook/getting-started/serenity-js-with-playwright-test/', to: '/handbook/test-runners/playwright-test/' },
14+
{ from: '/handbook/getting-started/serenity-js-with-protractor/', to: '/handbook/test-runners/protractor/' },
15+
1116
{ from: '/privacy-policy/', to: '/legal/privacy-policy/' },
1217
{ from: '/license/', to: '/legal/license/' },
1318

1419
{ from: '/handbook/api-testing/blended-testing/', to: '/handbook/web-testing/blended-testing/' },
1520

16-
{ from: '/handbook/about/', to: '/handbook/getting-started/' },
17-
{ from: '/handbook/about/architecture/', to: '/handbook/getting-started/architecture' },
18-
{ from: '/handbook/about/installation/', to: '/handbook/getting-started/installation' },
19-
{ from: '/handbook/about/serenity-js-v3/', to: '/handbook/getting-started/upgrading-to-serenity-js-3' },
21+
{ from: [ '/handbook/about/', '/handbook/why-serenityjs.html' ], to: '/handbook/#why-choose-serenityjs' },
22+
{
23+
from: [
24+
'/handbook/about/architecture/',
25+
'/handbook/integration/architecture.html',
26+
'/handbook/getting-started/architecture'
27+
],
28+
to: '/handbook/architecture'
29+
},
30+
{
31+
from: [
32+
'/handbook/about/installation/',
33+
'/handbook/integration/installation.html',
34+
'/handbook/getting-started/installation',
35+
'/handbook/integration/runtime-dependencies.html'
36+
],
37+
to: '/handbook/installation'
38+
},
39+
{
40+
from: [
41+
'/handbook/about/serenity-js-v3/',
42+
'/handbook/getting-started/upgrading-to-serenity-js-3/',
43+
'/handbook/tutorials/upgrading-to-serenity-js-3',
44+
'/handbook/integration/serenity-2-migration-guide.html',
45+
'/handbook/release-notes/serenity-js-2.html',
46+
'/handbook/release-notes/serenity-js-3.html',
47+
],
48+
to: '/handbook/tutorials/upgrading-from-serenity-js-2/' },
2049

2150
{ from: '/handbook/getting-started/serenity-js-with-webdriverio/', to: '/handbook/test-runners/webdriverio' },
2251

@@ -37,8 +66,8 @@ export default {
3766
{ from: '/contributing/', to: '/community/contributing/' },
3867
{ from: '/contributing.html', to: '/community/contributing/' },
3968

40-
{ from: '/handbook/about.html', to: '/handbook/getting-started' },
41-
{ from: '/handbook/demo.html', to: '/handbook/getting-started' },
69+
{ from: '/handbook/about.html', to: '/handbook/#why-choose-serenityjs' },
70+
{ from: '/handbook/demo.html', to: '/handbook/' },
4271
{ from: '/handbook/design/abilities.html', to: '/api/core/class/Ability' },
4372
{
4473
from: [
@@ -58,40 +87,24 @@ export default {
5887
{ from: '/handbook/design/tasks.html', to: '/api/core/class/Task' },
5988
{ from: '/handbook/design/the-trouble-with-test-scripts.html', to: '/handbook/design' },
6089

61-
{ from: '/handbook/integration/architecture.html', to: '/handbook/getting-started/architecture' },
62-
{ from: '/handbook/integration/installation.html', to: '/handbook/getting-started/installation' },
6390
{
6491
from: '/handbook/integration/jira-and-other-issue-trackers.html',
6592
to: '/handbook/integration/jira-and-other-issue-trackers'
6693
},
67-
{ from: '/handbook/integration/runtime-dependencies.html', to: '/handbook/getting-started/installation' },
6894
{ from: '/handbook/integration/serenityjs-and-cucumber.html', to: '/handbook/test-runners/cucumber' },
6995
{ from: '/handbook/integration/serenityjs-and-jasmine.html', to: '/handbook/test-runners/jasmine' },
7096
{ from: '/handbook/integration/serenityjs-and-mocha.html', to: '/handbook/test-runners/mocha' },
7197
{ from: '/handbook/integration/serenityjs-and-protractor.html', to: '/handbook/test-runners/protractor' },
7298
{ from: '/handbook/release-notes/index.html', to: '/releases/' },
7399

74-
{
75-
from: [
76-
'/handbook/integration/serenity-2-migration-guide.html',
77-
'/handbook/release-notes/serenity-js-2.html',
78-
'/handbook/release-notes/serenity-js-3.html'
79-
], to: '/handbook/getting-started/upgrading-to-serenity-js-3'
80-
},
81-
82100
{ from: '/handbook/release-notes/versioning.html', to: '/releases/versioning' },
83101

84102
{ from: '/handbook/reporting/artifact-archiver.html', to: '/handbook/reporting/artifact-archiver' },
85103
{ from: '/handbook/reporting/console-reporter.html', to: '/handbook/reporting/console-reporter' },
86104
{ from: '/handbook/reporting/serenity-bdd-reporter.html', to: '/handbook/reporting/serenity-bdd-reporter' },
87105
{ from: '/handbook/reporting/stream-reporter.html', to: '/handbook/reporting/stream-reporter' },
88106
{ from: '/handbook/thinking-in-serenity-js/assertions.html', to: '/handbook/design/assertions' },
89-
{
90-
from: [
91-
'/handbook/thinking-in-serenity-js/hello-serenity-js.html',
92-
'/handbook/why-serenityjs.html'
93-
], to: '/handbook'
94-
},
107+
{ from: '/handbook/thinking-in-serenity-js/hello-serenity-js.html', to: '/handbook' },
95108
{ from: '/handbook/thinking-in-serenity-js/index.html', to: '/handbook/design/' },
96109
{ from: '/handbook/thinking-in-serenity-js/test-runners.html', to: '/handbook/test-runners/' },
97110
{ from: '/handbook/thinking-in-serenity-js/testing-rest-apis.html', to: '/handbook/api-testing/' },

src/docs/handbook/design/screenplay-pattern.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ improves **team collaboration** and **alignment**, enabling technical and busine
1515
and readily contribute to the test automation process.
1616

1717
Serenity/JS implementation of the Screenplay Pattern enables developers to easily introduce this design approach
18-
even into [existing test automation projects](/handbook/getting-started/#modernising-existing-projects).
18+
even into [existing test automation projects](/handbook/#modernise-existing-projects).
1919
Moreover, the framework
2020
provides [integration libraries](/handbook/architecture/#serenityjs-screenplay-pattern-apis) to
2121
facilitate various test automation types, including end-to-end, component, mobile and API testing,

src/docs/handbook/tutorials/your-first-web-scenario.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ In this tutorial, we'll use [Serenity/JS + Playwright Test template](https://git
4141
which integrates Serenity/JS with [Playwright](https://playwright.dev/) web testing library and its dedicated [Playwright Test](https://playwright.dev/docs/test-runners#playwright-test) test runner.
4242
The test suite we'll work on interacts with a simple to-do list app that you can experiment with at [todo-app.serenity-js.org](https://todo-app.serenity-js.org/).
4343

44-
To launch your workspace, make sure you have a [GitHub account](/handbook/getting-started/#join-githubcom-to-access-all-the-content),
45-
which will make it easier for you to use all the other [Serenity/JS resources](/handbook/getting-started) too.
44+
To launch your workspace, make sure you have a [GitHub account](/community/),
45+
which will make it easier for you to use all the other Serenity/JS resources, too.
4646

4747
Next, launch your Gitpod.io web IDE using the "Open in Gitpod" button below
4848
and sign in to your [Gitpod.io workspace](https://gitpod.io/#https://github.com/serenity-js/serenity-js-playwright-test-template)

src/plugins/docusaurus-plugin-typedoc-api/components/ApiIndex.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,16 @@ export default function ApiIndex({ options, packages, categories, history }: Api
104104
integration</strong> and <strong>test reporting</strong> capabilities.
105105
</p>
106106
<p>
107-
For <a href="/handbook/getting-started/"><strong>new test automation
108-
projects</strong></a>, consider
109-
using <a href="/handbook/project-templates/">Serenity/JS Project
110-
Templates</a>.
107+
For <strong>new test automation projects</strong>, consider
108+
using <a href="/handbook/project-templates/">Serenity/JS Project Templates</a>.
111109
These templates combine popular configurations of Serenity/JS modules with essential
112110
integration and test automation tools,
113111
providing an excellent starting point and a reference implementation for common test
114112
automation scenarios.
115113
</p>
116114
<p>
117-
For <strong>existing test automation projects</strong>, the <a
118-
href="/handbook/architecture/">modular architecture of
119-
Serenity/JS</a> lets
115+
For <strong>existing test automation projects</strong>,
116+
the <a href="/handbook/architecture/">modular architecture of Serenity/JS</a> lets
120117
you gradually introduce the framework into existing test suites, allowing
121118
for <strong>progressive modernisation</strong> without disrupting ongoing work.
122119
</p>

src/sidebars/handbook.ts

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,66 @@
11
import { SidebarsConfig } from '@docusaurus/plugin-content-docs';
2+
import { SidebarItemCategoryConfig } from '@docusaurus/plugin-content-docs/lib/sidebars/types';
23

3-
/**
4-
* Creating a sidebar enables you to:
5-
- create an ordered group of docs
6-
- render a sidebar for each doc of that group
7-
- provide next/previous navigation
4+
function category(label: string, dirName: string): SidebarItemCategoryConfig {
5+
return {
6+
type: 'category',
7+
label,
8+
link: { type: 'doc', id: `${ dirName }/index` },
9+
collapsible: true,
10+
collapsed: true,
11+
items: [ { type: 'autogenerated', dirName } ]
12+
}
13+
}
814

9-
The sidebars can be generated from the filesystem, or explicitly defined here.
10-
11-
Create as many sidebars as you want.
12-
*/
1315
const sidebars: SidebarsConfig = {
1416
// By default, Docusaurus generates a sidebar from the docs folder structure
15-
docs: [ { type: 'autogenerated', dirName: '.' } ],
16-
};
17+
docs: [
18+
{
19+
type: 'category',
20+
label: 'Introduction',
21+
link: { type: 'doc', id: 'index' },
22+
collapsible: true,
23+
collapsed: false,
24+
items: [
25+
'installation',
26+
'architecture',
27+
'project-templates',
28+
]
29+
},
30+
{
31+
type: 'category',
32+
label: 'Tutorials',
33+
link: { type: 'doc', id: 'tutorials/index' },
34+
collapsible: true,
35+
collapsed: false,
36+
items: [
37+
{ type: 'autogenerated', dirName: 'tutorials' }
38+
]
39+
},
40+
{
41+
type: 'category',
42+
label: 'Integrations',
43+
collapsible: false,
44+
// link: { type: 'doc', id: 'integration/index' },
45+
items: [
46+
category('Test Runners', 'test-runners'),
47+
category('Reporting', 'reporting'),
48+
category('Software Delivery Tools', 'integration'),
49+
]
50+
},
51+
{
52+
type: 'category',
53+
label: 'Design Patterns',
54+
collapsible: false,
55+
// link: { type: 'doc', id: 'design/index' },
56+
items: [
57+
category('Core Patterns', 'design'),
58+
category('Web Testing Patterns', 'web-testing'),
59+
category('API Testing Patterns', 'api-testing'),
60+
category('Mobile Testing Patterns', 'mobile-testing'),
61+
],
62+
},
63+
],
64+
} satisfies SidebarsConfig;
1765

1866
export default sidebars;

0 commit comments

Comments
 (0)