-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22223 from cypress-io/mikep/CLOUD-577-develop-merge
- Loading branch information
Showing
106 changed files
with
612 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"chrome:beta": "102.0.5005.61", | ||
"chrome:stable": "101.0.4951.64" | ||
"chrome:beta": "103.0.5060.33", | ||
"chrome:stable": "102.0.5005.61" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,9 +73,7 @@ | |
"wonka": "^4.0.15" | ||
}, | ||
"files": [ | ||
"dist", | ||
"lib", | ||
"src" | ||
"dist" | ||
], | ||
"vite": { | ||
"optimizeDeps": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import SpecsListRowItem from './SpecsListRowItem.vue' | ||
|
||
describe('SpecItem', () => { | ||
it('renders a SpecsListRowItem as leaf', () => { | ||
const toggleRowHandler = cy.stub() | ||
|
||
cy.mount(() => ( | ||
<SpecsListRowItem | ||
isLeaf={true} | ||
route={{ path: '/specs/runner', query: { file: '' } }} | ||
onToggleRow={toggleRowHandler} | ||
// @ts-ignore - doesn't know about vSlots | ||
vSlots={{ | ||
file: () => <span>File Name</span>, | ||
'git-info': () => <span>Git Info</span>, | ||
}} | ||
/>)) | ||
|
||
// Clicking directly on file name section should trigger row | ||
cy.get('[data-cy="specs-list-row-file"]').click() | ||
cy.wrap(toggleRowHandler).should('have.callCount', 1) | ||
|
||
// Clicking directory on git info section should trigger row | ||
cy.get('[data-cy="specs-list-row-git-info"]').click() | ||
cy.wrap(toggleRowHandler).should('have.callCount', 2) | ||
|
||
// Clicking elsewhere on row should trigger row | ||
cy.get('[data-cy="spec-item-link"]').click('right') | ||
cy.wrap(toggleRowHandler).should('have.callCount', 3) | ||
}) | ||
|
||
it('renders a SpecsListRowItem as non-leaf', () => { | ||
const toggleRowHandler = cy.stub() | ||
|
||
cy.mount(() => ( | ||
<SpecsListRowItem | ||
isLeaf={false} | ||
onToggleRow={toggleRowHandler} | ||
// @ts-ignore - doesn't know about vSlots | ||
vSlots={{ | ||
file: () => <span>Directory Name</span>, | ||
}} | ||
/>)) | ||
|
||
// Clicking directly on file name section should trigger row | ||
cy.get('[data-cy="specs-list-row-file"]').click() | ||
cy.wrap(toggleRowHandler).should('have.callCount', 1) | ||
|
||
// Clicking elsewhere on row should trigger row | ||
cy.get('[data-cy="spec-item-directory"]').click('right') | ||
cy.wrap(toggleRowHandler).should('have.callCount', 2) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,52 @@ | ||
<template> | ||
<div | ||
class="h-full outline-none border-gray-50 ring-inset grid grid-cols-7 group focus-within:ring-indigo-300 focus-within:ring-1" | ||
data-cy="specs-list-row" | ||
> | ||
<div class="col-span-3"> | ||
<slot name="file" /> | ||
</div> | ||
<div data-cy="specs-list-row"> | ||
<component | ||
:is="isLeaf ? 'RouterLink' : 'div'" | ||
class="h-full outline-none border-gray-50 ring-inset grid grid-cols-7 group focus:outline-transparent focus-within:ring-indigo-300 focus-within:ring-1 children:cursor-pointer" | ||
:to="route" | ||
:data-cy="isLeaf ? 'spec-item-link' : 'spec-item-directory'" | ||
@click="emit('toggleRow')" | ||
@click.meta.prevent="handleCtrlClick" | ||
@click.ctrl.prevent="handleCtrlClick" | ||
> | ||
<div | ||
data-cy="specs-list-row-file" | ||
class="col-span-3" | ||
> | ||
<slot name="file" /> | ||
</div> | ||
|
||
<div class="col-span-2"> | ||
<slot name="git-info" /> | ||
</div> | ||
<div | ||
data-cy="specs-list-row-git-info" | ||
class="col-span-2" | ||
> | ||
<slot name="git-info" /> | ||
</div> | ||
|
||
<div> | ||
<slot name="latest-runs" /> | ||
</div> | ||
<div> | ||
<slot name="average-duration" /> | ||
</div> | ||
<div> | ||
<slot name="latest-runs" /> | ||
</div> | ||
<div> | ||
<slot name="average-duration" /> | ||
</div> | ||
</component> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { RouteLocationRaw } from 'vue-router' | ||
defineProps<{ | ||
isLeaf: boolean | ||
route?: RouteLocationRaw | ||
}>() | ||
const emit = defineEmits<{ | ||
(event: 'toggleRow'): void | ||
}>() | ||
function handleCtrlClick (): void { | ||
// noop intended to reduce the chances of opening tests multiple tabs | ||
// which is not a supported state in Cypress | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.