Skip to content

Commit 93d58ab

Browse files
Update tests
1 parent c8b48a3 commit 93d58ab

File tree

8 files changed

+14
-18
lines changed

8 files changed

+14
-18
lines changed

dpc-portal/app/components/page/invitations/start_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</ul>
4646
</p>
4747
<%= link_to 'Begin registration', accept_organization_invitation_path(@organization, @invitation), class: 'usa-button start-component-button' if @invitation.authorized_official? %>
48-
<%= link_to 'Accept invitation', confirm_cd_organization_invitation_path(@organization, @invitation), class: 'usa-button start-component-button' if @invitation.credential_delegate? %>
48+
<%= link_to 'Get Started', confirm_cd_organization_invitation_path(@organization, @invitation), class: 'usa-button start-component-button' if @invitation.credential_delegate? %>
4949
</div>
5050
</div>
5151
</div>

dpc-portal/spec/components/core/card/basic_component_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
<h1>Yo</h1>
4646
</div>
4747
<div class="flex-align-self-center">
48-
<form class="button_to" method="post" action="/there">
49-
<button class="usa-button" type="submit">Doit</button>
50-
</form>#{' '}
48+
<a href="/there" class="usa-button">Doit</a>
5149
</div>
5250
</div>
5351
</div>

dpc-portal/spec/components/page/credential_delegate/list_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<h2>Invites</h2>
4949
</div>
5050
<div class="flex-align-self-center">
51-
<form class="button_to" method="get" action="/organizations/#{org.path_id}/credential_delegate_invitations/new"><button class="usa-button" type="submit">Invite CD</button></form>
51+
<a href="/organizations/#{org.path_id}/credential_delegate_invitations/new" class="usa-button">Invite CD</a>
5252
</div>
5353
</div>
5454
<p>You can invite users to be Credential Delegates.</p>

dpc-portal/spec/components/page/invitations/ao_flow_fail_component_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
let(:reason) { 'fail_to_proof' }
5252
it 'should have url to login' do
5353
url = 'http://test.host/'
54-
expect(page.find('form')[:action]).to eq url
55-
expect(page.find('form')[:method]).to eq 'get'
54+
expect(page.find('a.usa-button')[:href]).to eq url
5655
end
5756
end
5857
end

dpc-portal/spec/components/page/invitations/start_component_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
it 'should go to accept page' do
3333
expected = "/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/accept"
34-
form = page.find('form')
35-
expect(form[:action]).to eq expected
34+
link = page.find('a.usa-button')
35+
expect(link[:href]).to eq expected
3636
end
3737

3838
it 'should include organization name and NPI' do
@@ -63,8 +63,8 @@
6363

6464
it 'should go to confirm_cd page' do
6565
expected = "/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/confirm_cd"
66-
form = page.find('form')
67-
expect(form[:action]).to eq expected
66+
link = page.find('a.usa-button')
67+
expect(link[:href]).to eq expected
6868
end
6969

7070
it 'should include organization name' do

dpc-portal/spec/components/page/organization/credentials_componenent_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
let(:org) { ComponentSupport::MockOrg.new(0) }
2121
it 'Should have Generate token button' do
2222
button = <<~BUTTON
23-
<a href="/portal/organizations/#{org.path_id}/client_tokens/new" class="usa-button">Generate token</a>
23+
<a class="usa-button" href="/organizations/#{org.path_id}/client_tokens/new">Generate token</a>
2424
BUTTON
2525
is_expected.to include(normalize_space(button))
2626
end
2727
it 'Should have Create key button' do
2828
button = <<~BUTTON
29-
<a href="/portal/organizations/#{org.path_id}/public_keys/new" class="usa-button">Add key</a>
29+
<a class="usa-button" href="/organizations/#{org.path_id}/public_keys/new">Add key</a>
3030
BUTTON
3131
is_expected.to include(normalize_space(button))
3232
end
3333
it 'Should have Add IP button' do
3434
button = <<~BUTTON
35-
<a href="/portal/organizations/#{org.path_id}/ip_addresses/new" class="usa-button">Add IP</a>
35+
<a class="usa-button" href="/organizations/#{org.path_id}/ip_addresses/new">Add IP</a>
3636
BUTTON
3737
is_expected.to include(normalize_space(button))
3838
end

dpc-portal/spec/components/page/organization/new_organization_success_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<div class="margin-top-5">
3636
<div class="display-flex flex-row flex-start" style="gap:20px;">
3737
<div class="flex-align-self-center">
38-
<a href="/portal/organizations/#{org.id}/credential_delegate_invitations/new" class="usa-button">Assign CD now</a>
38+
<a href="/organizations/#{org.id}/credential_delegate_invitations/new" class="usa-button margin-right-0">Assign CD now</a>
3939
</div>
4040
<div class="flex-align-self-center">
4141
<a href="/">Assign CD later</a>

dpc-portal/spec/components/page/session/login_component_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
expect(page.find('form', match: :first)[:method]).to eq 'post'
3131
end
3232

33-
it 'test data button should post to sandbox url' do
34-
expect(page.find('form.sandbox_url')[:action]).to eq sandbox_url
35-
expect(page.find('form.sandbox_url')[:method]).to eq 'get'
33+
it 'test data button should link to sandbox url' do
34+
expect(page.find('a.usa-button--outline.usa-button')[:href]).to eq sandbox_url
3635
end
3736

3837
it 'should have two columns' do

0 commit comments

Comments
 (0)