From d6cbdba40190e9cb633a3e1709ef5636f487a258 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 2 Sep 2015 13:13:34 +0200 Subject: [PATCH] [specs] Fix repo owner tile test --- app/components/ssh-key.coffee | 1 - app/templates/components/owner-repo-tile.hbs | 2 +- tests/unit/components/owner-repo-tile-test.coffee | 12 +++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/components/ssh-key.coffee b/app/components/ssh-key.coffee index 33475041..d17b3a03 100644 --- a/app/components/ssh-key.coffee +++ b/app/components/ssh-key.coffee @@ -17,5 +17,4 @@ SshKeyComponent = Ember.Component.extend @get('key').save().then(deletingDone, deletingDone).then => @sendAction('sshKeyDeleted') - `export default SshKeyComponent` diff --git a/app/templates/components/owner-repo-tile.hbs b/app/templates/components/owner-repo-tile.hbs index 5b79dc44..e67440c4 100644 --- a/app/templates/components/owner-repo-tile.hbs +++ b/app/templates/components/owner-repo-tile.hbs @@ -31,7 +31,7 @@
{{repo.default_branch.last_build.state}} - {{format-time repo.default_branch.last_build.finished_at}} + {{format-time repo.default_branch.last_build.finished_at}}
{{else}}

there is no build

diff --git a/tests/unit/components/owner-repo-tile-test.coffee b/tests/unit/components/owner-repo-tile-test.coffee index b96e89ed..7b705ddf 100644 --- a/tests/unit/components/owner-repo-tile-test.coffee +++ b/tests/unit/components/owner-repo-tile-test.coffee @@ -35,10 +35,8 @@ test 'it renders', -> @append() ok component.$().hasClass('passed'), 'component should have state class (passed)' - ok component.$('.icon-status').hasClass('passed'), 'status icon should have state class (passed)' - ok component.$('.request-kind').hasClass('push'), 'reuqest icon should have event type class (push)' - equal component.$('.tile-main h2 a').text().trim(), 'travis-chat', 'should display correct repo name' - equal component.$('.build-status a').text().trim(), '25 passed', 'should display correct build number and state' - equal component.$('.tile-commit a').text().trim(), '16fff34', 'should display correct commit sha' - equal component.$('.tile-timeago').text().trim(), '2 years ago', 'should display correct build duration' - equal component.$('.tile-duration').text().trim(), '4 min 12 sec', 'should display correct build finished at time' + equal component.$('.repo-title a').text().trim(), 'travis-chat', 'should display correct repo name' + equal component.$('.build a').text().trim(), '25', 'should display correct build numbee' + equal component.$('.build-status').text().trim(), 'passed', 'should display a last build state' + equal component.$('.commit a').text().trim(), '16fff34', 'should display correct commit sha' + equal component.$('.finished-at').text().trim(), '2 years ago', 'should display correct build duration'