Update spec/system/consumer/shopping/cart_spec.rb test to use new disabled selector

This commit is contained in:
Cillian O'Ruanaidh
2025-08-29 14:45:44 +01:00
committed by Filipe
parent 66859f44ca
commit 74e7bd5172

View File

@@ -241,8 +241,8 @@ RSpec.describe "full-page cart" do
'Please update the selected quantities.'
# "Continue Shopping" and "Checkout" buttons are disabled
expect(page).to have_selector "a.continue-shopping[disabled=disabled]"
expect(page).to have_selector "a#checkout-link[disabled=disabled]"
expect(page).to have_selector "a.continue-shopping[aria-disabled=true]"
expect(page).to have_selector "a#checkout-link[aria-disabled=true]"
# Quantity field clearly marked as invalid and "Update" button is not highlighted
expect(page).to have_selector "#order_line_items_attributes_0_quantity.ng-invalid-stock"
@@ -260,8 +260,8 @@ RSpec.describe "full-page cart" do
click_button 'Update'
# "Continue Shopping" and "Checkout" buttons are not disabled after cart is updated
expect(page).not_to have_selector "a.continue-shopping[disabled=disabled]"
expect(page).not_to have_selector "a#checkout-link[disabled=disabled]"
expect(page).not_to have_selector "a.continue-shopping[aria-disabled=true]"
expect(page).not_to have_selector "a#checkout-link[aria-disabled=true]"
end
end
end