Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Milan
diaspora
Commits
66944853
Commit
66944853
authored
Feb 01, 2011
by
zhitomirskiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the cucumber feature back in
parent
34e5ba99
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
features/saved_state.feature
features/saved_state.feature
+56
-0
features/step_definitions/user_steps.rb
features/step_definitions/user_steps.rb
+12
-0
No files found.
features/saved_state.feature
0 → 100644
View file @
66944853
@javascript
Feature
:
saved state
Scenario
:
open aspects persist across sessions
Given
I am signed in
And
I have an aspect called
"Open 1"
And
I have an aspect called
"Closed 1"
And
I have an aspect called
"Closed 2"
And
I have an aspect called
"Open 2"
And
I am on the aspects page
When
I follow
"Open 1"
And
I follow
"Open 2"
Then
I should have aspect
"Open 1"
"selected"
Then
I should have aspect
"Open 2"
"selected"
Then
I should have aspect
"Closed 1"
"not selected"
Then
I should have aspect
"Closed 2"
"not selected"
And
I click on my name in the header
And
I follow
"logout"
And
I go to the new user session page
And
I am signed in
Then
I should be on the aspects page
Then
I should have aspect
"Open 1"
"selected"
But
I should have aspect
"Open 2"
"selected"
But
I should have aspect
"Closed 1"
"not selected"
But
I should have aspect
"Closed 2"
"not selected"
And
I follow
"Home"
Then
I should have aspect
"Home"
"selected"
Scenario
:
home persists across sessions
Given
I am signed in
And
I have an aspect called
"Closed 1"
And
I have an aspect called
"Closed 2"
And
I am on the aspects page
When
I follow
"Closed 1"
When
I follow
"Home"
Then
I should have aspect
"Home"
"selected"
Then
I should have aspect
"Closed 1"
"not selected"
Then
I should have aspect
"Closed 2"
"not selected"
And
I click on my name in the header
And
I follow
"logout"
And
I go to the new user session page
And
I am signed in
Then
I should be on the aspects page
Then
I should have aspect
"Home"
"selected"
Then
I should have aspect
"Closed 1"
"not selected"
Then
I should have aspect
"Closed 2"
"not selected"
features/step_definitions/user_steps.rb
View file @
66944853
...
...
@@ -71,3 +71,15 @@ end
When
/^I click on the contact request$/
do
find
(
".person.request.ui-draggable a"
).
click
end
Then
/^I should have aspect "([^"]*)" "([^"]*)"$/
do
|
arg1
,
arg2
|
val
=
evaluate_script
(
"$('a:contains(
\"
#{
arg1
}
\"
)').parent('li').hasClass('selected');"
)
#
if
arg2
==
"selected"
val
.
should
==
true
elsif
arg2
==
"not selected"
val
.
should
==
false
else
raise
"Aspect state should either be 'selected' or 'not selected'"
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment