Skip to content

Commit

Permalink
Merge pull request #174 from alphagov/side-by-side-link
Browse files Browse the repository at this point in the history
Add a link to the side by side browser on site dashboards
  • Loading branch information
jamiecobbett committed Feb 10, 2014
2 parents 0e93477 + c9558f5 commit e5f5963
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app/views/sites/_tools.html.erb
@@ -1,6 +1,16 @@
<div class="panel panel-default">
<h3 class="panel-heading remove-top-margin">Tools</h3>
<div class="panel-body">
<h4 class="remove-top-margin">Side by side browser</h4>
<p>
Browse <i><%= site.default_host.hostname %></i> in the left panel, and, as you navigate, preview redirections and archives in the right panel.
</p>
<ul>
<li>
<a href="http://<%= site.default_host.hostname %>.side-by-side.alphagov.co.uk/__/#/">Open side by side browser</a>
</li>
</ul>
<hr />
<h4 class="remove-top-margin">Preview redirections</h4>
<p>
To test a redirection for a pre-transition website:
Expand Down
2 changes: 1 addition & 1 deletion app/views/sites/show.html.erb
Expand Up @@ -27,7 +27,7 @@
<%= date_or_not_yet(@site.launch_date) %>
</div>

<%= render 'tools' %>
<%= render partial: 'tools', locals: {site: @site } %>

</div>
</div>
1 change: 1 addition & 0 deletions features/site.feature
Expand Up @@ -19,6 +19,7 @@ Scenario: Visit a post-transition site's page
And I should be able to edit the site's mappings
And I should be able to view the site's analytics
And I should see the site's configuration including all host aliases
And I should see a link to the side by side browser

Scenario: Visit a pre-transition site's page
Given I have logged in as an admin
Expand Down
4 changes: 4 additions & 0 deletions features/step_definitions/site_assertion_steps.rb
Expand Up @@ -64,3 +64,7 @@
expect(page).to have_link('a', href: site_mappings_path(@site))
end
end

Then(/^I should see a link to the side by side browser$/) do
expect(page).to have_selector('a[href*="www.attorney-general.gov.uk.side-by-side"]')
end

0 comments on commit e5f5963

Please sign in to comment.