From 777cf256490ad79b7e0f7893105e7f2e4006be48 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Wed, 24 Mar 2021 19:40:28 +0530 Subject: [PATCH] Ensure extension is available on the path for Firefox tests (#9331) --- java/client/test/org/openqa/selenium/firefox/BUILD.bazel | 9 +++++++++ .../org/openqa/selenium/firefox/FirefoxProfileTest.java | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/java/client/test/org/openqa/selenium/firefox/BUILD.bazel b/java/client/test/org/openqa/selenium/firefox/BUILD.bazel index 81e3f667ddbe8..eb96e00f67be2 100644 --- a/java/client/test/org/openqa/selenium/firefox/BUILD.bazel +++ b/java/client/test/org/openqa/selenium/firefox/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_jvm_external//:defs.bzl", "artifact") +load("//common:defs.bzl", "copy_file") load("//java:defs.bzl", "java_selenium_test_suite", "java_test_suite") LARGE_TESTS = [ @@ -20,6 +21,7 @@ java_test_suite( data = [ "//third_party/firebug:firebug-1.5.0-fx.xpi", "//third_party/firebug:mooltipass-1.1.87.xpi", + ":firebug_xpi" ], deps = [ "//java/client/src/org/openqa/selenium/firefox", @@ -64,3 +66,10 @@ java_selenium_test_suite( artifact("org.mockito:mockito-core"), ], ) + +copy_file( + name = "firebug_xpi", + src = "//third_party/firebug:firebug-1.5.0-fx.xpi", + out = "firebug-1.5.0-fx.xpi", +) + diff --git a/java/client/test/org/openqa/selenium/firefox/FirefoxProfileTest.java b/java/client/test/org/openqa/selenium/firefox/FirefoxProfileTest.java index bdf3957fa2a58..12042d899536b 100644 --- a/java/client/test/org/openqa/selenium/firefox/FirefoxProfileTest.java +++ b/java/client/test/org/openqa/selenium/firefox/FirefoxProfileTest.java @@ -47,7 +47,7 @@ public class FirefoxProfileTest { private static final String FIREBUG_PATH = "third_party/firebug/firebug-1.5.0-fx.xpi"; private static final String FIREBUG_RESOURCE_PATH = - "/org/openqa/selenium/firefox/firebug-1.5.0-fx.xpi"; + "java/client/test/org/openqa/selenium/firefox/firebug-1.5.0-fx.xpi"; private static final String MOOLTIPASS_PATH = "third_party/firebug/mooltipass-1.1.87.xpi"; private FirefoxProfile profile; @@ -189,7 +189,6 @@ public void shouldInstallWebExtensionFromDirectory() throws IOException { } @Test - @Ignore("Need to figure out why files are not showing up") public void shouldInstallExtensionUsingClasspath() { profile.addExtension(FirefoxProfileTest.class, FIREBUG_RESOURCE_PATH); File profileDir = profile.layoutOnDisk();