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

[Gecko Bug 1470530] [wdspec] Allow parametrization of "session" fixture and remove global "new_session" fixture. #11977

Merged
merged 4 commits into from Jul 13, 2018

Conversation

moz-wptsync-bot
Copy link
Collaborator

With this patch the "session" fixture will make use of the
new "capabilities" fixture to create WebDriver sessions with
custom capabilities. It means the separate "new_session"
fixture is no longer needed.

Further the "session" fixture will only create a new session
when the specified capabilities are different from the
requested capabilities of the current session.

To make it easier for tests to specify custom capabilities
a marker with the same name has been created. It accepts
a dict of capabilities as argument, and will then parametrize
the current test.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1470530
gecko-commit: 1ec59d0783a52165b9d7b8e8c9b57e6ff9fde42b
gecko-integration-branch: central
gecko-reviewers: ato

moz-wptsync-bot and others added 4 commits July 13, 2018 17:12
… "new_session" fixture.

With this patch the "session" fixture will make use of the
new "capabilities" fixture to create WebDriver sessions with
custom capabilities. It means the separate "new_session"
fixture is no longer needed.

Further the "session" fixture will only create a new session
when the specified capabilities are different from the
requested capabilities of the current session.

To make it easier for tests to specify custom capabilities
a marker with the same name has been created. It accepts
a dict of capabilities as argument, and will then parametrize
the current test.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1470530
gecko-commit: 1ec59d0783a52165b9d7b8e8c9b57e6ff9fde42b
gecko-integration-branch: central
gecko-reviewers: ato
With the WebDriver session created by the "session" fixture,
there is no need anymore to pass a session instance to one
of those methods. Instead the appropriate fixture can be used.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1470530
gecko-commit: 2732ac33aac97da3f8f6b7d2fd7f8c748edc72fb
gecko-integration-branch: central
gecko-reviewers: ato
The "add_browser_capabilities" fixture is only used for new session tests,
and as such makes sense to only expose the fixture for that specific
sub directory.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1470530
gecko-commit: bbccc02967d3eabdc30b32f4b33370c2a2a5d936
gecko-integration-branch: central
gecko-reviewers: ato
By using yield for returning the session, there is no need to define
all the finalizers. Instead those can be called right after the line
with yield.

To ease the usage of clean-up all individual clean-up methods are
now called by the "cleanup_session" method in the correct order.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1470530
gecko-commit: ea72ff9a6e23abf3aa52aaaf06a9ba8b18ca39c7
gecko-integration-branch: central
gecko-reviewers: ato
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

Already reviewed downstream.

@jgraham
Copy link
Contributor

jgraham commented Jul 13, 2018

Stability check will time out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants