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

Remove unnecessary sleep in tests #983

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Konboi
Copy link

@Konboi Konboi commented Nov 25, 2024

What this PR do ?

Capybara waits until the target elements to appear by default (Default is 2sec).
So, remove unnecessary sleep method to reduce CI time (a bit).

If the driver is capable of executing JavaScript, this method will wait for a set amount of time and continuously retry finding the element until either the element is found or the time expires. The length of time this method will wait is controlled through default_max_wait_time.

refs:
https://rubydoc.info/github/jnicklas/capybara/Capybara/Node/Actions#click_link-instance_method

Related Issues

No

Screenshots (if applicable)

No

Additional Notes (if any)

Also about default sleep is mentioned here https://github.com/teamcapybara/capybara?tab=readme-ov-file#asynchronous-javascript-ajax-and-friends

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