Commit 43b15346 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Update data test id attribute in specs

parent 3cece301
...@@ -9,7 +9,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -9,7 +9,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
it 'enables the Remove group button and does not show an alert for a group' do it 'enables the Remove group button and does not show an alert for a group' do
render 'groups/settings/remove', group: group render 'groups/settings/remove', group: group
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).not_to match 'data-disabled="true"' expect(rendered).not_to match 'data-disabled="true"'
expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
...@@ -19,7 +19,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -19,7 +19,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render 'groups/settings/remove', group: group render 'groups/settings/remove', group: group
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).to match 'data-disabled="true"' expect(rendered).to match 'data-disabled="true"'
expect(rendered).to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
...@@ -29,7 +29,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -29,7 +29,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render 'groups/settings/remove', group: group render 'groups/settings/remove', group: group
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).to match 'data-disabled="true"' expect(rendered).to match 'data-disabled="true"'
expect(rendered).to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
...@@ -40,7 +40,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -40,7 +40,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render 'groups/settings/remove', group: subgroup render 'groups/settings/remove', group: subgroup
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).not_to match 'data-disabled="true"' expect(rendered).not_to match 'data-disabled="true"'
expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
...@@ -53,7 +53,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -53,7 +53,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
it 'enables the Remove group button and does not show an alert for a group without a paid gitlab.com plan' do it 'enables the Remove group button and does not show an alert for a group without a paid gitlab.com plan' do
render 'groups/settings/remove', group: group render 'groups/settings/remove', group: group
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).not_to match 'data-disabled="true"' expect(rendered).not_to match 'data-disabled="true"'
expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
...@@ -63,7 +63,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -63,7 +63,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render 'groups/settings/remove', group: group render 'groups/settings/remove', group: group
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).to match 'data-disabled="true"' expect(rendered).to match 'data-disabled="true"'
expect(rendered).to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
...@@ -74,7 +74,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -74,7 +74,7 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render 'groups/settings/remove', group: subgroup render 'groups/settings/remove', group: subgroup
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).not_to match 'data-disabled="true"' expect(rendered).not_to match 'data-disabled="true"'
expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
......
...@@ -9,8 +9,8 @@ RSpec.describe 'groups/settings/_remove.html.haml' do ...@@ -9,8 +9,8 @@ RSpec.describe 'groups/settings/_remove.html.haml' do
render 'groups/settings/remove', group: group render 'groups/settings/remove', group: group
expect(rendered).to have_selector '[data-testid="remove-group-button"]' expect(rendered).to have_selector '[data-button-testid="remove-group-button"]'
expect(rendered).not_to have_selector '[data-testid="remove-group-button"].disabled' expect(rendered).not_to have_selector '[data-button-testid="remove-group-button"].disabled'
expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]' expect(rendered).not_to have_selector '[data-testid="group-has-linked-subscription-alert"]'
end end
end end
......
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