Add feature specs for note polling
Ref. #4032 (closed), !2084 (merged)
cc @rspeicher
Merge request reports
Activity
@rspeicher Added spinach test -- instead of adding this ugly waiting implementation, increased Capybara timeout to 15 seconds.
have_content
matcher will make Capybara try to find new note until driver timeouts.@stanhu, @rspeicher: After deeper investigation, unfortunately Timecop will not help here. Timecop mocks Ruby date objects, and what we actually need here is to scale time or travel into the future in javascripts consumed by WebKit driver that is being used by PhantomJS.
So, we need to mock javascript's time here -- maybe using Sinon.js is a good idea (Sinon has some javascript time-based mocking capabilities), but this would require injecting sinon.js into application (maybe only in test env), I'm not sure if it is a good idea and I wonder if it is worth giving a try. What do you think ?
@rspeicher Please review changes. Is it ok now ?
Added 86 commits:
- 39d5baa7...9451db38 - 81 commits from branch
master
- 7c14541d - Add feature specs for note polling
- 9470d05c - Add spinach test for note polling
- 3e789eab - Add minor fixes in note polling specs
- 6fb120d1 - Assign notes object to a variable
- 8fe821cf - Trigger notes refresh in specs instead of waiting for ajax
Toggle commit list- 39d5baa7...9451db38 - 81 commits from branch
mentioned in commit 4493d3fd
mentioned in commit nolith/gitlab-ce@401ab708
mentioned in commit nolith/gitlab-ce@45d29505