Skip to content

Commit

Permalink
chore: updating v8 snapshot cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cypress-bot[bot] committed May 6, 2023
1 parent 0a9c274 commit 6868560
Show file tree
Hide file tree
Showing 70 changed files with 983 additions and 392 deletions.
5 changes: 5 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@

_Released 05/09/2023 (PENDING)_

**Features:**

- Added a new informational banner to help get started with component testing from an existing end-to-end test suite. Addresses [#26511](https://github.com/cypress-io/cypress/issues/26511).

**Bugfixes:**

- Fixed an issue in Electron where devtools gets out of sync with the DOM occasionally. Addresses [#15932](https://github.com/cypress-io/cypress/issues/15932).
- Updated the Chromium renderer process crash message to be more terse. Addressed in [#26597](https://github.com/cypress-io/cypress/pull/26597).
- Fixed an issue with `CYPRESS_DOWNLOAD_PATH_TEMPLATE` regex to allow multiple replacements. Addresses [#23670](https://github.com/cypress-io/cypress/issues/23670).

**Dependency Updates:**

Expand Down
4 changes: 4 additions & 0 deletions cli/__snapshots__/download_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ https://download.cypress.io/desktop/0.20.2/OS-ARCH/cypress.zip
exports['desktop url from template with escaped dollar sign wrapped in quote'] = `
https://download.cypress.io/desktop/0.20.2/OS-ARCH/cypress.zip
`

exports['desktop url from template with multiple replacements'] = `
https://download.cypress.io/desktop/0.20.2/OS/ARCH/cypress-0.20.2-OS-ARCH.zip?referrer=https://download.cypress.io/desktop/0.20.2&version=0.20.2
`
8 changes: 4 additions & 4 deletions cli/lib/tasks/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const prepend = (arch, urlPath, version) => {
return pathTemplate
? (
pathTemplate
.replace(/\\?\$\{endpoint\}/, endpoint)
.replace(/\\?\$\{platform\}/, platform)
.replace(/\\?\$\{arch\}/, arch)
.replace(/\\?\$\{version\}/, version)
.replace(/\\?\$\{endpoint\}/g, endpoint)
.replace(/\\?\$\{platform\}/g, platform)
.replace(/\\?\$\{arch\}/g, arch)
.replace(/\\?\$\{version\}/g, version)
)
: `${endpoint}?platform=${platform}&arch=${arch}`
}
Expand Down
7 changes: 7 additions & 0 deletions cli/test/lib/tasks/download_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ describe('lib/tasks/download', function () {
snapshot('desktop url from template with version', normalize(url))
})

it('returns custom url from template with multiple replacements', () => {
process.env.CYPRESS_DOWNLOAD_PATH_TEMPLATE = '${endpoint}/${platform}/${arch}/cypress-${version}-${platform}-${arch}.zip?referrer=${endpoint}&version=${version}'
const url = download.getUrl('ARCH', '0.20.2')

snapshot('desktop url from template with multiple replacements', normalize(url))
})

it('returns custom url from template with escaped dollar sign', () => {
process.env.CYPRESS_DOWNLOAD_PATH_TEMPLATE = '\\${endpoint}/\\${platform}-\\${arch}/cypress.zip'
const url = download.getUrl('ARCH', '0.20.2')
Expand Down
5 changes: 3 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
},
"dependencies": {},
"devDependencies": {
"@cypress-design/vue-icon": "0.20.0",
"@cypress-design/vue-statusicon": "0.3.0",
"@cypress-design/vue-button": "0.9.2",
"@cypress-design/vue-icon": "0.22.1",
"@cypress-design/vue-statusicon": "0.4.3",
"@graphql-typed-document-node/core": "^3.1.0",
"@headlessui/vue": "1.4.0",
"@iconify/iconify": "2.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/composables/useRelevantRun.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql, useSubscription } from '@urql/vue'
import { Debug_RelevantRuns_SubscriptionDocument, Sidebar_RelevantRuns_SubscriptionDocument } from '@packages/app/src/generated/graphql'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'

import { computed } from 'vue'
import { uniq } from 'lodash'
Expand Down Expand Up @@ -43,10 +43,10 @@ gql`
`

export function useRelevantRun (location: 'SIDEBAR' | 'DEBUG') {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

const shouldPause = computed(() => {
return !loginConnectStore.project.isProjectConnected
return !userProjectStatusStore.project.isProjectConnected
})

//Switch the subscription query depending on where it was registered from
Expand Down
48 changes: 24 additions & 24 deletions packages/app/src/debug/DebugContainer.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DebugSpecListGroupsFragment, DebugSpecListSpecFragment, DebugSpecListTestsFragment, DebugSpecsFragment, DebugSpecsFragmentDoc, UseCohorts_DetermineCohortDocument } from '../generated/graphql-test'
import DebugContainer from './DebugContainer.vue'
import { defaultMessages } from '@cy/i18n'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'
import { specsList } from './utils/DebugMapping'
import { CloudRunStubs, createCloudRun } from '@packages/graphql/test/stubCloudTypes'
import { DEBUG_SLIDESHOW } from './utils/constants'
Expand Down Expand Up @@ -51,31 +51,31 @@ describe('<DebugContainer />', () => {
}

it('shows not logged in', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setHasInitiallyLoaded()
userProjectStatusStore.setHasInitiallyLoaded()

validateEmptyState([defaultMessages.debugPage.emptyStates.connectToCypressCloud, defaultMessages.debugPage.emptyStates.debugDirectlyInCypress, defaultMessages.debugPage.emptyStates.notLoggedInTestMessage])
cy.findByRole('button', { name: 'Connect to Cypress Cloud' }).should('be.visible')
})

it('is logged in with no project', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setUserFlag('isLoggedIn', true)
loginConnectStore.setProjectFlag('isProjectConnected', false)
loginConnectStore.setHasInitiallyLoaded()
userProjectStatusStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setProjectFlag('isProjectConnected', false)
userProjectStatusStore.setHasInitiallyLoaded()

validateEmptyState([defaultMessages.debugPage.emptyStates.debugDirectlyInCypress, defaultMessages.debugPage.emptyStates.reviewRerunAndDebug, defaultMessages.debugPage.emptyStates.noProjectTestMessage])
cy.findByRole('button', { name: 'Connect a Cypress Cloud project' }).should('be.visible')
})

it('has no runs', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setUserFlag('isLoggedIn', true)
loginConnectStore.setProjectFlag('isProjectConnected', true)
loginConnectStore.setHasInitiallyLoaded()
userProjectStatusStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setProjectFlag('isProjectConnected', true)
userProjectStatusStore.setHasInitiallyLoaded()
cy.mountFragment(DebugSpecsFragmentDoc, {
variableTypes: DebugSpecVariableTypes,
variables: defaultVariables,
Expand All @@ -87,11 +87,11 @@ describe('<DebugContainer />', () => {
})

it('errors', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setUserFlag('isLoggedIn', true)
loginConnectStore.setProjectFlag('isProjectConnected', true)
loginConnectStore.setHasInitiallyLoaded()
userProjectStatusStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setProjectFlag('isProjectConnected', true)
userProjectStatusStore.setHasInitiallyLoaded()
cy.mountFragment(DebugSpecsFragmentDoc, {
variableTypes: DebugSpecVariableTypes,
variables: defaultVariables,
Expand All @@ -105,11 +105,11 @@ describe('<DebugContainer />', () => {

describe('run states', { viewportWidth: 900 }, () => {
beforeEach(() => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setUserFlag('isLoggedIn', true)
loginConnectStore.setProjectFlag('isProjectConnected', true)
loginConnectStore.setHasInitiallyLoaded()
userProjectStatusStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setProjectFlag('isProjectConnected', true)
userProjectStatusStore.setHasInitiallyLoaded()
})

function mountTestRun (runName: string) {
Expand Down Expand Up @@ -229,14 +229,14 @@ describe('<DebugContainer />', () => {
})

describe('when logged in and connected', () => {
let loginConnectStore
let userProjectStatusStore

beforeEach(() => {
loginConnectStore = useLoginConnectStore()
userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setUserFlag('isLoggedIn', true)
loginConnectStore.setProjectFlag('isProjectConnected', true)
loginConnectStore.setHasInitiallyLoaded()
userProjectStatusStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setProjectFlag('isProjectConnected', true)
userProjectStatusStore.setHasInitiallyLoaded()
})

it('renders running run', () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/app/src/debug/DebugContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<NoInternetConnection v-if="!online">
{{ t('launchpadErrors.noInternet.connectProject') }}
</NoInternetConnection>
<DebugLoading v-else-if="!loginConnectStore.hasInitiallyLoaded || loginConnectStore.project.isProjectConnected && isLoading" />
<DebugLoading v-else-if="!userProjectStatusStore.hasInitiallyLoaded || userProjectStatusStore.project.isProjectConnected && isLoading" />
<DebugError
v-else-if="showError"
/>
<DebugNotLoggedIn
v-else-if="!loginConnectStore.user.isLoggedIn"
v-else-if="!userProjectStatusStore.user.isLoggedIn"
data-cy="debug-empty"
/>
<DebugNoProject
v-else-if="!loginConnectStore.project.isProjectConnected"
v-else-if="!userProjectStatusStore.project.isProjectConnected"
data-cy="debug-empty"
/>
<DebugNoRuns
Expand Down Expand Up @@ -85,7 +85,7 @@
import { gql } from '@urql/vue'
import { computed } from 'vue'
import type { CloudRunStatus, DebugSpecsFragment, TestingTypeEnum } from '../generated/graphql'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'
import NoInternetConnection from '@packages/frontend-shared/src/components/NoInternetConnection.vue'
import DebugLoading from '../debug/empty/DebugLoading.vue'
import DebugPageHeader from './DebugPageHeader.vue'
Expand Down Expand Up @@ -205,7 +205,7 @@ const props = withDefaults(defineProps<{
currentCommitInfo: undefined,
})
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()
const cloudProject = computed(() => {
return props.gql?.currentProject?.cloudProject?.__typename === 'CloudProject'
Expand Down
20 changes: 10 additions & 10 deletions packages/app/src/debug/empty/DebugEmptyStates.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import DebugNoRuns from './DebugNoRuns.vue'
import DebugLoading from './DebugLoading.vue'
import DebugError from './DebugError.vue'
import DebugEmptyView from './DebugEmptyView.vue'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'
import { DebugEmptyView_RecordEventDocument, DebugEmptyView_SetPreferencesDocument, UseCohorts_DetermineCohortDocument, _DebugEmptyViewFragment, _DebugEmptyViewFragmentDoc } from '../../generated/graphql-test'
import { DEBUG_SLIDESHOW } from '../utils/constants'

Expand Down Expand Up @@ -77,10 +77,10 @@ describe('Debug page empty states', () => {

context('not logged in', () => {
it('renders', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

// We need to set isLoggedIn so that CloudConnectButton shows the correct state
loginConnectStore.setUserFlag('isLoggedIn', false)
userProjectStatusStore.setUserFlag('isLoggedIn', false)

mountWithGql(<DebugNotLoggedIn />)

Expand All @@ -90,18 +90,18 @@ describe('Debug page empty states', () => {
})

it('sends record event upon seeing slideshow', () => {
useLoginConnectStore().setUserFlag('isLoggedIn', false)
useUserProjectStatusStore().setUserFlag('isLoggedIn', false)
mountWithGql(<DebugNotLoggedIn />, { debugSlideshowComplete: false })
cy.get('@recordEvent').should('have.been.calledWithMatch', { campaign: DEBUG_SLIDESHOW.campaigns.login, messageId: Cypress.sinon.match.string, medium: DEBUG_SLIDESHOW.medium, cohort: Cypress.sinon.match(/A|B/) })
})
})

context('no project', () => {
it('renders', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

// We need to set isLoggedIn so that CloudConnectButton shows the correct state
loginConnectStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setUserFlag('isLoggedIn', true)

mountWithGql(<DebugNoProject />)

Expand All @@ -115,7 +115,7 @@ describe('Debug page empty states', () => {
})

it('sends record event upon seeing slideshow', () => {
useLoginConnectStore().setUserFlag('isLoggedIn', false)
useUserProjectStatusStore().setUserFlag('isLoggedIn', false)
mountWithGql(<DebugNoProject />, { debugSlideshowComplete: false })
cy.get('@recordEvent').should('have.been.calledWithMatch', { campaign: DEBUG_SLIDESHOW.campaigns.connectProject, messageId: Cypress.sinon.match.string, medium: DEBUG_SLIDESHOW.medium, cohort: Cypress.sinon.match(/A|B/) })
})
Expand All @@ -131,7 +131,7 @@ describe('Debug page empty states', () => {
})

it('sends record event upon seeing slideshow', () => {
useLoginConnectStore().setUserFlag('isLoggedIn', false)
useUserProjectStatusStore().setUserFlag('isLoggedIn', false)
mountWithGql(<DebugNoRuns />, { debugSlideshowComplete: false })
cy.get('@recordEvent').should('have.been.calledWithMatch', { campaign: DEBUG_SLIDESHOW.campaigns.recordRun, messageId: Cypress.sinon.match.string, medium: DEBUG_SLIDESHOW.medium, cohort: Cypress.sinon.match(/A|B/) })
})
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('Debug page empty states', () => {
}

it('renders slideshow if debugSlideshowComplete = false', () => {
useLoginConnectStore().setUserFlag('isLoggedIn', false)
useUserProjectStatusStore().setUserFlag('isLoggedIn', false)
mountWithGql(<DebugNoRuns />, { cohort: 'B', debugSlideshowComplete: false })
cy.get('@recordEvent').should('have.been.calledWithMatch', { campaign: DEBUG_SLIDESHOW.campaigns.recordRun, messageId: Cypress.sinon.match.string, medium: DEBUG_SLIDESHOW.medium, cohort: Cypress.sinon.match(/A|B/) })
moveThroughSlideshow({ cohort: 'B', percy: true })
Expand All @@ -198,7 +198,7 @@ describe('Debug page empty states', () => {
})

it('renders default empty state if debugSlideshowComplete = true', () => {
useLoginConnectStore().setUserFlag('isLoggedIn', false)
useUserProjectStatusStore().setUserFlag('isLoggedIn', false)
mountWithGql(<DebugNoRuns />, { cohort: 'A', debugSlideshowComplete: true })
cy.findByTestId('debug-default-empty-state')

Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/navigation/SidebarNavigation.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defaultMessages } from '@cy/i18n'
import { CloudRunStatus, SidebarNavigationFragment, SidebarNavigationFragmentDoc, SideBarNavigation_SetPreferencesDocument } from '../generated/graphql-test'
import { CloudRunStubs } from '@packages/graphql/test/stubCloudTypes'
import { cloneDeep } from 'lodash'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'

function mountComponent (props: { initialNavExpandedVal?: boolean, cloudProject?: { status: CloudRunStatus, numFailedTests: number }, isLoading?: boolean, online?: boolean} = {}) {
const withDefaults = { initialNavExpandedVal: false, isLoading: false, online: true, ...props }
Expand Down Expand Up @@ -186,9 +186,9 @@ describe('SidebarNavigation', () => {
})

it('renders no badge when query is loading', () => {
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setProjectFlag('isProjectConnected', true)
userProjectStatusStore.setProjectFlag('isProjectConnected', true)

mountComponent({ isLoading: true })

Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/navigation/SidebarNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ import { useI18n } from '@cy/i18n'
import { useRoute } from 'vue-router'
import SidebarNavigationHeader from './SidebarNavigationHeader.vue'
import { useDebounceFn, useWindowSize } from '@vueuse/core'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'
const { t } = useI18n()
Expand Down Expand Up @@ -162,7 +162,7 @@ const props = defineProps<{
const NAV_EXPAND_MIN_SCREEN_WIDTH = 1024
const loginConnectStore = useLoginConnectStore()
const userProjectStatusStore = useUserProjectStatusStore()
const debugBadge = ref<Badge | undefined>()
Expand All @@ -171,7 +171,7 @@ const setDebugBadge = useDebounceFn((badge) => {
}, 500)
watchEffect(() => {
if (props.isLoading && loginConnectStore.project.isProjectConnected) {
if (props.isLoading && userProjectStatusStore.project.isProjectConnected) {
setDebugBadge(undefined)
return
Expand Down
12 changes: 6 additions & 6 deletions packages/app/src/runs/CloudConnectButton.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CloudConnectButton from './CloudConnectButton.vue'
import { useLoginConnectStore } from '@packages/frontend-shared/src/store/login-connect-store'
import { useUserProjectStatusStore } from '@packages/frontend-shared/src/store/user-project-status-store'

describe('<CloudConnectButton />', { viewportHeight: 60, viewportWidth: 400 }, () => {
context('not logged in ', () => {
Expand All @@ -11,12 +11,12 @@ describe('<CloudConnectButton />', { viewportHeight: 60, viewportWidth: 400 }, (
})

context('logged in', () => {
let loginConnectStore
let userProjectStatusStore

beforeEach(() => {
loginConnectStore = useLoginConnectStore()
userProjectStatusStore = useUserProjectStatusStore()

loginConnectStore.setUserFlag('isLoggedIn', true)
userProjectStatusStore.setUserFlag('isLoggedIn', true)
})

it('show project connect if not connected', () => {
Expand All @@ -26,7 +26,7 @@ describe('<CloudConnectButton />', { viewportHeight: 60, viewportWidth: 400 }, (
})

it('uses the store to open the Login Connect modal', () => {
loginConnectStore.openLoginConnectModal = cy.spy().as('openLoginConnectModal')
userProjectStatusStore.openLoginConnectModal = cy.spy().as('openLoginConnectModal')
cy.mount(() => <div class="h-screen"><CloudConnectButton utmMedium="testing" /></div>)

cy.contains('button', 'Connect a Cypress Cloud project').click()
Expand All @@ -35,7 +35,7 @@ describe('<CloudConnectButton />', { viewportHeight: 60, viewportWidth: 400 }, (
})

it('uses the store to open the Login Connect modal with utmContent', () => {
loginConnectStore.openLoginConnectModal = cy.spy().as('openLoginConnectModal')
userProjectStatusStore.openLoginConnectModal = cy.spy().as('openLoginConnectModal')
cy.mount(() => <div class="h-screen"><CloudConnectButton utmMedium="testing" utmContent="content"/></div>)

cy.contains('button', 'Connect a Cypress Cloud project').click()
Expand Down
Loading

2 comments on commit 6868560

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6868560 May 6, 2023

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 arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.11.1/linux-arm64/update-v8-snapshot-cache-on-develop-6868560b155b3b8e1c20040288eaf3f962d42b7c/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6868560 May 6, 2023

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.11.1/linux-x64/update-v8-snapshot-cache-on-develop-6868560b155b3b8e1c20040288eaf3f962d42b7c/cypress.tgz

Please sign in to comment.