-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f62a4d
commit 7c55654
Showing
4 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
cypress/integration/settings_disableMutationObserver_spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
describe('setting: disableMutationObserver', function() { | ||
before(() => { | ||
cy.visit('/async.html'); | ||
cy.initAOS({ | ||
disableMutationObserver: true | ||
}); | ||
}); | ||
|
||
it('Should not detect any changes in DOM, and thus not animate any elements as a result', function() { | ||
cy.dispatchEvent('add-aos-item', 20); | ||
cy.get('.aos-item').should('have.length', 20); | ||
cy.get('.aos-animate').should('have.length', 0); | ||
}); | ||
|
||
it('Should not animate dynamically loaded elements on scroll', function() { | ||
cy.scrollTo('bottom'); | ||
cy.get('.aos-animate').should('have.length', 0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7c55654
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautiful animations and job! I have one question - is it possible to activate them 1 time per page load? So when animation plays and you scroll back to the top and to the bottom - so animations will not repeat themselves unless you reload the page?
7c55654
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ska89abv that is a question I'm also interested in!