
When first sync template is displayed, user usually doesn't have any repos, which also triggers rendering of getting started template. The fix for this is to handle the action to render getting started page on first sync and do nothing in such case. I also added a test to ensure that it works correctly.
27 lines
745 B
CoffeeScript
27 lines
745 B
CoffeeScript
module "Sync",
|
|
setup: ->
|
|
Ember.run -> Travis.advanceReadiness()
|
|
teardown: ->
|
|
Ember.run -> Travis.reset()
|
|
|
|
test "first sync page is show when user just signed up and is syncing", ->
|
|
Ember.run ->
|
|
signInUser(
|
|
is_syncing: true
|
|
synced_at: null
|
|
login: 'new-user'
|
|
)
|
|
|
|
Travis.config.syncingPageRedirectionTime = 100
|
|
|
|
wait().then ->
|
|
ok $('#first_sync').text().match(/Just a few more seconds as we talk to GitHub to find out which repositories belong to you./)
|
|
|
|
stop()
|
|
Travis.__container__.lookup('controller:currentUser').get('content').set('isSyncing', false)
|
|
setTimeout ->
|
|
start()
|
|
visit('/').then ->
|
|
ok $('#getting-started').text().match(/Welcome to Travis CI!/)
|
|
, 120
|