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

wdio-sync: Cleanup stacktraces #3750

Merged

Conversation

WillBrock
Copy link
Member

Proposed changes

Remove stacktraces from webdriverio files.

Before:

element ("body") still not displayed after 30000ms
Error: element ("body") still not displayed after 30000ms
    at timer.catch.e (/focus/node_modules/webdriverio/build/commands/browser/waitUntil.js:69:15)
    at Element.waitForDisplayed (/focus/node_modules/webdriverio/build/commands/element/waitForDisplayed.js:51:15)
    at FinalGrades.waitForDisplayed [as openTemplate] (/focus/sis/modules/Grades/FinalGrades/page-classes/FinalGrades.js:137:23)
    at Context.openTemplate (/focus/sis/modules/Users/Profiles/tests/FOCUS-19414.js:102:15)

After:

element ("body") still not displayed after 30000ms
Error: element ("body") still not displayed after 30000ms
    at FinalGrades.waitForDisplayed [as openTemplate] (/focus/sis/modules/Grades/FinalGrades/page-classes/FinalGrades.js:137:23)
    at Context.openTemplate (/focus/sis/modules/Users/Profiles/tests/FOCUS-19414.js:102:15)

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Reviewers: @webdriverio/technical-committee

@codecov
Copy link

codecov bot commented Mar 22, 2019

Codecov Report

Merging #3750 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3750   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         145      145           
  Lines        3314     3314           
  Branches      726      726           
=======================================
  Hits         3259     3259           
  Misses         50       50           
  Partials        5        5
Impacted Files Coverage Δ
packages/wdio-sync/src/constants.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6c7219...a48d26a. Read the comment docs.

@mgrybyk
Copy link
Member

mgrybyk commented Mar 22, 2019

I think that cutting logs to much is not really good idea. Can't see nothing bad to see what has failed in webdriverio.
At least it would be great to see failure of waitForDisplayed in your example.

I don't mind optimising stack traces but would avoid cutting them fully

@WillBrock
Copy link
Member Author

I don't think it provides any benefit to the end user with seeing the files from the framework and just adds clutter. If I recall correctly other frameworks exclude the stacktraces from their internal files.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

👍

@christian-bromann christian-bromann added the PR: Polish 💅 PRs that contain improvements on existing features label Mar 25, 2019
@christian-bromann christian-bromann merged commit bfc1165 into webdriverio:master Mar 25, 2019
yamkay pushed a commit to MoveInc/webdriverio that referenced this pull request Sep 4, 2019
## Proposed changes

Remove stacktraces from webdriverio files.

Before:
```
element ("body") still not displayed after 30000ms
Error: element ("body") still not displayed after 30000ms
    at timer.catch.e (/focus/node_modules/webdriverio/build/commands/browser/waitUntil.js:69:15)
    at Element.waitForDisplayed (/focus/node_modules/webdriverio/build/commands/element/waitForDisplayed.js:51:15)
    at FinalGrades.waitForDisplayed [as openTemplate] (/focus/sis/modules/Grades/FinalGrades/page-classes/FinalGrades.js:137:23)
    at Context.openTemplate (/focus/sis/modules/Users/Profiles/tests/FOCUS-19414.js:102:15)
```

After:
```
element ("body") still not displayed after 30000ms
Error: element ("body") still not displayed after 30000ms
    at FinalGrades.waitForDisplayed [as openTemplate] (/focus/sis/modules/Grades/FinalGrades/page-classes/FinalGrades.js:137:23)
    at Context.openTemplate (/focus/sis/modules/Users/Profiles/tests/FOCUS-19414.js:102:15)
```

## Types of changes

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist

- [x] I have read the [CONTRIBUTING](https://github.com/webdriverio/webdriverio/blob/master/CONTRIBUTING.md) doc
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)

### Reviewers: @webdriverio/technical-committee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Polish 💅 PRs that contain improvements on existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants