Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KG - Remove (Commented Out) 'Compose Message' Button #419

Merged
merged 1 commit into from
May 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/views/dashboard/notifications/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

.col-xs-12.tabs{role: 'tabpanel'}
.col-xs-2#notification_tabs{data: {selected: "inbox"}}
%button.btn.btn-success.btn-block#compose-notification
= t(:dashboard)[:notifications][:table][:compose]
%hr
/ %button.btn.btn-success.btn-block#compose-notification
/ = t(:dashboard)[:notifications][:table][:compose]
/ %hr
%button.btn.btn-primary.btn-block.notification_nav#notifications_inbox
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented this out because we may or may not use it later. Not decided yet.

%span.pull-left
%span.glyphicon.glyphicon-inbox
Expand Down
48 changes: 24 additions & 24 deletions spec/features/dashboard/notifications/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ def visit_notifications_index_page
page
end

describe "Compose Message button" do
context "user clicks button" do
it "should allow user to search for a recipient and compose a new message to them" do
stub_const('USE_LDAP', false) # forces search to use db
create(:identity, first_name: 'Santa', last_name: 'Claws')
page = visit_notifications_index_page

expect do
page.compose_button.click
page.wait_for_send_notification_modal
page.send_notification_modal.instance_exec do
select_user.set("Claws")
wait_until_search_results_visible(10)
search_results.select { |sr| sr.text =~ /Claws/ }.first.click
wait_for_subject_line
subject_line.set("subject")
message_box.set("important message")
send_button.click
end
page.wait_until_send_notification_modal_invisible
end.to change { Notification.count }.by(1)
end
end
end
# describe "Compose Message button" do
# context "user clicks button" do
# it "should allow user to search for a recipient and compose a new message to them" do
# stub_const('USE_LDAP', false) # forces search to use db
# create(:identity, first_name: 'Santa', last_name: 'Claws')
# page = visit_notifications_index_page

# expect do
# page.compose_button.click
# page.wait_for_send_notification_modal
# page.send_notification_modal.instance_exec do
# select_user.set("Claws")
# wait_until_search_results_visible(10)
# search_results.select { |sr| sr.text =~ /Claws/ }.first.click
# wait_for_subject_line
# subject_line.set("subject")
# message_box.set("important message")
# send_button.click
# end
# page.wait_until_send_notification_modal_invisible
# end.to change { Notification.count }.by(1)
# end
# end
# end

describe 'default' do
# TODO extract to view specs
Expand Down