Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/recruiting-webapp:master commit in: features/, app/views/taglibs/
Date: Thu, 02 Jun 2011 17:18:40
Message-Id: 4e31553a3b85871e8f7305b1e1ffb931bba0a82d.betelgeuse@gentoo
1 commit: 4e31553a3b85871e8f7305b1e1ffb931bba0a82d
2 Author: Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
3 AuthorDate: Tue May 31 11:12:07 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 1 11:46:51 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/recruiting-webapp.git;a=commit;h=4e31553a
7
8 Don't show (Not available) card on answer pages
9
10 The application showed (Not available) card when someone viewed answer
11 for question with no reference answer. Then the reference answer was
12 nil. Anyone could view nil, but it was shown as (Not available) card. Fix bug:
13 https://bugs.gentoo.org/show_bug.cgi?id=368179
14
15 ---
16 app/views/taglibs/detailed.dryml | 2 +-
17 features/clean_ui.feature | 7 +++++++
18 2 files changed, 8 insertions(+), 1 deletions(-)
19
20 diff --git a/app/views/taglibs/detailed.dryml b/app/views/taglibs/detailed.dryml
21 index ceb8dc9..f36882a 100644
22 --- a/app/views/taglibs/detailed.dryml
23 +++ b/app/views/taglibs/detailed.dryml
24 @@ -31,7 +31,7 @@
25 </div>
26
27 <with:question.reference_answer param="reference-answer">
28 - <card if="&can_view?">
29 + <card if="& this and can_view?">
30 <header:>
31 <h5>Reference answer:</h5>
32 </header:>
33
34 diff --git a/features/clean_ui.feature b/features/clean_ui.feature
35 index f475abf..df2ec9f 100644
36 --- a/features/clean_ui.feature
37 +++ b/features/clean_ui.feature
38 @@ -101,3 +101,10 @@ Feature: Clean UI
39 Then I should see "Enter one requirement per line."
40 And I should see "Each requirement should be 'Field : regexp to match' (including spaces around colon)."
41 And I should see "If you want to use colon in field and regexp then escape it with backslash."
42 +
43 + Scenario: Don't show '(Not Available)' on the answer page
44 + Given a question "question"
45 + And "recruit" answered question "question"
46 + When I am logged in as "recruit"
47 + And I am on answer of "recruit" for question "question" page
48 + Then I should not see "(Not Available)"