Skip to content

Commit

Permalink
fix: AUT URL in runner header links to application URL (#22171)
Browse files Browse the repository at this point in the history
* Add failing test

* Update AUT URL display to link

* fix: Fix header AUT URL truncation

* fix: Adjust line height so that lower-hanging characters don't get cut off
  • Loading branch information
astone123 authored Jun 10, 2022
1 parent 7a0baf9 commit 85f002f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
19 changes: 19 additions & 0 deletions packages/app/src/runner/SpecRunnerHeaderOpenMode.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,25 @@ describe('SpecRunnerHeaderOpenMode', { viewportHeight: 500 }, () => {
cy.percySnapshot()
})

it('links to aut url', () => {
const autStore = useAutStore()
const url = 'http://localhost:3000/todo'

autStore.updateUrl(url)

cy.mountFragment(SpecRunnerHeaderFragmentDoc, {
onResult: (gql) => {
gql.currentTestingType = 'e2e'
},
render: (gqlVal) => {
return renderWithGql(gqlVal)
},
})

cy.contains(url).should('exist').should('have.attr', 'href', url)
cy.percySnapshot()
})

it('does not show url section if currentTestingType is component', () => {
const autStore = useAutStore()

Expand Down
8 changes: 6 additions & 2 deletions packages/app/src/runner/SpecRunnerHeaderOpenMode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@
>
<i-cy-crosshairs_x16 :class="[selectorPlaygroundStore.show ? 'icon-dark-indigo-500' : 'icon-dark-gray-500']" />
</Button>
<div class="mr-12px max-w-100% grid text-gray-600 items-center truncate">
<a
target="_blank"
:href="autStore.url"
class="mr-12px leading-normal max-w-100% text-indigo-500 self-center hocus-link-default truncate"
>
{{ autStore.url }}
</div>
</a>
</div>
<div
v-else
Expand Down

3 comments on commit 85f002f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 85f002f Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.1.0/linux-x64/develop-85f002fa39f7afdbc439a5d412a403ed7f7662cf/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 85f002f Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.1.0/darwin-x64/develop-85f002fa39f7afdbc439a5d412a403ed7f7662cf/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 85f002f Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.1.0/win32-x64/develop-85f002fa39f7afdbc439a5d412a403ed7f7662cf/cypress.tgz

Please sign in to comment.