Skip to content

Commit

Permalink
Rename Testing API to API reference and update content
Browse files Browse the repository at this point in the history
  • Loading branch information
pckerneis committed Jan 6, 2024
1 parent b15a438 commit a831451
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineConfig({
{ text: 'Get started', link: '/get-started' },
{ text: 'CLI configuration', link: '/cli-configuration' },
{ text: 'Language overview', link: '/language-overview' },
{ text: 'Testing API', link: '/testing-api' },
{ text: 'API reference', link: '/api-reference' },
{ text: 'Externals file', link: '/externals-file' },
]
}
Expand Down
2 changes: 2 additions & 0 deletions testing-api.md → api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ outline: [2, 3]

# Testing API

Documenté comes with pre-defined actions and assertions that cover most of the common use cases.

## Built-in actions

### visit
Expand Down
2 changes: 2 additions & 0 deletions externals-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The externals file is specified with the `externals` property in the configurati

## Example

Here is an example of an externals file that exposes a function to call a REST API endpoint using Cypress:

```js
// externals.js
module.exports = {
Expand Down
7 changes: 5 additions & 2 deletions get-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Get started

This guide will help you get started with Documenté. You will learn how to set up your project, write your first specification using the Phrasé language, and run your tests generated from your documentation.

## Set up your project

### Prerequisites
Expand Down Expand Up @@ -76,7 +78,8 @@ then welcome message should be visible
and it should have text "Welcome, user01!"
```

In order to login, simply type your username and password in the login form and click on the login button.
In order to login, simply type your username and password in the login form
and click on the login button.

```phrase
In order to login:
Expand Down Expand Up @@ -123,4 +126,4 @@ playwright test --ui
## Example project
You can find an example repository [here](https://github.com/documente/example-sut) with a simple application and a set of specifications.
You can find an example repository [here](https://github.com/documente/example-sut) with a simple application, a Documenté configuration, and a set of specifications.
17 changes: 14 additions & 3 deletions language-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ outline: [2, 3]

# Language Overview

## Introduction

Documenté is based on a language called Phrasé.
It is based on Behavior-Driven Development (BDD) with Given-When-Then keywords.
It is designed to be intuitive and easy to learn.
Expand All @@ -14,7 +12,20 @@ It is designed to be intuitive and easy to learn.

### Given-When-Then section

An individual test case is structured with a Given-When-Then section.
An individual test case is structured with a Given-When-Then section that describes the test scenario.

Examples of test scenarios:

```
Given I visit "http://localhost:3000/myapp"
When I login as "user1"
Then welcome message should be visible
and it should have text "Welcome, user1!"
Given I visit "http://localhost:3000/myapp"
When I click on About menu item
Then About page should be visible
```

#### Given

Expand Down

0 comments on commit a831451

Please sign in to comment.