FiftyfiveTech / cypress-playwright-poc

This is a sample project for automation-testing with Cypress and Playwright.
0 stars 0 forks source link

Tests are failing #1

Open nadvolod opened 1 year ago

nadvolod commented 1 year ago

Hi team, I attempted to run the POC for Cypress and got failures. The Salesforce.com is understandable as I didn't enter any credentials. Not going to try Playwright, as I assume it's the same outcome. Let's fix this by adding CI execution to run the Playwright and Cypress tests. All tests should pass in CI execution.


  (Run Finished)

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✖  Test_Specs/CrossOrigin.spec.ts           00:17        1        -        1        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✖  Test_Specs/MultiTab.spec.ts              01:03        1        -        1        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✖  Test_Specs/SalesForce.spec.ts            00:04        1        -        1        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✖  3 of 3 failed (100%)                     01:25        3        -        3        -        -  

  Running:  Test_Specs/SalesForce.spec.ts                                                   (3 of 3)
[HAPPO] Happo is disabled. Here's how to enable it:
  - Use the `happo-e2e` wrapper.
  - Set `HAPPO_ENABLED=true`.

Docs:
  https://docs.happo.io/docs/cypress#usage-with-cypress-run
  https://docs.happo.io/docs/cypress#usage-with-cypress-open

  Automation for POC
    1) Verify Login with valid username and valid password

  0 passing (4s)
  1 failing

  1) Automation for POC
       Verify Login with valid username and valid password:
     CypressError: `cy.type()` cannot accept an empty string. You need to actually type something.

https://on.cypress.io/type
      at Context.type (https://login.salesforce.com/__cypress/runner/cypress_runner.js:158854:76)
      at Context.<anonymous> (https://login.salesforce.com/__cypress/runner/cypress_runner.js:178437:19)
  From Your Spec Code:
      at fillText (https://login.salesforce.com/__cypress/tests?p=cypress/integration/Test_Specs/SalesForce.spec.ts:113:44)
      at fillUsername (https://login.salesforce.com/__cypress/tests?p=cypress/integration/Test_Specs/SalesForce.spec.ts:169:33)
      at Context.eval (https://login.salesforce.com/__cypress/tests?p=cypress/integration/Test_Specs/SalesForce.spec.ts:220:38)

https://user-images.githubusercontent.com/2136245/197769225-eb32995d-23b7-495e-97cc-0bef9fd06c72.mp4

https://user-images.githubusercontent.com/2136245/197769226-e8acccd6-f270-48cd-851b-7fe480e53055.mp4

https://user-images.githubusercontent.com/2136245/197769227-ead177dd-eafe-44c5-a32a-85c554f068cc.mp4

nitinbalihacktober commented 1 year ago

@nadvolod, we are working on the issue, will update you once we are done.

nitinbalihacktober commented 1 year ago

@nadvolod meanwhile did you got chance to look into details of readme file? File details required changes specific to environment and providing credentials for login and happo.io keys.