Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cybersource logs #148

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Cybersource logs #148

wants to merge 4 commits into from

Conversation

sumanraj123
Copy link

@sumanraj123 sumanraj123 commented Feb 27, 2023

Added cybersource log for debugging
#changingTooling

@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Feb 27, 2023

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Feb 27, 2023

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@github-actions
Copy link

github-actions bot commented Feb 27, 2023

Warnings
⚠️

🛑 This PR will change tooling [💡 could be GitHub Actions, package.json, etc]

Messages
📖 ❤️ Thanks!
📖

🎉 PR additions = 71, PR deletions = 1

Generated by 🚫 dangerJS against 149a89e

@sonarcloud
Copy link

sonarcloud bot commented Feb 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link

Cy-Runner

Jira ticket automation

 [✓] Issue ENGINEERS-1166 created
  -  https://vtex-dev.atlassian.net/browse/ENGINEERS-1166
 [✓] Execution time
  -  initWorkspace................. 00:00:05
  -  installApps................... 00:00:05
  -  uninstallApps................. 00:00:00
  -  linkApp....................... 00:00:30
  -  strategy...................... 00:07:48
  -  teardown...................... 00:00:12
  -  total......................... 00:08:47

Cypress Dashboard

 [✓] https://cloud.cypress.io/projects/ny5emv/runs/506

Notion documentation

 [✓] https://www.notion.so/vtexhandbook/My-PR-got-failed-what-s-next

Fail

 [✗] The test failed! Please, check the artifacts.

@Syed-Vtex Syed-Vtex marked this pull request as draft February 27, 2023 11:45
@@ -425,6 +445,11 @@ export function invoiceAPITestCase(

cy.getVtexItems().then(vtex => {
cy.getOrderItems().then(item => {
cy.qe(`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace curl with cy.request

@@ -339,6 +354,11 @@ export function verifyCyberSourceAPI({
cy.addDelayBetweenRetries(5000)
cy.getVtexItems().then(vtex => {
cy.getOrderItems().then(item => {
cy.qe(`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace curl with cy.request

@@ -165,6 +175,11 @@ export function verifyStatusInInteractionAPI({
const [{ transactionId }] = response.body.paymentData.transactions

cy.setOrderItem(transactionIdEnv, transactionId)
cy.qe(`
curl --location --request GET '${vtex.baseUrl}/${transactionId}/interactions' \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace curl with cy.request

@@ -157,6 +162,11 @@ export function verifyStatusInInteractionAPI({

cy.getVtexItems().then(vtex => {
cy.getOrderItems().then(item => {
cy.qe(`
curl --location --request GET '${vtex.baseUrl}/api/oms/pvt/orders/${item[orderIdEnv]}' \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace curl with cy.request

@@ -41,15 +42,19 @@ export function completePayment({
cy.getIframeBody(selectors.PaymentMethodIFrame).then($body => {
if (!$body.find(selectors.CardExist).length) {
// Credit cart not exist
cy.qe(`Enteriing credit card number 5555 5555 5555 4444`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of entering use Type

@@ -3,6 +3,12 @@ import { FAIL_ON_STATUS_CODE, VTEX_AUTH_HEADER } from './common/constants.js'
// Order Tax API Test Case
Cypress.Commands.add('orderTaxApi', (requestPayload, tax) => {
cy.getVtexItems().then(vtex => {
cy.qe(`
curl --location --request POST '${vtex.baseUrl}/cybersource/checkout/order-tax' \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace curl with cy.request

@@ -25,11 +25,27 @@ export function saveAppSettings(settings) {

export function updateCybersourceConfiguration(orderSuffix = '') {
it('Update cybersource app settings', () => {
cy.qe(`
GetApp settings query -
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this use cy.addGraphqlLogs command
This would be available once this PR been merged - https://github.com/vtex-apps/cy-runner/pull/249/files

@@ -39,7 +44,12 @@ export function setWorkspaceInAffiliation(workspace = null, payerAuth = true) {
response.body.configuration[payerAuthIndex].value = payerAuth
? 'active'
: 'disabled'

cy.qe(`
curl --location --request PUT '${vtex.baseUrl}/api/payments/pvt/affiliations/21d78653-50d6-4b06-b553-2645e67a6f5e' \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace curl with cy.request
if it is a common function then do it in cy-runner rather than here

@@ -5,6 +5,11 @@ const CYBERSOURCE_AFFILIATION_ID = '21d78653-50d6-4b06-b553-2645e67a6f5e'
export function setWorkspaceInAffiliation(workspace = null, payerAuth = true) {
it(`Configuring workspace as '${workspace}' in payment affiliation`, () => {
cy.getVtexItems().then(vtex => {
cy.qe(`
curl --location --request GET '${vtex.baseUrl}/api/payments/pvt/affiliations/21d78653-50d6-4b06-b553-2645e67a6f5e' \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace curl with cy.request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants