Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): Update Runs page visuals to new layout and card design #27770

Merged
merged 73 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
1fcee59
basic card visuals, working on click
dkasper-was-taken Aug 30, 2023
7321ae0
visual tweaks and i18n
dkasper-was-taken Aug 31, 2023
5f6e2fa
match other i18n
dkasper-was-taken Aug 31, 2023
863c503
redo duration format, should make common too
dkasper-was-taken Aug 31, 2023
136fa35
basic debug, needs validation of relevant run
dkasper-was-taken Aug 31, 2023
dd754bd
refactor and move files
dkasper-was-taken Aug 31, 2023
40eaf64
working top level state
dkasper-was-taken Aug 31, 2023
7e49d7b
working grouping, needs subcomponent
dkasper-was-taken Sep 1, 2023
b537de7
switch click target
dkasper-was-taken Sep 1, 2023
d076c5d
remove dayjs change
dkasper-was-taken Sep 1, 2023
82b2c2c
fix current commit
dkasper-was-taken Sep 1, 2023
0daae92
revise commit for message
dkasper-was-taken Sep 1, 2023
eccddec
working view runs button
dkasper-was-taken Sep 1, 2023
b8523c5
fix type check
dkasper-was-taken Sep 1, 2023
36941f4
fix tests
dkasper-was-taken Sep 1, 2023
913d9c5
fix integration tests
dkasper-was-taken Sep 1, 2023
85920a3
remove old test
dkasper-was-taken Sep 1, 2023
21197ff
add layout
dkasper-was-taken Sep 5, 2023
09dedd5
add component test for new layout and cleanup
dkasper-was-taken Sep 5, 2023
5a7c192
add count check
dkasper-was-taken Sep 5, 2023
528fb18
standardize cy tags
dkasper-was-taken Sep 5, 2023
22884c3
revise count test
dkasper-was-taken Sep 5, 2023
c8ef784
fix typos
dkasper-was-taken Sep 5, 2023
bb54d37
fix padding
dkasper-was-taken Sep 5, 2023
e0636ea
Merge branch 'develop' into dkasper/app/runs-page-visuals
dkasper-was-taken Sep 5, 2023
e51180f
start wrapping
dkasper-was-taken Sep 5, 2023
3a98076
happy wrap, next trunc
dkasper-was-taken Sep 6, 2023
9160db6
responsive if wonky
dkasper-was-taken Sep 6, 2023
8dbc156
clean up and titles
dkasper-was-taken Sep 6, 2023
a1e4924
Merge branch 'develop' into dkasper/app/runs-page-visuals
dkasper-was-taken Sep 6, 2023
ac45221
magic resize, needs tests per breakpoint
dkasper-was-taken Sep 7, 2023
ac1a1be
standardize the rollup
dkasper-was-taken Sep 7, 2023
0a2da42
working default rollup
dkasper-was-taken Sep 7, 2023
72d80aa
rollup spacing tweaks
dkasper-was-taken Sep 7, 2023
fbd85ad
center elements
dkasper-was-taken Sep 7, 2023
d16e2c2
update tests for multiple viewports
dkasper-was-taken Sep 7, 2023
e1a7b6f
add missing breakpoint tests
dkasper-was-taken Sep 7, 2023
8e29b80
fix debug tests for status and badge
dkasper-was-taken Sep 7, 2023
f4d7d1c
Merge branch 'develop' into dkasper/app/runs-page-visuals
dkasper-was-taken Sep 7, 2023
7443fa6
remove unneeded check
dkasper-was-taken Sep 7, 2023
1eb2020
add functional component
dkasper-was-taken Sep 7, 2023
928e08c
fix check_ts
dkasper-was-taken Sep 7, 2023
579ff75
update container test
dkasper-was-taken Sep 8, 2023
d471f6c
add changelog
dkasper-was-taken Sep 8, 2023
893c035
add tooltip, needs aria label and external link update
dkasper-was-taken Sep 9, 2023
4e8c494
fix overflow
dkasper-was-taken Sep 9, 2023
ebe0c4f
fix avatar and add aria label to count summary
dkasper-was-taken Sep 9, 2023
4ec4aed
change to external href
dkasper-was-taken Sep 9, 2023
291a4eb
remove popup sizing
dkasper-was-taken Sep 11, 2023
1359703
add tests
dkasper-was-taken Sep 11, 2023
516f46e
Merge branch 'develop' into dkasper/app/runs-page-visuals
dkasper-was-taken Sep 11, 2023
498bab4
add missing data cy
dkasper-was-taken Sep 11, 2023
947d0b0
fix runcard test
dkasper-was-taken Sep 11, 2023
360f341
Truncate result count
dkasper-was-taken Sep 11, 2023
d2a548b
make truncate style conditional
dkasper-was-taken Sep 12, 2023
1216085
Merge branch 'develop' into dkasper/app/runs-page-visuals
dkasper-was-taken Sep 12, 2023
091795e
match design truncate position
dkasper-was-taken Sep 12, 2023
cc113f4
Merge branch 'develop' into dkasper/app/runs-page-visuals
dkasper-was-taken Sep 12, 2023
e188e3f
adddress PR comments
dkasper-was-taken Sep 12, 2023
4764a91
chore:updating styles (#27798)
warrensplayer Sep 13, 2023
9f9faf3
add tooltip content tests and skeletons
dkasper-was-taken Sep 13, 2023
0c41448
clean up tooltip validation
dkasper-was-taken Sep 13, 2023
c599126
fix runs selector
dkasper-was-taken Sep 13, 2023
f159c07
Update packages/app/src/runs/RunsSkeletonRow.vue
dkasper-was-taken Sep 14, 2023
b075591
Update packages/app/src/runs/RunTagCount.vue
dkasper-was-taken Sep 14, 2023
fc3aa88
Update packages/app/src/runs/RunsSkeleton.vue
dkasper-was-taken Sep 14, 2023
dd38278
Update packages/app/src/runs/RunTagCount.vue
dkasper-was-taken Sep 14, 2023
0caeeb6
Update packages/app/src/runs/RunsSkeleton.vue
dkasper-was-taken Sep 14, 2023
91f6e76
Update packages/app/src/runs/RunsSkeletonRow.vue
dkasper-was-taken Sep 14, 2023
e18c79c
Update packages/app/src/runs/RunTagCount.vue
dkasper-was-taken Sep 14, 2023
eb800fc
Update packages/app/src/runs/RunTagCount.vue
dkasper-was-taken Sep 14, 2023
80c8c9e
remove redundant shrink-1s
dkasper-was-taken Sep 14, 2023
69697d0
more shrinks
dkasper-was-taken Sep 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.3.0

_Released 09/19/2023 (PENDING)_

**Features:**

- Introduces new layout for Runs page providing additional run information. Addresses [#27203](https://github.com/cypress-io/cypress/issues/27203).

## 13.2.0

_Released 09/12/2023_
Expand Down
4 changes: 2 additions & 2 deletions packages/app/cypress/e2e/debug.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('App - Debug Page', () => {
.contains('View in Cypress Cloud')
.should('have.attr', 'href', 'https://cloud.cypress.io/projects/7p5uce/runs/2?utm_medium=Debug+Tab&utm_campaign=View+in+Cypress+Cloud&utm_source=Binary%3A+App')

cy.findByTestId('debug-runNumber-PASSED').contains('#2')
cy.findByTestId('runNumber-status-PASSED').contains('#2')
cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead')

cy.findByTestId('metadata').within(() => {
Expand Down Expand Up @@ -136,7 +136,7 @@ describe('App - Debug Page', () => {

cy.findByLabelText('Relevant run had 1 test failure').should('be.visible').contains('1')

cy.findByTestId('debug-runNumber-FAILED').contains('#136')
cy.findByTestId('runNumber-status-FAILED').contains('#136')
cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead')

cy.findByTestId('metadata').within(() => {
Expand Down
53 changes: 24 additions & 29 deletions packages/app/cypress/e2e/runs.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {

cy.visitApp()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="runs-loader"]')
cy.get('[data-cy*="runsSkeleton-"]')
cy.get('[data-cy="runs"]')
})
})
Expand Down Expand Up @@ -103,7 +103,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.visitApp()

moveToRunsPage()
cy.contains('a', 'OVERLIMIT').click()
cy.findByTestId('runNumber-status-OVERLIMIT').click()

cy.withCtx((ctx, o) => {
expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/4')
Expand Down Expand Up @@ -666,29 +666,25 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.visitApp()
moveToRunsPage()

cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().within(() => {
cy.findByText('fix: make gql work CANCELLED')
cy.get('[data-cy="run-card-icon-CANCELLED"]')
cy.get('[data-cy="runCard-status-CANCELLED"]').first().within(() => {
cy.get('[data-cy="runNumber-status-CANCELLED"]')
})

cy.get('[href^="http://dummy.cypress.io/runs/1"]').first().within(() => {
cy.findByText('fix: make gql work ERRORED')
cy.get('[data-cy="run-card-icon-ERRORED"]')
cy.get('[data-cy="runCard-status-ERRORED"]').first().within(() => {
cy.get('[data-cy="runNumber-status-ERRORED"]')
})

cy.get('[href^="http://dummy.cypress.io/runs/2"]').first().within(() => {
cy.findByText('fix: make gql work FAILED')
cy.get('[data-cy="run-card-icon-FAILED"]')
cy.get('[data-cy="runCard-status-FAILED"]').first().within(() => {
cy.get('[data-cy="runNumber-status-FAILED"]')
})

cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().as('firstRun')
cy.get('[data-cy="runCard-status-CANCELLED"]').first().as('firstRun')

cy.get('@firstRun').within(() => {
cy.get('[data-cy="run-card-author"]').contains('John Appleseed')
cy.get('[data-cy="run-card-avatar"]')
cy.get('[data-cy="run-card-branch"]').contains('main')
cy.get('[data-cy="run-card-created-at"]').contains('an hour ago')
cy.get('[data-cy="run-card-duration"]').contains('01:00')
cy.get('[data-cy="runCard-author"]').contains('John Appleseed')
cy.get('[data-cy="runCard-avatar"]')
cy.get('[data-cy="runCard-branchName"]').contains('main')
cy.get('[data-cy="runCard-createdAt"]').contains('01m 00s (an hour ago)')

cy.contains('span', 'skipped')
cy.get('span').contains('pending')
Expand All @@ -702,7 +698,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.visitApp()

moveToRunsPage()
cy.get('[data-cy^="runCard-"]').first().click()
cy.get('[data-cy="runNumber-status-CANCELLED"]').first().click()

cy.withCtx((ctx) => {
expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/0')
Expand Down Expand Up @@ -765,19 +761,18 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.visitApp()
moveToRunsPage()

cy.findByText('fix: using Git data CANCELLED')
cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().within(() => {
cy.findByText('fix: using Git data CANCELLED')
cy.get('[data-cy="run-card-icon-CANCELLED"]')
cy.get('[data-cy="runNumber-status-CANCELLED"]')
})

cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().as('firstRun')
cy.get('[data-cy="runCard-status-CANCELLED"]').first().as('firstRun')

cy.get('@firstRun').within(() => {
cy.get('[data-cy="run-card-author"]').contains('John Appleseed')
cy.get('[data-cy="run-card-avatar"]')
cy.get('[data-cy="run-card-branch"]').contains('main')
cy.get('[data-cy="run-card-created-at"]').contains('an hour ago')
cy.get('[data-cy="run-card-duration"]').contains('01:00')
cy.get('[data-cy="runCard-author"]').contains('John Appleseed')
cy.get('[data-cy="runCard-avatar"]')
cy.get('[data-cy="runCard-branchName"]').contains('main')
cy.get('[data-cy="runCard-createdAt"]').contains('01m 00s (an hour ago)')

cy.contains('span', 'skipped')
cy.get('span').contains('pending')
Expand All @@ -791,7 +786,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.visitApp()

moveToRunsPage()
cy.get('[data-cy^="runCard-"]').first().click()
cy.get('[data-cy="runNumber-status-CANCELLED"]').first().click()

cy.withCtx((ctx) => {
expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/0')
Expand Down Expand Up @@ -955,7 +950,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
const itSkipIfWindows = Cypress.platform === 'win32' ? it.skip : it

itSkipIfWindows('should re-query for executing runs', () => {
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')
cy.get('[data-cy="runNumber-status-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')

cy.remoteGraphQLIntercept(async (obj) => {
await new Promise((resolve) => setTimeout(resolve, 100))
Expand All @@ -976,7 +971,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})

function completeNext (passed) {
cy.get('[data-cy="run-card-icon-PASSED"]').should('have.length', passed).should('be.visible')
cy.get('[data-cy="runNumber-status-PASSED"]').should('have.length', passed).should('be.visible')
if (passed < RUNNING_COUNT) {
completeNext(passed + 1)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {},
"devDependencies": {
"@cypress-design/vue-button": "^0.10.1",
"@cypress-design/vue-icon": "^0.25.0",
"@cypress-design/vue-icon": "^0.26.0",
"@cypress-design/vue-statusicon": "^0.5.0",
"@cypress-design/vue-tabs": "^0.5.1",
"@graphql-typed-document-node/core": "^3.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/app/src/debug/DebugPageHeader.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ describe('<DebugPageHeader />', {

cy.findByTestId('debug-results').should('be.visible')

cy.findByTestId('debug-runNumber-FAILED')
cy.findByTestId('runNumber-status-FAILED')
.should('have.text', '#432')
.children().should('have.length', 2)

cy.findByTestId('debug-flaky-badge')
cy.findByTestId('runResults-flakyBadge')
.should('not.exist')

defaults.forEach((obj) => {
Expand All @@ -73,7 +73,7 @@ describe('<DebugPageHeader />', {
},
})

cy.findByTestId('debug-flaky-badge')
cy.findByTestId('runResults-flakyBadge')
.contains(defaultMessages.specPage.flaky.badgeLabel)

cy.findByTestId('total-flaky-tests')
Expand All @@ -97,7 +97,7 @@ describe('<DebugPageHeader />', {
},
})

cy.findByTestId(`debug-runNumber-${status}`).should('be.visible')
cy.findByTestId(`runNumber-status-${status}`).should('be.visible')
})
})

Expand Down
12 changes: 6 additions & 6 deletions packages/app/src/debug/DebugPageHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
<li
class="flex flex-row text-sm gap-x-2 items-center justify-center"
>
<DebugRunNumber
<RunNumber
v-if="(debug.runNumber && debug.status)"
:status="debug.status"
:value="debug.runNumber"
/>
<DebugResults
<RunResults
:gql="props.gql"
data-cy="debug-results"
/>
Expand Down Expand Up @@ -92,7 +92,7 @@
v-if="debug.createdAt"
data-cy="debug-header-createdAt"
>
<IconTimeStopwatch
<IconTimeClock
size="16"
class="mr-2"
stroke-color="gray-500"
Expand All @@ -106,14 +106,14 @@
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import DebugResults from './DebugResults.vue'
import RunResults from '../runs/RunResults.vue'
import ExternalLink from '@cy/gql-components/ExternalLink.vue'
import type { DebugPageHeaderFragment } from '../generated/graphql'
import { IconTimeStopwatch } from '@cypress-design/vue-icon'
import { IconTimeClock } from '@cypress-design/vue-icon'
import CommitIcon from '~icons/cy/commit_x14'
import { gql } from '@urql/core'
import { useI18n } from 'vue-i18n'
import DebugRunNumber from './DebugRunNumber.vue'
import RunNumber from '../runs/RunNumber.vue'
import UserAvatar from '@cy/gql-components/topnav/UserAvatar.vue'
import { useRunDateTimeInterval } from './useRunDateTimeInterval'
import { getUrlWithParams } from '@packages/frontend-shared/src/utils/getUrlWithParams'
Expand Down
51 changes: 0 additions & 51 deletions packages/app/src/debug/DebugResults.cy.tsx

This file was deleted.

59 changes: 0 additions & 59 deletions packages/app/src/debug/DebugResults.vue

This file was deleted.

10 changes: 5 additions & 5 deletions packages/app/src/debug/DebugRunNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
</LightText>

<template v-else-if="latest?.status && latest.runNumber">
<DebugRunNumber
<RunNumber
:status="latest.status"
:value="latest.runNumber"
class="mx-[8px]"
/>
<DebugResults
<RunResults
v-if="latest"
:gql="latest"
class="bg-white mr-[12px]"
Expand Down Expand Up @@ -135,8 +135,8 @@ import Button from '@packages/frontend-shared/src/components/Button.vue'
import { compact, groupBy } from 'lodash'
import { computed, FunctionalComponent, h } from 'vue'
import { DebugRunNavigationFragment, DebugRunNavigationRunInfoFragment, DebugRunNavigation_MoveToRunDocument } from '../generated/graphql'
import DebugResults from './DebugResults.vue'
import DebugRunNumber from './DebugRunNumber.vue'
import RunResults from '../runs/RunResults.vue'
import RunNumber from '../runs/RunNumber.vue'
import DebugCommitIcon from './DebugCommitIcon.vue'
import DebugRunNavigationLimitMessage from './DebugRunNavigationLimitMessage.vue'
import { IconChevronRightSmall } from '@cypress-design/vue-icon'
Expand All @@ -149,7 +149,7 @@ const { t } = useI18n()

gql`
fragment DebugRunNavigationRunInfo on CloudRun {
...DebugResults
...RunResults
...DebugProgress_DebugTests
__typename
runNumber
Expand Down
Loading