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

fix: restore passive browsers html-reporter compatibility #1001

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KuznetsovRoman
Copy link
Member

We suggest people to move from "hermione-passive-browsers" to "passive", but "passive" doesn't work with html-reporter gui.

In html-reporter gui, we skip all tests, which has silentlySkipped: true: https://github.com/gemini-testing/html-reporter/blob/30d8ec99835bf35a0aa14b2437d3ad7fbc76ba79/lib/gui/tool-runner/index.ts#L337

And Testplane returns silentlySkipped as "is any of nested parents is skipped":

_isSilentlySkipped({ silentSkip, parent }) {

So, in order for passive browsers to work, we need to enable all parent suites of tests, enabled with ".also.in"

testObject.browserId = browserId;
testObject.parent = parent;
testObject.enable = sinon.spy(testObject.enable.bind(testObject));
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously, testObject.enable was === to testObject.parent.enable, so i couldn't check "if it was called on parent once". It would refer to call on "testObject.enable" and return "yes, it was called on parent" even if it didn't

Comment on lines +32 to +38
let objParent: Suite | null = obj.parent;

while (objParent) {
objParent.enable();

objParent = objParent.parent;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Besides enabling child test object, we should enable all of the parent ones

Copy link
Member

@DudaGod DudaGod left a comment

Choose a reason for hiding this comment

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

👍

@KuznetsovRoman KuznetsovRoman marked this pull request as draft August 19, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants