From cc3533e2edb0d912dc84cfb7dbc005ec55688a14 Mon Sep 17 00:00:00 2001 From: Charles Santos Date: Mon, 10 Oct 2022 10:02:38 -0300 Subject: [PATCH] Release/v2 (#136) * ENGINEERS-465: Improve features related on the ticket * chore: add a section for disabled specs * chore: upgrading the code to version 2 * chore: migrate schema * chore: migrate credentials * chore: remove utils module and fix dependencies * chore: credentials migrated * chore: credenttials migrated * chore: migrate report and add deprecation report * chore: fix teardown * chore: migrate cypress * chore: fix cypress run module * chore: start to migrate workspace * chore: link, install, and remove migrated * chore: link migration done * chore: save app versions and deps migrated * chore: clean up output * chore: migrate tests and jira * chore: fix verbosity if local * chore: add debug file on logs * fix: messages typos * fix: move sensitive files from wipe to teardown * fix: length errors when array undefined * fix: clean output simplifying messages * chore: dump more information on crash * chore: merge teardown module into workspace * chore: merge teardown module into workspace * chore: link improved, sorry detection * chore: link done, other improvements * fix: kill pid on crash * fix: a lot of typos * fix: dependency report * chore: detection of sorry cypress added * fix: SonarCloud code smells * fix: drop small logic errors * fix: load env secrets * chore: :robot: Update readme * fix: :bug: typo * fix: :bug: change path * fix: :bug: fix typos * chore: :robot: check toolbelt version * chore: :robot: add lock before start the test * chore: :robot: add error message on workflow * :chore: :robot: bump workflow version * Feature: Adding GitHub decorator (#98) * feature: :robot: add GitHub decorator * fix: drop newline decorator for pr * Feature/v2/decorator (#100) * feature: :robot: add GitHub decorator * fix: drop random set for workspace * Feature/v2/decorator (#102) * feature: :robot: add GitHub decorator * fix: drop random set for workspace * fix: added await to get workspace name * fix: delete GH decorator file * fix: only delete files if not on CI * fix: lint * chore: :robot: drop long lines on pr decorators * chore: :robot: adding spaces on pr decorators * chore: :robot: adding spaces on pr decorators * chore: :robot: changing the decorator logic * chore: :robot: adjust on the crash print layout * chore: :robot: adjust on the crash print layout * chore: :robot: print useful debug messages * fix: report feed line * chore: :robot: add exports envs on config * test: testing disable link debug monitoring * test: testing disable link debug monitoring * chore: :robot: add browserlist package * chore: :robot: adding tests to check Cypress before run * fix: :bug: fixing cypress.json configuration * fix: move browserslist package * revert: drop link kill * chore: :robot: make less dense log messages * fix: drop cypress for smoke tests * fix: :bug: drip catch for Cypress promise * fix: :bug: drop caps titles * drop: browserslist * fix: :bug: try to fix reading 0 error * fix: :bug: code smells * chore: revert promise and add jira to PR decorator * fix: :bug: update yarn lock versions * chore: :robot: dump env on crash * chore: :robot: dump node versions * fix: :bug: stringfy env before save to log * chore: :robot: refactor test module * chore: :robot: refactor test module * chore: :robot: more information on running test * fix: :bug: drop stopOnFail for wipe data * fix: :bug: trying to debug loop on Avalara * fix: :bug: wipe in eternal loop due xvbf missing * fix: :bug: module name * fix: :bug: workflow version * chore: :robot: add push action * fix: drop TODO arealdy sorted * chore: :robot: clean decorator name * Cy-runner v2 uses api key to login, so use api to login with email (#107) * Release/v2 (#105) * ENGINEERS-465: Improve features related on the ticket * chore: add a section for disabled specs * chore: upgrading the code to version 2 * chore: migrate schema * chore: migrate credentials * chore: remove utils module and fix dependencies * chore: credentials migrated * chore: credenttials migrated * chore: migrate report and add deprecation report * chore: fix teardown * chore: migrate cypress * chore: fix cypress run module * chore: start to migrate workspace * chore: link, install, and remove migrated * chore: link migration done * chore: save app versions and deps migrated * chore: clean up output * chore: migrate tests and jira * chore: fix verbosity if local * chore: add debug file on logs * fix: messages typos * fix: move sensitive files from wipe to teardown * fix: length errors when array undefined * fix: clean output simplifying messages * chore: dump more information on crash * chore: merge teardown module into workspace * chore: merge teardown module into workspace * chore: link improved, sorry detection * chore: link done, other improvements * fix: kill pid on crash * fix: a lot of typos * fix: dependency report * chore: detection of sorry cypress added * fix: SonarCloud code smells * fix: drop small logic errors * fix: load env secrets * chore: :robot: Update readme * fix: :bug: typo * fix: :bug: change path * fix: :bug: fix typos * chore: :robot: check toolbelt version * chore: :robot: add lock before start the test * chore: :robot: add error message on workflow * :chore: :robot: bump workflow version * Feature: Adding GitHub decorator (#98) * feature: :robot: add GitHub decorator * fix: drop newline decorator for pr * Feature/v2/decorator (#100) * feature: :robot: add GitHub decorator * fix: drop random set for workspace * Feature/v2/decorator (#102) * feature: :robot: add GitHub decorator * fix: drop random set for workspace * fix: added await to get workspace name * fix: delete GH decorator file * fix: only delete files if not on CI * fix: lint * chore: :robot: drop long lines on pr decorators * chore: :robot: adding spaces on pr decorators * chore: :robot: adding spaces on pr decorators * chore: :robot: changing the decorator logic * chore: :robot: adjust on the crash print layout * chore: :robot: adjust on the crash print layout * chore: :robot: print useful debug messages * fix: report feed line * chore: :robot: add exports envs on config * test: testing disable link debug monitoring * test: testing disable link debug monitoring * chore: :robot: add browserlist package * chore: :robot: adding tests to check Cypress before run * fix: :bug: fixing cypress.json configuration * fix: move browserslist package * revert: drop link kill * chore: :robot: make less dense log messages * fix: drop cypress for smoke tests * fix: :bug: drip catch for Cypress promise * fix: :bug: drop caps titles * drop: browserslist * fix: :bug: try to fix reading 0 error * fix: :bug: code smells * chore: revert promise and add jira to PR decorator * fix: :bug: update yarn lock versions * chore: :robot: dump env on crash * chore: :robot: dump node versions * fix: :bug: stringfy env before save to log * chore: :robot: refactor test module * chore: :robot: refactor test module * chore: :robot: more information on running test * fix: :bug: drop stopOnFail for wipe data * fix: :bug: trying to debug loop on Avalara * fix: :bug: wipe in eternal loop due xvbf missing * fix: :bug: module name * fix: :bug: workflow version * chore: :robot: add push action * fix: drop TODO arealdy sorted * Cy-runner v2 uses api key to login, so use api to login with email Co-authored-by: Charles Santos * fix: :bug: strings to check linked app * fix: :bug: missing await on whoami call * chore: :robot: disable parallelism on wipe * fix: :bug: avoid wipe run when link fails * fix: :bug: avoid wipe run when link fails * chore: :robot: add feedback when add/del app fails * chore: :robot: add tries when add/del app fails * chore: :robot: add re-tries due a vtex timeouts * Improve/support (#113) improve support * added 2.8-testcase (#111) Co-authored-by: Syed Mujeeb <92449902+Syed-Vtex@users.noreply.github.com> * Add Bindings testcase in B2B (#118) * Added b2b bindings testcase * Improve functions * chore: :robot: improve reserve/release orderForm (#122) * chore: :robot: improve lock orderForm * fix: SonarCloud code smells * fix: SonarCloud code smells * fix: SonarCloud code smells * fix: module import error by importing itself * fix: return call missing * fix: workspace name set up * fix: workspace name to show * fix: add missing header * fix: add missing section * fix: missing config workspace name update * added fail on status code (#108) Co-authored-by: suman123 Co-authored-by: Charles Santos Co-authored-by: Syed Mujeeb <92449902+Syed-Vtex@users.noreply.github.com> * Engineers 698 - Fix/reserve account (#134) Use optionalChaining in reserveAccount Co-authored-by: Syed Mujeeb <92449902+Syed-Vtex@users.noreply.github.com> Co-authored-by: saravananvenkatesan <103024249+saravananvenkatesan@users.noreply.github.com> Co-authored-by: sumanraj123 <78902403+sumanraj123@users.noreply.github.com> Co-authored-by: suman123 --- cypress-shared/support/common/testcase.js | 3 ++- node/config.js | 2 +- node/workspace.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cypress-shared/support/common/testcase.js b/cypress-shared/support/common/testcase.js index e56fdf3d..3704c324 100644 --- a/cypress-shared/support/common/testcase.js +++ b/cypress-shared/support/common/testcase.js @@ -147,6 +147,7 @@ export function cancelTheOrder(orderEnv) { method: 'POST', url: cancelOrderAPI(baseUrl, order[orderEnv]), headers: VTEX_AUTH_HEADER(apiKey, apiToken), + ...FAIL_ON_STATUS_CODE, body: { reason: 'Customer bought it by mistake', }, @@ -325,7 +326,7 @@ export function deleteAddresses() { }) } -/* +/* Below fn operates with getTestVariables */ diff --git a/node/config.js b/node/config.js index 34ce316b..cb69406d 100644 --- a/node/config.js +++ b/node/config.js @@ -25,7 +25,7 @@ exports.getConfig = async (configFile) => { const WORKSPACE = await this.getWorkspaceName(config) const ACCOUNT = config.base.vtex.account const DOMAIN = config.base.vtex.domain - const RESERVE = config.workspace.reserveAccount.enabled + const RESERVE = config.workspace?.reserveAccount?.enabled config.base.vtex.authUrl = `https://${VTEX_ACCOUNT}${VTEX_AUTH_PATH}` config.base.vtex.baseUrl = `https://${WORKSPACE}--${ACCOUNT}.${DOMAIN}` diff --git a/node/workspace.js b/node/workspace.js index 35cb3eea..d0c20daf 100644 --- a/node/workspace.js +++ b/node/workspace.js @@ -141,7 +141,7 @@ exports.linkApp = async (config) => { exports.teardown = async (config, linkSucceed = true) => { const START = system.tick() const { workspace } = config - const RESERVE = config.workspace.reserveAccount.enabled + const RESERVE = config.workspace?.reserveAccount?.enabled if (RESERVE) await lock.releaseAccount(config)