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

Whitelist origin & Ng waitForApi fix #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Hengjie
Copy link

@Hengjie Hengjie commented Aug 13, 2015

Fixes #18
Fixes #17

@Hengjie Hengjie changed the title Whitelist origin & Ng apiResolve fix Whitelist origin & Ng waitForApi fix Aug 13, 2015
…ise will cause it to fail immediately.

This allows it to fail gracefully in a Promise-like manner, in order for developer to handle rejection in their own particular way
@Hengjie
Copy link
Author

Hengjie commented Aug 16, 2015

No problem with adding tests, but how do you run them?

@ofirdagan
Copy link
Owner

After you run

bower install
npm install

you should run

grunt serve

This will run a local server on port 9000 and will run the unit tests on each file save.
let me know if you need any help.

@Hengjie
Copy link
Author

Hengjie commented Aug 21, 2015

I've pushed some fixes based on your comments. I'm having trouble running specs, right now it's output is:

cross-domain-local-storage aaaaaaaaaa$ grunt karma:unit
Running "karma:unit" (karma) task
WARN [watcher]: Pattern "/Users/aaaaaaaaaa/Development/cross-domain-local-storage/bower_components/jquery/jquery.js" does not match any file.
WARN [watcher]: Pattern "/Users/aaaaaaaaaa/Development/cross-domain-local-storage/{app,.tmp}/*.js" does not match any file.
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket y-J1aqY90khSlzMv3317 with id 40364913
PhantomJS 1.9.8 (Mac OS X 0.0.0) xdLocalStorage test should get item after init FAILED
  Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 6 of 6 (1 FAILED) (5.003 secs / 5.01 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.


Execution Time (2015-08-21 01:28:55 UTC)
karma:unit  6.9s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 6.9s

cross-domain-local-storage aaaaaaaaaa$

@Hengjie
Copy link
Author

Hengjie commented Aug 21, 2015

What's odd is that init works fine when I'm testing on staging env.

@ofirdagan
Copy link
Owner

if you run

grunt serve --force

then you can debug the test if you open the browser on this page: localhost:8880/debug.html

I'll try to take a look and see what does this test fails

For example, if LS is disabled by browser
@gligoran
Copy link

How come this never got merged in? The allowed origin functionality would be really nice to have.

@Hengjie
Copy link
Author

Hengjie commented Feb 5, 2016

Because I didn't have specs for it. I no longer have time to write specs, can someone please take over it?

I agree, I think the changes are rather important since origin whitelisting is a best practice for xd communication.

@ofirdagan
Copy link
Owner

it has a branch conflict. once it's resolved I'll merge it in

@Hengjie
Copy link
Author

Hengjie commented Jul 18, 2016

@ofirdagan would you be okay to merge without specs if the conflicts were resolved?

@ofirdagan
Copy link
Owner

yup

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

Successfully merging this pull request may close these issues.

3 participants