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 race condition in test of splash page versioning #2703

Conversation

AndrewKvalheim
Copy link
Member

@AndrewKvalheim AndrewKvalheim commented Nov 2, 2020

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the upstream master branch.
  • The tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • I have added necessary documentation (if appropriate).

Short description of what this resolves

A feature test currently fails intermittently due to a race condition in which the version history is viewed prior to the completion of a versioned change:

click_link 'Delete'
page.accept_alert
visit admin_revision_history_path
expect(page).to have_text("#{organizer.name} created new splashpage with ID #{splashpage_id} in conference #{conference.short_title}")

$ rspec 'spec/features/versions_spec.rb:234'

Failures:

1) Version display changes in splashpages
    Failure/Error: expect(page).to have_text("#{organizer.name} created new splashpage with ID #{splashpage_id} in conference #{conference.short_title}")
    expected to find text "name50 created new splashpage with ID 1 in conference yvXgaw" in "…name50 created new splashpage in conference yvXgaw less than a minute ago…'

Note that the missing text "with ID" is rendered only for deleted items.

Changes proposed in this pull request

Wait for the change to complete.

Resolves:

    $ rspec spec/features/versions_spec.rb:234
    …
    Failures:

    1) Version display changes in splashpages
        Failure/Error: expect(page).to have_text("#{organizer.name} created new splashpage with ID #{splashpage_id} in conference #{conference.short_title}")
        expected to find text "name50 created new splashpage with ID 1 in conference yvXgaw" in "…name50 created new splashpage in conference yvXgaw less than a minute ago…'
@hennevogel
Copy link
Member

This is in #2723 now, although disabled.

@hennevogel hennevogel closed this Mar 6, 2021
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this pull request Mar 9, 2022
This reverts the changes to `spec/features/versions_spec.rb` made in
commit b688d35, except for the change
that was proposed in issue openSUSE#2703.
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