Skip to content

Commit

Permalink
Merge branch 'tests/caminhos-tristes' of https://github.com/leogirald…
Browse files Browse the repository at this point in the history
…img/Spottapp into tests/caminhos-tristes
  • Loading branch information
lucaschabariberi committed Dec 4, 2019
2 parents 01da833 + 435c126 commit 2358c52
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
7 changes: 6 additions & 1 deletion src/app/features/delete_college.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ Scenario: Delete a college page when I go to edit page settings and click the "A
Given I am on the edit page settings page
When I click the Apagar a página button
And I am on the colleges menu page
Then The college page shouldn't be exist anymore
Then The college page shouldn't be exist anymore

Scenario: User tries to delete a college that he is not admin
Given There is a college page created
And I am on the colleges menu
Then I cant find that college Editar button
14 changes: 7 additions & 7 deletions src/app/features/delete_pages_administrator.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ I want to delete a administrator of the page
So that i can manage the page administration resposibility

Background:
Given I logged in successfully
And I created a college page
And I already defined the user as administrator
Given I logged in successfully
And I created a college page
And I already defined the user as administrator

Scenario: Administrator choose othe administrator to be exclude clicking on the trash buttom
Given I am on the page's list of administrators
When I click on the trash button associated with a administrator
Then I should see the list without the administrator that I choose
And I should see a success message
Given I am on the page's list of administrators
When I click on the trash button associated with a administrator
Then I should see the list without the administrator that I choose
And I should see a success message

5 changes: 5 additions & 0 deletions src/app/features/step_definitions/delete_college_steps.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Then(/^The college page shouldn't be exist anymore$/) do
expect(page).not_to have_link('Editar', href: '/colleges/#{@college.id}/edit')
end

Then(/^I cant find that college Editar button$/) do
element = find('.summary', text: 'UT002 - Faculdade Teste 002')
expect(element).not_to have_link('Editar')
end

0 comments on commit 2358c52

Please sign in to comment.