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

feat: expect helper #3923

Merged
merged 5 commits into from Oct 28, 2023
Merged

feat: expect helper #3923

merged 5 commits into from Oct 28, 2023

Conversation

kobenguyent
Copy link
Collaborator

Motivation/Description of the PR

  • Description of this PR, which problem it solves
  • Resolves #issueId (if applicable).

Type of change

  • 🚀 New functionality

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@DavertMik
Copy link
Contributor

DavertMik commented Oct 15, 2023

@kobenguyent could you show the output with --steps?
I assume the "expect" lines would be duplicated.

@kobenguyent
Copy link
Collaborator Author

@kobenguyent could you show the output with --steps? I assume the "expect" lines would be duplicated.

Thanks @DavertMik. Pushed the fix

My --
  Assert
    I am on page "https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST"
    I grab current url 
    I expect "{"a":1}" to equal "{"b":1}"
  ✖ FAILED in 598ms


-- FAILURES:

  1) My
       Assert:

      expected { a: 1 } to equal { b: 1 }
      + expected - actual

       {
      -  "a": 1
      +  "b": 1
       }
      
      at ExpectHelper.expectEqual (node_modules/codeceptjs/lib/helper/ExpectHelper.js:21:57)
      at Step.run (node_modules/codeceptjs/lib/step.js:122:47)
      at /Users/t/Downloads/highlight_error_sample/node_modules/codeceptjs/lib/actor.js:135:23
  
  Scenario Steps:
  - I.expectEqual({"a":1}, {"b":1}) at Test.<anonymous> (./regression_test.js:28:7)
  - I.grabCurrentUrl() at Test.<anonymous> (./regression_test.js:27:25)
  - I.amOnPage("https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST") at Test.<anonymous> (./regression_test.js:26:7)
  
  Artifacts:
  - screenshot: /Users/t/Downloads/highlight_error_sample/output/Assert.failed.png
  - video: /Users/tDownloads/highlight_error_sample/output/videos/c7786dd7-c926-430f-a860-be8039ac09bf_Assert.failed.webm

@kobenguyent kobenguyent merged commit edafb9e into 3.x Oct 28, 2023
10 checks passed
@kobenguyent kobenguyent deleted the expect-helper branch October 28, 2023 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants