Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diaspora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Milan
diaspora
Commits
b048d1dd
Commit
b048d1dd
authored
13 years ago
by
Gonzalo Rodriguez
Browse files
Options
Downloads
Patches
Plain Diff
When deleting an aspect from contacts page do not redirect to aspects page
parent
5b51dde1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/aspects_controller.rb
+4
-1
4 additions, 1 deletion
app/controllers/aspects_controller.rb
features/manages_aspects.feature
+12
-0
12 additions, 0 deletions
features/manages_aspects.feature
with
16 additions
and
1 deletion
app/controllers/aspects_controller.rb
+
4
−
1
View file @
b048d1dd
...
...
@@ -98,9 +98,12 @@ class AspectsController < ApplicationController
begin
@aspect
.
destroy
flash
[
:notice
]
=
I18n
.
t
'aspects.destroy.success'
,
:name
=>
@aspect
.
name
redirect_to
aspects_path
rescue
ActiveRecord
::
StatementInvalid
=>
e
flash
[
:error
]
=
I18n
.
t
'aspects.destroy.failure'
,
:name
=>
@aspect
.
name
end
if
request
.
referer
.
include?
(
'contacts'
)
redirect_to
contacts_path
else
redirect_to
aspects_path
end
end
...
...
This diff is collapsed.
Click to expand it.
features/manages_aspects.feature
+
12
−
0
View file @
b048d1dd
...
...
@@ -19,6 +19,18 @@ Feature: User manages contacts
And
I press
"Create"
in the modal window
Then
I should see
"losers"
within
"#aspect_nav"
Scenario
:
deleting an aspect from contacts index
Given
I am signed in
And
I have an aspect called
"People"
When
I am on the contacts page
And
I follow
"People"
And
I follow
"Edit People"
And
I wait for the ajax to finish
And
I click ok in the confirm dialog to appear next
And
I press
"Delete"
in the modal window
Then
I should be on the contacts page
And
I should not see
"People"
within
"#aspect_nav"
Scenario
:
Editing the aspect memberships of a contact from the aspect edit facebox
Given
I am signed in
And
I have 2 contacts
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment