Add check for arrow icons

This commit is contained in:
Anna Anks Nowak
2019-01-01 19:53:56 +01:00
committed by Javi Martín
parent 0affaaee7e
commit 39cc997ef4

View File

@@ -619,6 +619,9 @@ feature 'Admin budget investments' do
expect('B First Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('C Third Investment')
within('th', text: 'ID') do
expect(page).to have_css(".icon-arrow-top")
end
end
scenario 'Sort by title' do
@@ -626,6 +629,9 @@ feature 'Admin budget investments' do
expect('A Second Investment').to appear_before('B First Investment')
expect('B First Investment').to appear_before('C Third Investment')
within('th', text: 'Title') do
expect(page).to have_css(".icon-arrow-top")
end
end
scenario 'Sort by supports' do
@@ -633,6 +639,9 @@ feature 'Admin budget investments' do
expect('C Third Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('B First Investment')
within('th', text: 'Supports') do
expect(page).to have_css(".icon-arrow-top")
end
end
end
@@ -642,6 +651,9 @@ feature 'Admin budget investments' do
expect('C Third Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('B First Investment')
within('th', text: 'ID') do
expect(page).to have_css(".icon-arrow-down")
end
end
scenario 'Sort by title' do
@@ -649,6 +661,9 @@ feature 'Admin budget investments' do
expect('C Third Investment').to appear_before('B First Investment')
expect('B First Investment').to appear_before('A Second Investment')
within('th', text: 'Title') do
expect(page).to have_css(".icon-arrow-down")
end
end
scenario 'Sort by supports' do
@@ -656,6 +671,9 @@ feature 'Admin budget investments' do
expect('B First Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('C Third Investment')
within('th', text: 'Supports') do
expect(page).to have_css(".icon-arrow-down")
end
end
end
@@ -665,6 +683,9 @@ feature 'Admin budget investments' do
expect('B First Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('C Third Investment')
within('th', text: 'ID') do
expect(page).to have_css(".icon-arrow-top")
end
end
scenario 'Sort by title' do
@@ -672,6 +693,9 @@ feature 'Admin budget investments' do
expect('A Second Investment').to appear_before('B First Investment')
expect('B First Investment').to appear_before('C Third Investment')
within('th', text: 'Title') do
expect(page).to have_css(".icon-arrow-top")
end
end
scenario 'Sort by supports' do
@@ -679,10 +703,23 @@ feature 'Admin budget investments' do
expect('C Third Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('B First Investment')
within('th', text: 'Supports') do
expect(page).to have_css(".icon-arrow-top")
end
end
end
context 'With incorrect direction provided sorts ascending' do
scenario 'Sort by ID' do
visit admin_budget_budget_investments_path(budget, sort_by: 'id', direction: 'incorrect')
expect('B First Investment').to appear_before('A Second Investment')
expect('A Second Investment').to appear_before('C Third Investment')
within('th', text: 'ID') do
expect(page).to have_css(".icon-arrow-top")
end
end
end
end
context 'Show' do