Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Fix tests #41

Merged
merged 10 commits into from
Sep 27, 2016
Merged

Fix tests #41

merged 10 commits into from
Sep 27, 2016

Conversation

locks
Copy link
Contributor

@locks locks commented Aug 11, 2016

Fixes #23. Fixes #31. Fixes #36. Fixes #45.

I believe this will require a major version bump, as the facepile component had to be removed due to the API being deprecated by Facebook. You can see more detail in the related commit message.
Twitter's share component also got the counts removed.

@ksin
Copy link
Contributor

ksin commented Aug 11, 2016

Thanks @locks ! Just tagging this issue here: #23

@ksin
Copy link
Contributor

ksin commented Aug 11, 2016

Can you also remove the facepile docs in the README?

@locks
Copy link
Contributor Author

locks commented Aug 11, 2016

Will do! We still have some failing tests, I believe due to CSP, investigating.

@anvyst
Copy link

anvyst commented Sep 2, 2016

My attempt trying to debug the issue with failed tests ended up with the following results.

The problems start with:

Ember.$.getScript("//platform.linkedin.com/in.js?async=true", function success() {
       IN.shareHandlerName = shareHandlerName;
       IN.Event.on(IN, 'systemReady', Ember.run.bind(null, resolve, IN));
       IN.init();
});

It loads couple of nasty JS files and one of them (secureAnonymousFramework) breaks the tests:

not ok 14 PhantomJS 1.9 - Global error: Script error. at , line 0
    ---
        Log: |
            { type: 'error', text: 'Script error. at , line 0\n' }

In the browser It'd look like:
Uncaught TypeError: Cannot read property 'Function' of undefined secureAnonymousFramework?v=0.0.2000-RC8.57838-1429&:1033

Going deeper in the code, it breaks on Sslac.Function(...)

At the same time, if you load dummy/app /linkedin/share page, the above script loads properly and hooks Sslac to window object.
Unfortunately, I couldn't find the reason it doesn't hook to window when it's run via ember test -s.

@locks
Copy link
Contributor Author

locks commented Sep 27, 2016

As @anvyst mentions, the manual tests seem to work but not the automated ones. Thoughts on how to proceed? :X

@locks locks merged commit e435b31 into master Sep 27, 2016
@locks locks deleted the fix-tests branch September 27, 2016 00:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants