Skip to content

Commit 85f002f

Browse files
authored
fix: AUT URL in runner header links to application URL (#22171)
* 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
1 parent 7a0baf9 commit 85f002f

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

packages/app/src/runner/SpecRunnerHeaderOpenMode.cy.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,25 @@ describe('SpecRunnerHeaderOpenMode', { viewportHeight: 500 }, () => {
109109
cy.percySnapshot()
110110
})
111111

112+
it('links to aut url', () => {
113+
const autStore = useAutStore()
114+
const url = 'http://localhost:3000/todo'
115+
116+
autStore.updateUrl(url)
117+
118+
cy.mountFragment(SpecRunnerHeaderFragmentDoc, {
119+
onResult: (gql) => {
120+
gql.currentTestingType = 'e2e'
121+
},
122+
render: (gqlVal) => {
123+
return renderWithGql(gqlVal)
124+
},
125+
})
126+
127+
cy.contains(url).should('exist').should('have.attr', 'href', url)
128+
cy.percySnapshot()
129+
})
130+
112131
it('does not show url section if currentTestingType is component', () => {
113132
const autStore = useAutStore()
114133

packages/app/src/runner/SpecRunnerHeaderOpenMode.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@
2323
>
2424
<i-cy-crosshairs_x16 :class="[selectorPlaygroundStore.show ? 'icon-dark-indigo-500' : 'icon-dark-gray-500']" />
2525
</Button>
26-
<div class="mr-12px max-w-100% grid text-gray-600 items-center truncate">
26+
<a
27+
target="_blank"
28+
:href="autStore.url"
29+
class="mr-12px leading-normal max-w-100% text-indigo-500 self-center hocus-link-default truncate"
30+
>
2731
{{ autStore.url }}
28-
</div>
32+
</a>
2933
</div>
3034
<div
3135
v-else

0 commit comments

Comments
 (0)