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

Use a block to travel in time in specs #3797

Merged
merged 1 commit into from
Oct 24, 2019
Merged

Use a block to travel in time in specs #3797

merged 1 commit into from
Oct 24, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Oct 24, 2019

Background

Since 15 hours ago a test is failing on Travis, for unknown causes. It's making many tests fail because it travels in time but never travels back.

Objectives

Make tests travelling in time go back even if they fail.

Notes

The following test is failing on every Travis build in the last hours, no matter if the build is based on an old branch:

1) Proposal Notifications Use time traveling to make sure notifications can be sent after time interval
     Failure/Error: expect(page).to have_content "Your message has been sent correctly."
       expected to find text "Your message has been sent correctly." in "CONSUL Language: Deutsch English Español Français Nederlands Português brasileiro 中文 Menu Notifications You don't have new notifications My content My account Sign out Debates Proposals Voting Collaborative legislation Participatory budgeting Help Debates Proposals Voting Collaborative legislation Participatory budgeting Help Go back Send message This message will be sent to 0 people and it will be visible in the proposal's page. Messages are not sent immediately, users will receive periodically an email with all proposal notifications. × 1 error prevented this Notification from being saved. Please check the marked fields to know how to correct them: TitleYou have to wait a minimum of 3 days between notifications Message Please share it again with others so we can make it happen! Open government This portal uses the CONSUL application which is open-source software. For technical assistance visit Participation Decide how to shape the city you want to live in. CONSUL, 2019 | Privacy Policy | Terms and conditions of use | Accessibility"
     # ./spec/features/proposal_notifications_spec.rb:23:in `block (3 levels) in <top (required)>'
     # ./spec/features/proposal_notifications_spec.rb:17:in `block (2 levels) in <top (required)>'

If we don't use a block, if the spec fails the `travel_back` method
isn't executed.
@javierm javierm added the Specs label Oct 24, 2019
@javierm javierm self-assigned this Oct 24, 2019
@javierm javierm added this to Reviewing in Roadmap via automation Oct 24, 2019
@javierm
Copy link
Member Author

javierm commented Oct 24, 2019

Travis failure is not related to this pull request; the test this pull request is isolating was already failing.

@javierm javierm merged commit b8abf52 into master Oct 24, 2019
Roadmap automation moved this from Reviewing to Release 1.1.0 Oct 24, 2019
@javierm javierm deleted the use_block_in_travel branch October 24, 2019 18:10
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

1 participant