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

[Tests] add pause on next mochitest #6058

Merged
merged 3 commits into from May 9, 2018

Conversation

@AlexWang-16
Copy link
Contributor

AlexWang-16 commented Apr 22, 2018

Fixes Issue: #5446

Summary of Changes

  • added pause on next test (browser_dbg-pause-on-next.js)

  • added pause selector under "selectors" in head.js to support clicking
    on pause button

Current version of the test adds an expression to evaluate the function
instead of using invokeInTab() to trigger pause in the debugger. When
invokeInTab() is used, it does not seem to activate simple() in
src/test/mochitest/examples/simple3.js

Test Plan

  • In debugger.html project root directory, execute: yarn mochi browser_dbg-pause-on-next results in passing test
@jasonLaster jasonLaster changed the title Fixes #5446 [Tests] add pause on next mochitest Apr 23, 2018
Copy link
Contributor

jasonLaster left a comment

Looking good!

clickElement(dbg, "pause");
await waitForDispatch(dbg, "BREAK_ON_NEXT");

await addExpression(dbg, "simple()");

This comment has been minimized.

Copy link
@jasonLaster

jasonLaster Apr 23, 2018

Contributor

try invokeInTab here

This comment has been minimized.

Copy link
@AlexWang-16

AlexWang-16 Apr 23, 2018

Author Contributor

I tried replacing line 30 with invokeInTab("simple");

The test timed out . Here's the log. Any suggestions on why this may be happening?

This comment has been minimized.

Copy link
@jasonLaster

jasonLaster Apr 25, 2018

Contributor

looks like it doesn't pause... that's weird :)

@jasonLaster

This comment has been minimized.

Copy link
Contributor

jasonLaster commented Apr 30, 2018

Hey @AlexWang-16 any questions for us?

@AlexWang-16

This comment has been minimized.

Copy link
Contributor Author

AlexWang-16 commented May 1, 2018

Yes I do actually. How can I reach the console in the debugger?

Currently, I see the following:

  • Watch expressions
  • Breakpoints
    • Pause on exceptions
  • Sources tab
  • Outline tab
  • Middle section that provides feedback
  • Opened tabs based on selected files

I don't see a section where I can type into to invoke a function.

Right now I'm trying to replicate invokeInTab() to see what happens when I click the pause button.

I'm confused because I've tested clicking the pause button while my test is running and I see "1 BREAK_ON_NEXT" as the resulting output. I have a function that simulates a mouse click and created the proper selector to invoke "1 BREAK_ON_NEXT". During the test execution, I see that output in the console. I expected the debugger to pause, but this is not the case.

Trying to replicate these steps manually was not possible because I'm not sure if the console I am using is correct; I've tried to pull up my Firefox's native debugger and invoke simple() while simple3.js is opened as the active debugger tab, but I'm getting undefined errors.

@darkwing darkwing self-assigned this May 2, 2018
@darkwing

This comment has been minimized.

Copy link
Contributor

darkwing commented May 2, 2018

Hello @AlexWang-16 -- I'm going to evaluate this tonight and will provide feedback ASAP -- sorry for the delay!

@darkwing

This comment has been minimized.

Copy link
Contributor

darkwing commented May 3, 2018

Your test appears to be passing (nice!); we'll work on quickly fixing the broken test and then we can hopefully get this in fast. Thank you @AlexWang-16

@darkwing

This comment has been minimized.

Copy link
Contributor

darkwing commented May 4, 2018

@AlexWang-16 Good shout, I cheated with a breakpoint; still looking at this :)

@jasonLaster

This comment has been minimized.

Copy link
Contributor

jasonLaster commented May 8, 2018

@AlexWang-16 @darkwing what do you think?

Copy link
Contributor

darkwing left a comment

Well that's short! Nice!

@darkwing darkwing merged commit 6cc845c into firefox-devtools:master May 9, 2018
3 checks passed
3 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.