smoke.js | Small but good javascript smoke effect
kandi X-RAY | smoke.js Summary
kandi X-RAY | smoke.js Summary
Small but good javascript smoke effect 🌬💨
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of smoke.js
smoke.js Key Features
smoke.js Examples and Code Snippets
Community Discussions
Trending Discussions on smoke.js
QUESTION
I am using the waitForElementVisible(, , false)
command from the Nightwatch API docs and it is not behaving quite like I expected. How can I tweak this code in order to get the intended behavior?
Intended behavior:
- call
.waitForElementVisible('foobar', 10, false)
- see command fail and continue execution with the next command
- all other commands pass
- see exit status of 0 from script
Actual behavior:
- call
.waitForElementVisible('foobar', 10, false)
- see command fail and continue execution with the next command
- all other commands pass
- see exit status of 1 from script
Here is example code to reproduce
...ANSWER
Answered 2019-Feb-21 at 10:47Yes, and that's the way it should be! I think you misinterpreted the way the abortOnFailure
flag works for the waitForVisible command. The false
flag only gives the method the character to be evaluated by the test-runner as a non-breaking
step. But that doesn't mean it doesn't keep count of that step as being a failed step.
Note: A similar thing happens in the assert/verify case (where verify
is a non-breaking assertion, similar to the abortOnFailure: false
parameter for waitForElementVisible
).
I can see where one would get that impression though. If you read the API call's description it said:
If the element fails to be present and visible in the specified amount of time, the test fails. You can change this by setting abortOnFailure to false.
Which leaves you thinking that perhaps the test will end up passing, even though the waitForVisible
command failed. But... the Parameters section of the API call comes to our aid, removing that false assumption:
By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. To set this globally you can define a property abortOnAssertionFailure in your globals.
Lastly... where the DOCs might fail you, the code will never lie:
QUESTION
Ok so I have a list nav
that navigates to a certain slide with carousel slide, the smoke.js loads up when the site is visited and starts automatically which is what I want, but when they click on any of the nav
buttons other than the "Home" button, I need it to end the smoke animation, and if they click the home button to go back to the home slide, I need it to restart the smoke machine. How can I do that?
The codepen for smoke.js here codepen:
...ANSWER
Answered 2018-Dec-11 at 06:55If you check the documentation of the smoke.js plugin on GitHub, you will see that there are two methods: start()
(that starts the smoke) and stop()
(that stops it). So what you want to do is call party.stop()
when the navigation is clicked and it was not the home one, and party.start()
if it was the home option.
Something like this (my code is at the top):
Notice: the
.stop()
method will stop the smoke but it want delete the existing smoke, it's more like a pause. It is unclear if you also want to remove the existing smoke, but if you need to do it, you can follow the instructions on this question to clean thecanvas
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install smoke.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page