From 530bb4249133eeb1728d22451b32cecd15e25084 Mon Sep 17 00:00:00 2001 From: Matheus Nogueira Date: Thu, 25 May 2023 15:15:44 -0300 Subject: [PATCH] add section about creating transactions and enable envs docs (#2577) --- docs/docs/cli/creating-transactions.md | 25 +++++++++++++++++++++++++ docs/sidebars.js | 22 +++++++++++----------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/docs/docs/cli/creating-transactions.md b/docs/docs/cli/creating-transactions.md index e69de29bb2..461b127435 100644 --- a/docs/docs/cli/creating-transactions.md +++ b/docs/docs/cli/creating-transactions.md @@ -0,0 +1,25 @@ +# Creating Transactions + +Just like other structures of Tracetest, you can also manager your transactions using the CLI and definition files. + +A definition file for a transaction looks like the following: + +```yaml +type: Transaction +spec: + name: Test purchase flow + description: Test a flow of purchasing an item + steps: + - ./tests/create-product.yaml + - ./tests/add-product-to-cart.yaml + - ./tests/complete-purschase.yaml + - testID # you can also reference tests by their ids instead of referencing the definition file +``` + +In order to apply this transaction to your Tracetest instance, make sure to have your [CLI configured](./configuring-your-cli.md) and run: + +``` +tracetest apply transaction -f +``` + +> If the file contains the property `spec.id`, the operation will be considered a transaction udpate. diff --git a/docs/sidebars.js b/docs/sidebars.js index 6e9e2031ea..aec1203b2f 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -241,11 +241,11 @@ const sidebars = { type: "category", label: "Web UI", items: [ - // { - // type: "doc", - // id: "web-ui/creating-environments", - // label: "Creating environments", - // }, + { + type: "doc", + id: "web-ui/creating-environments", + label: "Creating environments", + }, { type: "doc", id: "web-ui/creating-tests", @@ -266,11 +266,11 @@ const sidebars = { id: "web-ui/test-results", label: "Test Results", }, - // { - // type: "doc", - // id: "web-ui/creating-transactions", - // label: "Creating transactions", - // }, + { + type: "doc", + id: "web-ui/creating-transactions", + label: "Creating transactions", + }, { type: "doc", id: "web-ui/exporting-tests", @@ -311,7 +311,7 @@ const sidebars = { type: "doc", id: "cli/running-tests", label: "Running Tests", - }, + }, // { // type: "doc", // id: "cli/creating-transactions",