Skip to content

feat: expect helper - #3923

Merged
kobenguyent merged 5 commits into
3.xfrom
expect-helper
Oct 28, 2023
Merged

feat: expect helper#3923
kobenguyent merged 5 commits into
3.xfrom
expect-helper

Conversation

@kobenguyent

Copy link
Copy Markdown
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

DavertMik commented Oct 15, 2023

Copy link
Copy Markdown
Contributor

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

@kobenguyent

Copy link
Copy Markdown
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
@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.

2 participants