diff options
Diffstat (limited to 'devtools/client/inspector/animation/test/browser_animation_animation-list.js')
-rw-r--r-- | devtools/client/inspector/animation/test/browser_animation_animation-list.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/devtools/client/inspector/animation/test/browser_animation_animation-list.js b/devtools/client/inspector/animation/test/browser_animation_animation-list.js new file mode 100644 index 0000000000..4f2c4419b3 --- /dev/null +++ b/devtools/client/inspector/animation/test/browser_animation_animation-list.js @@ -0,0 +1,36 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test that whether animations ui could be displayed + +add_task(async function () { + await addTab(URL_ROOT + "doc_simple_animation.html"); + await removeAnimatedElementsExcept([".animated", ".long"]); + const { animationInspector, inspector, panel } = + await openAnimationInspector(); + + info("Checking animation list and items existence"); + ok( + panel.querySelector(".animation-list"), + "The animation-list is in the DOM" + ); + is( + panel.querySelectorAll(".animation-list .animation-item").length, + animationInspector.state.animations.length, + "The number of animations displayed matches the number of animations" + ); + + info( + "Checking list and items existence after select a element which has an animation" + ); + await selectNode(".animated", inspector); + await waitUntil( + () => panel.querySelectorAll(".animation-list .animation-item").length === 1 + ); + ok( + true, + "The number of animations displayed should be 1 for .animated element" + ); +}); |