Skip to content

Commit

Permalink
Cleanup bruno AvaTax collection (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored Aug 30, 2024
1 parent 6fed4b1 commit ea33b85
Show file tree
Hide file tree
Showing 24 changed files with 109 additions and 151 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@ apps/**/generated
.cspellcache

*.tsbuildinfo

# bruno
cloud.bru
82 changes: 0 additions & 82 deletions apps/avatax/bruno/Checkout/1_Create_storefront_user.bru

This file was deleted.

53 changes: 53 additions & 0 deletions apps/avatax/bruno/checkout/01-create-storefront-user.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
meta {
name: 01. Create storefront user
type: graphql
seq: 1
}

post {
url: {{saleorApiUrl}}
body: graphql
auth: none
}

body:graphql {
mutation CreateStoreFrontUser(
$channelSlug: String
$email: String!
$password: String!
$firstName: String
) {
accountRegister(
input: {
firstName: $firstName
email: $email
password: $password
channel: $channelSlug
metadata: [{ key: "avataxCustomerCode", value: "code" }]
}
) {
user {
id
metadata {
key
value
}
}
errors {
code
field
message
}
}
}

}

body:graphql:vars {
{
"channelSlug": "{{channelSlug}}",
"email": "{{storefrontUserEmail}}",
"password": "{{storefrontUserPassword}}",
"firstName": "{{storefrontUserFirstName}}"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 2. Create storefront user token
name: 02. Create storefront user token
type: graphql
seq: 2
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: none
}
Expand Down Expand Up @@ -37,20 +37,3 @@ body:graphql:vars {
vars:post-response {
storefrontUserToken: res.body.data.tokenCreate.token
}

script:pre-request {
const { faker } = require('@faker-js/faker');

const configuredEmail = bru.getProcessEnv("STOREFRONT_USER_EMAIL");

if (configuredEmail) {
bru.setVar("storefrontUserEmail", configuredEmail);
}

const configuredPassword = bru.getProcessEnv("STOREFRONT_USER_PASSWORD");

if (configuredPassword) {
bru.setVar("storefrontUserPassword", configuredPassword);
}

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 3. Fetch product
name: 03. Fetch product
type: graphql
seq: 3
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand All @@ -31,7 +31,7 @@ body:graphql {

body:graphql:vars {
{
"channelSlug": "{{channel_USD}}"
"channelSlug": "{{channelSlug}}"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 4. Create checkout - US
name: 04. Create checkout
type: graphql
seq: 4
}

post {
url: {{API_URL}}
url: {{channelSlug}}
body: graphql
auth: bearer
}
Expand Down Expand Up @@ -93,7 +93,7 @@ body:graphql {
body:graphql:vars {
{
"variantId": "{{productVariantId}}",
"channelSlug": "{{channel_USD}}",
"channelSlug": "{{channelSlug}}",
"email": "{{storefrontUserEmail}}"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 5. Update checkout metadata
name: 05. Update checkout metadata
type: graphql
seq: 5
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 6. Update delivery method
name: 06. Update delivery method
type: graphql
seq: 6
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 7. Add promo code to checkout
name: 07. Add promo code to checkout
type: graphql
seq: 7
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 8. Complete checkout
name: 08. Complete checkout
type: graphql
seq: 8
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 01 Create staff token
name: 01. Create staff token
type: graphql
seq: 1
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 02 Get channel Id
name: 02. Get channel Id
type: graphql
seq: 2
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand All @@ -27,7 +27,7 @@ body:graphql {

body:graphql:vars {
{
"slug": "{{channel_USD}}"
"slug": "{{channelSlug}}"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 03 Create draft order
name: 03. Create draft order
type: graphql
seq: 3
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 04 Fetch products
name: 04. Fetch products
type: graphql
seq: 4
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 05 Add lines to draft order
name: 05. Add lines to draft order
type: graphql
seq: 5
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 06 Update Addresses on draft order
name: 06. Update Addresses on draft order
type: graphql
seq: 6
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
meta {
name: 07 Update shipping method on draft order
name: 07. Update shipping method on draft order
type: graphql
seq: 7
}

post {
url: {{API_URL}}
url: {{saleorApiUrl}}
body: graphql
auth: bearer
}
Expand Down
Loading

0 comments on commit ea33b85

Please sign in to comment.