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

Update dependencies #59

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

Conversation

mcfiredrill
Copy link
Collaborator

@mcfiredrill mcfiredrill commented Apr 11, 2019

I think I got everything working on the latest versions of ember.

I also

Still working on getting the tests passing...

@mcfiredrill
Copy link
Collaborator Author

Not sure if I should take anything from this branch as well
#58

add ember-cli-htmlbars to deps as its required for addons with templates
* Add an integration test for rendering the component, I left one unit
test for checking the default settings.

* Moved the cache to app/storages like the docs for ember-cli-local
storage suggest, probably should rename this to something like
ember-lazy-image-cache.

* Removed other code from the component that seemed unused.
@mcfiredrill
Copy link
Collaborator Author

mcfiredrill commented Sep 15, 2019

I've almost got the tests passing, down to two failures:

Integration | Component | lazy-image: it leverages cache 
Expected: | {   "viaplaceholdercom150": true }
-- | --
{}
{   "viaplaceholdercom150": true }
at Object.<anonymous> (http://localhost:7357/assets/tests.js:85:14)

Not sure what the issue is with this one, if I look at the local storage in the devtools after the tests run I can see the cache is set properly.

I tried wrapping the check for the cache in waitUntil, but that didn't help.

I think this has to do with whether didEnterViewport fired or not.

Integration | Component | lazy-image: passing class names for the <img> element
Expected: | "lazy-image-container lazy-image img-responsive image-thumbnail"
-- | --
"img-responsive image-thumbnail"
"lazy-image-container lazy-image img-responsive image-thumbnail"
at Object.<anonymous> (http://localhost:7357/assets/tests.js:142:14)

I thought passing the class attribute to a component would concatenate with the classNames property automatically, but apparently not...?

@mcfiredrill
Copy link
Collaborator Author

Fixed the image classes test. I realized it was checking the class of the tag, not the component's tag.

The cache test should be working now, but still seems a little flakey sometimes.

@mcfiredrill mcfiredrill self-assigned this Nov 25, 2019
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.

2 participants