> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# actions - Test mode

> Shop actions for controlling the test mode: configuration for activating, deactivating or toggling the test mode in the WEBSALE shop system.

export const TextbausteinHinweis = () => <>
    Dieser Text wird über einen Textbaustein realisiert.<br />
    Alles zu Textbausteinen in Konfigurationen finden Sie{" "}
    <a href="https://dokumentation.websale.de/konfiguration#verwendung-von-textbausteinen-in-konfigurationen">hier</a>.
  </>;

This area covers all actions used to control the test mode. They allow you to activate, deactivate or toggle the test mode within the system.

## `actions.testMode*` - Test mode

The actions listed here are **grouped thematically** to provide a clear overview of the associated error messages and email templates.

Actions that thematically belong to a different area can be found in the corresponding sections of this documentation or in the [alphabetical overview of actions](/en/konfiguration/actions-fehlertexte-e-mails/actions-alphabetische-ubersicht).

#### Excerpt of the basic `actions` structure

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "actions": {
      ...
      "testModeChange": {...},
      "testModeOff": {...},
      "testModeOn": {...},
      ...
    }
}
```

#### Action overview

| **Action**       | **Description**                                                                      |
| ---------------- | ------------------------------------------------------------------------------------ |
| `testModeOn`     | Defines the error messages that are output for requests to activate the test mode.   |
| `testModeOff`    | Defines the error messages that are output for requests to deactivate the test mode. |
| `testModeChange` | Defines the error messages that are output for requests to change the test mode.     |

### `actions.testModeChange` - Change test mode

The `testModeChange` action controls the error messages for requests to change the test mode.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "notAllowed": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter** | **Type** | **Description**                                                                                                             |
| ------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`  | object   | Configures the error codes used for problems during the action.                                                             |
| `notAllowed`  | string   | Error message output when changing the test mode is not allowed in the current context. <br /><br /><TextbausteinHinweis /> |

### `actions.testModeOff` - Deactivate / switch off test mode

The `testModeOff` action controls the error messages for requests to deactivate the test mode.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "notAllowed": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter** | **Type** | **Description**                                                                                                                 |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`  | object   | Configures the error codes used for problems during the action.                                                                 |
| `notAllowed`  | string   | Error message output when deactivating the test mode is not allowed in the current context. <br /><br /><TextbausteinHinweis /> |

### `actions.testModeOn` - Activate / switch on test mode

The `testModeOn` action controls the error messages for requests to activate the test mode.

#### Example configuration `actions.testModeOn`

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "noPassword": "<Textbaustein>",
    "invalidPassword": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**     | **Type** | **Description**                                                                                 |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `errorCodes`      | object   | Configures the error codes used for problems during the action.                                 |
| `noPassword`      | string   | Error message output when no password was supplied. <br /><br /><TextbausteinHinweis />         |
| `invalidPassword` | string   | Error message output when the supplied password is invalid. <br /><br /><TextbausteinHinweis /> |
