Fix broken link

This link would go to the enterprise edit screen, but didn't successfully select the payment methods panel.

Ideally, the spec would try to follow the link and verify that you can see the Connect with Stripe button. But it opens the link in a new tab and I'm not sure how to test that.
This commit is contained in:
David Cook
2025-08-20 11:54:47 +10:00
parent 90288b8cbf
commit 646d538a3d
2 changed files with 2 additions and 2 deletions

View File

@@ -15,4 +15,4 @@ angular.module("admin.paymentMethods").controller "StripeController", ($scope, $
permalink = shops.filter((shop) ->
shop.id == $scope.paymentMethod.preferred_enterprise_id
)[0].permalink
"/admin/enterprises/#{permalink}/edit#/payment_methods"
"/admin/enterprises/#{permalink}/edit#/payment_methods_panel"

View File

@@ -76,7 +76,7 @@ RSpec.describe '
connect_one = 'Connect One'
expect(page).to have_link connect_one,
href: edit_admin_enterprise_path(missing_account_enterprise,
anchor: "/payment_methods")
anchor: "/payment_methods_panel")
select2_select "Revoked", from: "payment_method_preferred_enterprise_id"
expect(page).to have_selector "#stripe-account-status .alert-box.error",