Skip to content

Commit 260f59c

Browse files
committed
docs(website): restructured the API Testing Patterns section
1 parent b494765 commit 260f59c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/docs/handbook/api-testing/configuring-http-client.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ BeforeAll(async () => {
6161
})
6262
```
6363

64-
Make sure to review the [examples and reference implementations](https://github.com/serenity-js/serenity-js/tree/main/examples), as well as [Serenity/JS REST API testing Project Templates](/handbook/getting-started/project-templates/#resthttp-api-testing)
64+
Make sure to review the [examples and reference implementations](https://github.com/serenity-js/serenity-js/tree/main/examples), as well as [Serenity/JS REST API testing Project Templates](/handbook/project-templates/#resthttp-api-testing)
6565
to see how to apply the above configuration to an existing project.
6666

6767
## Configuring blended test scenarios
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
sidebar_position: 5
3-
title: API testing
2+
sidebar_position: 6
3+
title: API Testing Patterns
44
---
55

6-
# API testing with Serenity/JS
6+
# Serenity/JS API Testing Patterns
77

88
[**Serenity/JS REST**](/api/rest) is a [Screenplay Pattern](/handbook/design/screenplay-pattern)-compatible library that enables your actors to interact with REST- and other
99
HTTP-based interfaces. Under the hood, Serenity/JS REST uses the popular [Axios HTTP client](https://github.com/axios/axios), allowing you to leverage its [plugin ecosystem](https://www.npmjs.com/search?q=keywords:axios),
1010
and adds automatic proxy server detection to ensure your API tests work smoothly, even in corporate networks.
1111

1212
In this chapter, you'll learn about:
13-
- [**Interacting with HTTP APIs**](/handbook/api-testing/your-first-api-scenario/) using Serenity/JS Screenplay Pattern libraries
13+
- [**Interacting with HTTP APIs**](/handbook/tutorials/your-first-api-scenario/) using Serenity/JS Screenplay Pattern libraries
1414
- [**Configuring Serenity/JS HTTP client**](/handbook/api-testing/configuring-http-client/) for API testing
1515
- [**Sending HTTP requests**](/handbook/api-testing/sending-requests/) using the Serenity/JS REST module
1616
- [**Verifying HTTP responses**](/handbook/api-testing/verifying-responses/) using the Serenity/JS assertions module

src/docs/handbook/api-testing/your-first-api-scenario.mdx renamed to src/docs/handbook/tutorials/your-first-api-scenario.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 2
33
title: Your first API scenario
44
---
55

@@ -25,7 +25,7 @@ To demonstrate how this can be accomplished, in this tutorial I'll show you how
2525
## Writing dedicated API test scenarios
2626

2727
We'll write a simple "health check" test, where an actor sends a HTTP request to check if a web service is up and running.
28-
You can write API test scenarios like this using one of the [Serenity/JS Project Templates for API Testing](/handbook/getting-started/project-templates/#resthttp-api-testing),
28+
You can write API test scenarios like this using one of the [Serenity/JS Project Templates for API Testing](/handbook/project-templates/#resthttp-api-testing),
2929
as they integrate Serenity/JS directly with [Cucumber](/handbook/test-runners/cucumber/), [Mocha](/handbook/test-runners/mocha/), or [Jasmine](/handbook/test-runners/jasmine/),
3030
without the overhead of managing a web browser.
3131

@@ -66,7 +66,7 @@ describe('GitHub Status API v2', () => {
6666
})
6767
```
6868

69-
If you've already completed the [Serenity/JS web testing tutorial](/handbook/web-testing/your-first-web-scenario/),
69+
If you've already completed the [Serenity/JS web testing tutorial](/handbook/tutorials/your-first-web-scenario/),
7070
the above scenario should look familiar:
7171
1. We start by giving all actors in our [`Cast`](/api/core/class/Cast) abilities to [`CallAnApi`](/api/rest/class/CallAnApi) at a given `baseURL`
7272
2. Next, the actor sends a [`GetRequest`](/api/rest/class/GetRequest) to the `status` endpoint
@@ -449,7 +449,7 @@ I call this approach [**Blended Testing**](/handbook/web-testing/blended-testing
449449

450450
To support you in using Blended Testing in your test suites,
451451
all [Serenity/JS web test runner adapters](/handbook/test-runners/)
452-
and [Serenity/JS Project Templates for Web Testing](/handbook/getting-started/project-templates/#web-testing) come with **built-in support for REST and HTTP-based interactions**,
452+
and [Serenity/JS Project Templates for Web Testing](/handbook/project-templates/#web-testing) come with **built-in support for REST and HTTP-based interactions**,
453453
so there's no need to install additional dependencies or manually configure anything.
454454

455455

@@ -578,9 +578,9 @@ describe('GitHub', () => {
578578

579579
## Using Serenity/JS REST testing templates
580580

581-
Use [Serenity/JS Project Templates](/handbook/getting-started/project-templates/) to create a new GitHub repository for your automation project in seconds.
581+
Use [Serenity/JS Project Templates](/handbook/project-templates/) to create a new GitHub repository for your automation project in seconds.
582582

583-
Remember that each Serenity/JS template comes with a [GitPod workspace](/handbook/getting-started/project-templates/#serenityjs-gitpods) that uses a dedicated Docker image with all the required dependencies
583+
Remember that each Serenity/JS template comes with a [GitPod workspace](/handbook/project-templates/#serenityjs-gitpods) that uses a dedicated Docker image with all the required dependencies
584584
and comes with pre-configured VisualStudio Code extensions to help you experiment with running Serenity/JS straight away in your browser with no local installation required.
585585

586586
## Next steps

0 commit comments

Comments
 (0)