Skip to content

Commit 1643161

Browse files
sainthkhRachel
andauthored
fix: show info message correctly on "record your first run ui" (#22413)
Co-authored-by: Rachel <rachel@cypress.io>
1 parent 7c4d5e5 commit 1643161

2 files changed

Lines changed: 58 additions & 21 deletions

File tree

packages/app/src/runs/RunsConnectSuccessAlert.spec.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,37 @@ describe('<RunConnectSuccessAlert />', { viewportHeight: 400 }, () => {
1313
},
1414
})
1515
})
16+
17+
// https://github.com/cypress-io/cypress/issues/21856
18+
describe('resposive design', () => {
19+
it('small screen (width < md(768px))', () => {
20+
cy.mountFragment(RunsConnectSuccessAlertFragmentDoc, {
21+
render: (gqlVal) => {
22+
return (
23+
<div class="bg-gray-100 h-screen p-3">
24+
<RunsConnectSuccessAlert gql={gqlVal} />
25+
</div>
26+
)
27+
},
28+
})
29+
30+
cy.viewport(400, 800)
31+
cy.percySnapshot()
32+
})
33+
34+
it('wide screen (width >= md(768px))', () => {
35+
cy.mountFragment(RunsConnectSuccessAlertFragmentDoc, {
36+
render: (gqlVal) => {
37+
return (
38+
<div class="bg-gray-100 h-screen p-3">
39+
<RunsConnectSuccessAlert gql={gqlVal} />
40+
</div>
41+
)
42+
},
43+
})
44+
45+
cy.viewport(1000, 800)
46+
cy.percySnapshot()
47+
})
48+
})
1649
})

packages/app/src/runs/RunsConnectSuccessAlert.vue

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,32 @@
66
dismissible
77
:title="t('runs.connectSuccessAlert.title')"
88
>
9-
<p class="flex px-16px pt-16px leading-24px items-center">
10-
<i-cy-arrow-outline-right_x16 class="h-16px mr-8px w-16px inline align-middle icon-dark-jade-500" />
11-
<i18n-t
12-
scope="global"
13-
keypath="runs.connectSuccessAlert.item1"
14-
>
15-
<template #projectId>
16-
<span class="font-normal m-4px text-jade-600">projectId</span>
17-
</template>
18-
<template #configFile>
19-
<span class="font-normal m-4px text-jade-600">{{ configFilePath }}</span>
20-
</template>
21-
</i18n-t>
9+
<p class="flex px-16px pt-16px leading-24px md:items-center">
10+
<i-cy-arrow-outline-right_x16 class="h-16px mr-8px w-16px inline align-middle icon-dark-jade-500 mt-4px md:mt-0" />
11+
<span>
12+
<i18n-t
13+
scope="global"
14+
keypath="runs.connectSuccessAlert.item1"
15+
>
16+
<template #projectId>
17+
<span class="font-normal text-jade-600">projectId</span>
18+
</template>
19+
<template #configFile>
20+
<span class="font-normal text-jade-600">{{ configFilePath }}</span>
21+
</template>
22+
</i18n-t>
23+
</span>
2224
</p>
23-
<p class="flex px-16px pt-16px pb-16px leading-24px items-center">
24-
<i-cy-arrow-outline-right_x16 class="h-16px mr-8px w-16px inline align-middle icon-dark-jade-500" />
25-
<i18n-t
26-
scope="global"
27-
keypath="runs.connectSuccessAlert.item2"
28-
>
29-
<span class="font-normal m-4px text-jade-600">{{ configFilePath }}</span>
30-
</i18n-t>
25+
<p class="flex px-16px pt-16px pb-16px leading-24px md:items-center">
26+
<i-cy-arrow-outline-right_x16 class="h-16px mr-8px w-16px inline align-middle icon-dark-jade-500 mt-4px md:mt-0" />
27+
<span>
28+
<i18n-t
29+
scope="global"
30+
keypath="runs.connectSuccessAlert.item2"
31+
>
32+
<span class="font-normal text-jade-600">{{ configFilePath }}</span>
33+
</i18n-t>
34+
</span>
3135
</p>
3236
</Alert>
3337
</template>

0 commit comments

Comments
 (0)