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

[V4] Use API visibility for Carousel #17710

Closed
wants to merge 1 commit into from
Closed

[V4] Use API visibility for Carousel #17710

wants to merge 1 commit into from

Conversation

Johann-S
Copy link
Member

Hi,

this feature is for the carousel plugin to stop cycling when the page isn't visible

I re used your code @cvrebert to made my PR

I had a test unit but I think it's a bit hard to test that, if someone have a better idea how I can test that please let me know.
Because my test case is easy to test on a browser but difficult on Travis

X-Ref : #17706

@Johann-S
Copy link
Member Author

I think it would be more revelant to see how it's work in visual/carousel.html because it's hard to have a unit test for this feature.
Any thoughts about this @cvrebert ?

@cvrebert
Copy link
Collaborator

@Johann-S I agree, it's not feasible to automatically unit test this. I think a visual test that listens for the slid.bs.carousel event and logs timestamps is the way to go.

<script type="text/javascript">
<!-- JavaScript Test -->
$(function () {
// Test to show that the carrousel don't slide when the current tab isn't visible
Copy link
Collaborator

Choose a reason for hiding this comment

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

"carousel doesn't"

@cvrebert
Copy link
Collaborator

Should add a note to the test, e.g.:

<p>Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.</p>

@Johann-S
Copy link
Member Author

Johann-S commented Oct 1, 2015

Done.
If you have other feedbacks let me know

@cvrebert cvrebert self-assigned this Oct 9, 2015
cvrebert pushed a commit that referenced this pull request Oct 11, 2015
Avoids cycling carousels when the page isn't visible.
Closes #17710
Refs #15566
cvrebert added a commit that referenced this pull request Oct 11, 2015
@cvrebert
Copy link
Collaborator

Merged as 817d997.
Sorry for the delay. Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

2 participants