Commit 19a99d08 authored by Mike Greiling's avatar Mike Greiling Committed by Thong Kuah

Remove tests related to removed toggle button

parent 1dba5dbc
...@@ -35,37 +35,6 @@ describe 'Clusters', :js do ...@@ -35,37 +35,6 @@ describe 'Clusters', :js do
expect(page).to have_selector('.gl-responsive-table-row', count: 2) expect(page).to have_selector('.gl-responsive-table-row', count: 2)
end end
context 'inline update of cluster' do
it 'user can update cluster' do
expect(page).to have_selector('.js-project-feature-toggle')
end
context 'with successful request' do
it 'user sees updated cluster' do
expect do
page.find('.js-project-feature-toggle').click
wait_for_requests
end.to change { cluster.reload.enabled }
expect(page).not_to have_selector('.is-checked')
expect(cluster.reload).not_to be_enabled
end
end
context 'with failed request' do
it 'user sees not update cluster and error message' do
expect_any_instance_of(Clusters::UpdateService).to receive(:execute).and_call_original
allow_any_instance_of(Clusters::Cluster).to receive(:valid?) { false }
page.find('.js-project-feature-toggle').click
expect(page).to have_content('Something went wrong on our end.')
expect(page).to have_selector('.is-checked')
expect(cluster.reload).to be_enabled
end
end
end
context 'when user clicks on a cluster' do context 'when user clicks on a cluster' do
before do before do
click_link cluster.name click_link cluster.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment