Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

fix(tests): add geckodriver support#4013

Closed
vladikoff wants to merge 1 commit intomasterfrom
i3995
Closed

fix(tests): add geckodriver support#4013
vladikoff wants to merge 1 commit intomasterfrom
i3995

Conversation

@vladikoff
Copy link
Contributor

@vladikoff vladikoff commented Aug 3, 2016

Fixes #3995

@vladikoff
Copy link
Contributor Author

@shane-tomlinson could you please check if you get something like this:

➜  fxa-content-server git:(i3995) npm run test-functional

> fxa-content-server@0.66.0 test-functional /Users/vladikoff/mozilla/fxa-local-dev/fxa-content-server
> intern-runner config=tests/intern_functional

Creating Firefox profile...
Listening on 0.0.0.0:9090
Tunnel started
‣ Created session firefox on any platform (880267c5-23cc-46e6-af75-c31af16b55b6)
Suite firefox on any platform - sign_in FAILED
JavaScriptError: [POST http://localhost:4444/wd/hub/session/880267c5-23cc-46e6-af75-c31af16b55b6/execute / {"script":"return (function () {\n        try {\n          localStorage.clear();\n          sessionStorage.clear();\n        } catch (e) {\n          console.log('Failed to clearBrowserState');\n          // if cookies are disabled, this will blow up some browsers.\n        }\n        return true;\n      }).apply(this, arguments);","args":[]}] Permission denied to access property "__raven_wrapper__" (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8 milliseconds
Build info: version: '3.0.0-beta2', revision: '2aa21c1', time: '2016-08-02 15:03:28 -0700'
System info: host: 'vladikoff-2', ip: '192.168.1.174', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_92'

@shane-tomlinson
Copy link

shane-tomlinson commented Aug 4, 2016

Yup, I see the same problem, it keeps complaining about accessing __raven_wrapper__. If I create a mock raven, the tests run beautifully.

diff --git a/app/scripts/lib/raven-mock.js b/app/scripts/lib/raven-mock.js
new file mode 100644
index 0000000..e423528
--- /dev/null
+++ b/app/scripts/lib/raven-mock.js
@@ -0,0 +1,19 @@
+define(function (require, exports, module) {
+  'use strict';
+
+  return {
+    captureException (err, extraContext) {
+      console.error(String(err), extraContext);
+    },
+
+    config () {
+      return this;
+    },
+
+    install () {
+    },
+
+    uninstall () {
+    }
+  }
+});
diff --git a/app/scripts/require_config.js b/app/scripts/require_config.js
index 8d9d24c..12774e8 100644
--- a/app/scripts/require_config.js
+++ b/app/scripts/require_config.js
@@ -41,7 +41,9 @@ require.config({
     nocache: 'lib/requirejs-plugin-nocache',
     passwordcheck: '../bower_components/fxa-password-strength-checker/build/fxa-password-strength-checker',
     'p-promise': '../bower_components/p/p',
-    raven: '../bower_components/raven-js/dist/raven',
+    //raven: '../bower_components/raven-js/dist/raven',
+    raven: 'lib/raven-mock',
+
     sinon: '../bower_components/sinon/index',
     sjcl: '../bower_components/sjcl/sjcl',
     speedTrap: '../bower_components/speed-trap/dist/speed-trap',

@shane-tomlinson
Copy link

I spoke too soon, I eventaully start seeing this error:

this.browser.getBrowserForTab is not a function

@shane-tomlinson
Copy link

shane-tomlinson commented Aug 4, 2016

Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1290966 Fix openedupdated 41 mins ago.

@shane-tomlinson
Copy link

@shane-tomlinson
Copy link

@shane-tomlinson
Copy link

Our avatar upload tests suffer from mozilla/geckodriver#168

@shane-tomlinson
Copy link

Ref mozilla/geckodriver#176 - Any executeAsync call that we expect to timeout fails due to an unexpected error message being returned.

myProfile.setPreference('xpinstall.signatures.required', false);
// Firefox 48+ requires marionette settngs
myProfile.setPreference('marionette', true);
myProfile.setPreference('webdriver.gecko.driver', path.join(__dirname, 'node_modules', 'geckodriver', 'geckodriver'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this doesn't really work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants