Skip to content

Commit

Permalink
[py] Update extension in the tests to use the common extensions (#10478)
Browse files Browse the repository at this point in the history
* [py] Update extension in the tests to use the common extensions

Removes C-py tag from #10266

* fix: updated py BUILD.bazel merge issue

Co-authored-by: Puja Jagani <[email protected]>
SinghHrmn and pujagani authored Apr 6, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent aa88b5c commit dad6f8c
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions common/extensions/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ filegroup(
"//java/test/org/openqa/selenium/environment:__pkg__",
"//java/test/org/openqa/selenium/firefox:__pkg__",
"//javascript/node/selenium-webdriver:__pkg__",
"//py:__pkg__",
],
)

@@ -19,5 +20,6 @@ exports_files(
],
visibility = [
"//java/test/org/openqa/selenium/firefox:__pkg__",
"//py:__pkg__",
],
)
8 changes: 4 additions & 4 deletions py/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -67,8 +67,8 @@ copy_file(

copy_file(
name = "favourite_color",
src = "//third_party/firebug:favourite_colour-1.1-an+fx.xpi",
out = "test/selenium/webdriver/firefox/favourite_colour-1.1-an+fx.xpi",
src = "//common/extensions:webextensions-selenium-example.xpi",
out = "test/selenium/webdriver/firefox/webextensions-selenium-example.xpi",
)

py_library(
@@ -345,7 +345,7 @@ py_test_suite(
"--driver=firefox",
],
data = [
"//third_party/firebug:favourite_colour-1.1-an+fx.xpi",
"//common/extensions",
],
tags = [
"no-sandbox",
@@ -370,7 +370,7 @@ py_test_suite(
],
data = [
"//java/src/org/openqa/selenium/grid:selenium_server_deploy.jar",
"//third_party/firebug:favourite_colour-1.1-an+fx.xpi",
"//common/extensions",
],
tags = [
"no-sandbox",
10 changes: 5 additions & 5 deletions py/test/selenium/webdriver/firefox/ff_installs_addons_tests.py
Original file line number Diff line number Diff line change
@@ -22,23 +22,23 @@

def test_install_addon_temporary(driver):
extension = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'favourite_colour-1.1-an+fx.xpi')
'webextensions-selenium-example.xpi')

id = driver.install_addon(extension, True)
assert id == '[email protected]'
assert id == '[email protected]'


def test_install_addon(driver):
extension = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'favourite_colour-1.1-an+fx.xpi')
'webextensions-selenium-example.xpi')

id = driver.install_addon(extension, False)
assert id == '[email protected]'
assert id == '[email protected]'


def test_uninstall_addon(driver):
extension = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'favourite_colour-1.1-an+fx.xpi')
'webextensions-selenium-example.xpi')

id = driver.install_addon(extension)
try:

0 comments on commit dad6f8c

Please sign in to comment.