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

Persistence fix #944

Merged
merged 9 commits into from
Sep 30, 2019
Merged

Persistence fix #944

merged 9 commits into from
Sep 30, 2019

Conversation

alexcjohnson
Copy link
Collaborator

@alexcjohnson alexcjohnson commented Sep 27, 2019

Edge case discovered while writing persistence docs: failure when enabling/disabling persistence on an existing component.

As discussed with @byronz I also generalized some of our test methods to accept either an element or a CSS selector.

  • I have added entry in the CHANGELOG.md

find . -name "*.gz" | xargs pip install --no-cache-dir --ignore-installed && pip list | grep dash && cd ..
find . -name "*.gz" | xargs pip install --no-cache-dir --ignore-installed && cd ..
sed -i '/dash/d' requires-install.txt
pip install --no-cache-dir --ignore-installed .
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI @byronz - the issue I was having in this PR is related to the original one that led to the sed call during build-core: sometimes (seemingly at random) the dash-renderer we prepared in packages was being overwritten by a published one from PyPI - so I used essentially the same solution, but extended to dash-renderer by using the pattern /dash/d rather than /dash-/d.

Also I skipped creating a tarball for dash itself because (a) we already have everything we need here, dash has no build artifacts, and (b) that made it easier to modify its requirements.

dash_duo.wait_for_text_to_equal('#out', 'a')

dash_duo.find_element('#persistence-val').send_keys('s')
time.sleep(0.2)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see you've removed all the other sleep. Is this one special / still required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes - I'm expecting the same text both before and after the send_keys, so there's really nothing to wait for; I inserted an explicit wait just to ensure the keypress had fully registered.

Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet left a comment

Choose a reason for hiding this comment

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

One question about the left-behind time.sleep(0.2) otherwise this looks 💃

@alexcjohnson alexcjohnson merged commit d972c02 into dev Sep 30, 2019
@alexcjohnson alexcjohnson deleted the persistence-fix branch September 30, 2019 17:06
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