Skip to content

Commit

Permalink
Merge branch 'develop' into release/14.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane authored Oct 10, 2024
2 parents 2686571 + 04c1e8c commit 6d25010
Show file tree
Hide file tree
Showing 35 changed files with 321 additions and 47 deletions.
57 changes: 51 additions & 6 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'misc/remove_marionette_for_geckodriver'
- 'ryanm/fix/find-process'
- 'publish-binary'

# usually we don't build Mac app - it takes a long time
Expand All @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'misc/remove_marionette_for_geckodriver', << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/find-process', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'misc/remove_marionette_for_geckodriver', << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/find-process', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/patch_windows_build', << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/find-process', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -152,7 +152,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "misc/remove_marionette_for_geckodriver" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/fix/find-process" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down Expand Up @@ -1395,6 +1395,30 @@ jobs:
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
yarn percy build:finalize || yarn percy build:finalize
# verify accessibility scores from Cypress
verify-accessibility-results:
<<: *defaults
resource_class: small
steps:
- run: |
if [[ -z MAIN_RECORD_KEY ]]; then
echo "skipping for contributor PRs since we don't record to the cloud"
circleci-agent step halt
fi
- update_known_hosts
- run:
name: checkout
command: git clone -b "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" --depth 1
- run:
name: Install extract-cloud-results package
command: |
npm install https://cdn.cypress.io/extract-cloud-results/v1/extract-cloud-results.tgz
- run:
name: Verify Accessibility Results
command: |
cp ./cypress/scripts/verify-accessibility-results.js verify-accessibility-results.js
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY node verify-accessibility-results.js
ready-to-release:
<<: *defaults
resource_class: small
Expand Down Expand Up @@ -2673,6 +2697,25 @@ linux-x64-workflow: &linux-x64-workflow
- run-reporter-component-tests-chrome
- run-webpack-dev-server-integration-tests
- run-vite-dev-server-integration-tests
# Cypress run must be completed to fetch Accessibility report
- verify-accessibility-results:
context: test-runner:cypress-record-key
requires:
- reporter-integration-tests
- run-app-component-tests-chrome
- run-app-integration-tests-chrome
- run-frontend-shared-component-tests-chrome
- run-launchpad-component-tests-chrome
- run-launchpad-integration-tests-chrome
- run-reporter-component-tests-chrome
- run-webpack-dev-server-integration-tests
- run-vite-dev-server-integration-tests
- driver-integration-tests-firefox
- driver-integration-tests-chrome
- driver-integration-tests-chrome-beta
- driver-integration-tests-electron
- driver-integration-tests-webkit
- driver-integration-memory-tests
- lint-types:
requires:
- build
Expand Down Expand Up @@ -3008,7 +3051,9 @@ linux-x64-contributor-workflow: &linux-x64-contributor-workflow
type: approval
requires:
- build

# verify-accessibility-results is required for status checks, however, it will be skipped for contributors so it
# can run in any order
- verify-accessibility-results
- check-ts:
requires:
- build
Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "130.0.6723.19",
"chrome:stable": "129.0.6668.89",
"chrome:beta": "130.0.6723.31",
"chrome:stable": "129.0.6668.100",
"chrome:minimum": "64.0.3282.0"
}
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ _Released 12/3/2024 (PENDING)_

_Released 10/1/2024 (PENDING)_

**Bugfixes:**

- Patched [find-process](https://github.com/yibn2008/find-process) to fix an issue where trying to clean up browser profiles can throw an error on Windows. Addresses [#30378](https://github.com/cypress-io/cypress/issues/30378).

**Misc:**

- Cypress now consumes [geckodriver](https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html) to help automate the Firefox browser instead of [marionette-client](https://github.com/cypress-io/marionette-client). Addresses [#30217](https://github.com/cypress-io/cypress/issues/30217).
Expand Down
4 changes: 2 additions & 2 deletions packages/app/cypress/e2e/create-from-component.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function validateCreateFromVueComponentCard (beforeEachFn: () => void, expectedS

cy.findByText('*.vue').should('be.visible')
cy.findByText('2 matches').should('be.visible')
cy.findByLabelText('file-name-input').type('HelloWorld')
cy.findByLabelText('Search by filename').type('HelloWorld')

cy.findByText('HelloWorld').should('be.visible')
cy.findByText('1 of 2 matches').should('be.visible')
Expand Down Expand Up @@ -124,7 +124,7 @@ function validateCreateFromReactComponentCard (beforeEachFn: () => void, expecte

cy.findByText('*.{js,jsx,tsx}').should('be.visible')
cy.findByText('5 matches').should('be.visible')
cy.findByLabelText('file-name-input').type('App')
cy.findByLabelText('Search by filename').type('App')

cy.findByText('App').should('be.visible')
cy.findByText('1 of 5 matches').should('be.visible')
Expand Down
8 changes: 4 additions & 4 deletions packages/app/cypress/e2e/specs.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ describe('App: Specs', () => {
.and('contain', defaultMessages.createSpec.page.customPatternNoSpecs.description.split('{0}')[0])

cy.findByTestId('file-match-indicator').should('contain', 'No matches')
cy.findByRole('button', { name: 'cypress.config.js' })
cy.findByRole('button', { name: 'open in IDE' })
cy.findByTestId('spec-pattern').should('contain', 'src/**/*.{cy,spec}.{js,jsx}')

cy.contains('button', defaultMessages.createSpec.updateSpecPattern)
Expand All @@ -359,7 +359,7 @@ describe('App: Specs', () => {
o.sinon.stub(ctx.actions.file, 'openFile')
})

cy.findByRole('button', { name: 'cypress.config.js' }).click()
cy.findByRole('button', { name: 'open in IDE' }).click()

cy.withCtx((ctx, o) => {
expect(ctx.actions.file.openFile).to.have.been.calledWith(o.sinon.match(new RegExp(`cypress\.config\.js$`)), 1, 1)
Expand Down Expand Up @@ -695,7 +695,7 @@ describe('App: Specs', () => {
.and('contain', defaultMessages.createSpec.page.customPatternNoSpecs.description.split('{0}')[0])

cy.findByTestId('file-match-indicator').should('contain', 'No matches')
cy.findByRole('button', { name: 'cypress.config.js' })
cy.findByRole('button', { name: 'open in IDE' })
cy.findByTestId('spec-pattern').should('contain', 'src/specs-folder/*.cy.{js,jsx}')

cy.contains('button', defaultMessages.createSpec.updateSpecPattern)
Expand All @@ -707,7 +707,7 @@ describe('App: Specs', () => {
o.sinon.stub(ctx.actions.file, 'openFile')
})

cy.findByRole('button', { name: 'cypress.config.js' }).click()
cy.findByRole('button', { name: 'open in IDE' }).click()

cy.withCtx((ctx, o) => {
expect(ctx.actions.file.openFile).to.have.been.calledWith(o.sinon.match(new RegExp(`cypress\.config\.js$`)), 1, 1)
Expand Down
5 changes: 4 additions & 1 deletion packages/app/src/components/FileMatch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<div class="rounded border h-[40px] w-full inline-flex items-center hocus-default focus-within-default truncate">
<FileMatchButton
:expanded="expanded"
:aria-label="t('components.fileSearch.expandToSearchByExtensions')"
@click="toggleExpanded()"
>
<span v-if="!expanded">{{ localExtensionPattern }}</span>
Expand All @@ -45,12 +46,13 @@
v-if="expanded"
v-model="localExtensionPattern"
class="ml-[12px]"
:aria-label="t('components.fileSearch.byExtensionInput')"
:placeholder="t('components.fileSearch.byExtensionInput')"
/>
<FileMatchInput
v-else
v-model="localPattern"
aria-label="file-name-input"
aria-label="Search by filename"
:placeholder="t('components.fileSearch.byFilenameInput')"
/>
</div>
Expand All @@ -72,6 +74,7 @@
<i-cy-magnifying-glass_x16 class="mr-[8px] ml-[12px] inline-block icon-light-gray-50 icon-dark-gray-500 group-focus-within:icon-light-indigo-50 group-focus-within:icon-dark-indigo-400" />
<FileMatchInput
v-model="localPattern"
:aria-label="t('components.fileSearch.byFilenameInput')"
:placeholder="t('components.fileSearch.byFilenameInput')"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/FileMatchInput.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('<FileMatchInput />', () => {
}

cy.mount(() => (<div class="p-12">
<FileMatchInput modelValue={inputText.value} {...methods} />
<FileMatchInput aria-label="search for file" modelValue={inputText.value} {...methods} />
</div>))
.get('input[type=search]').should('have.value', initialText)
.clear().type(newText)
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/components/SpecPatterns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
>
<button
class="flex outline-transparent text-indigo-500 gap-[8px] items-center group"
aria-label="open in IDE"
@click="onClick"
>
<i-cy-document-text_x16 class="icon-light-gray-100 icon-dark-gray-500" />
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/runner/SnapshotControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
v-if="shouldShowStateControls || shouldShowHighlightControls"
class="border-transparent rounded outline-none bg-gray-900 border my-1 mr-[2px] transition duration-150 hocus:border-purple-300 "
style="padding: 3px"
aria-label="unpin snapshot"
@click="unpin"
>
<i-cy-delete_x16
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/runner/SnapshotHighlightControls.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div class="rounded flex font-medium bg-gray-900 py-[2px] px-[12px] text-gray-200 text-[14px] leading-[20px] gap-[8px] items-center">
<Switch
name="toggle-highlights"
label-id="toggle-highlights"
:value="props.value"
size="sm"
@update="emits('toggle')"
/>
<label
for="toggle-highlights"
id="toggle-highlights"
class="cursor-pointer"
>{{ t('runner.snapshot.highlightsLabel') }}
</label>
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/runner/SpecRunnerHeaderOpenMode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
ref="autUrlInputRef"
:value="studioStore.needsUrl ? urlInProgress : autUrl"
data-cy="aut-url-input"
aria-label="url of the application under test"
class="flex grow mr-[12px] leading-normal max-w-full text-indigo-500 z-51 self-center hocus-link-default truncate"
@input="setStudioUrl"
@click="openExternally"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
>
<button
class="border rounded-md flex h-full outline-none border-gray-200 text-white transition w-[40px] duration-150 items-center justify-center hocus-default"
:aria-label="selectorPlaygroundStore.isEnabled ? 'click to interact with the application and build test cases' : 'click to exit interactive test building mode'"
data-cy="playground-toggle"
@click="toggleEnabled"
>
Expand Down Expand Up @@ -64,6 +65,7 @@
autocomplete="off"
autocorrect="off"
spellcheck="false"
aria-label="selector"
data-cy="playground-selector"
:style="{paddingLeft: leftOfInputText + 'ch', paddingRight: widthOfMatchesHelperText + 'px'}"
class="border rounded-r-md font-medium h-full outline-none border-gray-200 w-full text-indigo-500 hocus-default overflow-ellipsis"
Expand Down Expand Up @@ -103,6 +105,7 @@
variant="outline"
data-cy="playground-copy"
class="override-border"
aria-label="click to copy command to clipboard"
@click="copyToClipboard"
@focus="focus"
>
Expand All @@ -124,6 +127,7 @@
variant="outline"
data-cy="playground-print"
class="override-border"
aria-label="click to print command to console"
@click="printSelected()"
@focus="focus"
>
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/settings/SettingsSection.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<section :id="anchor">
<h2
:id="labelId"
class="font-medium text-[16px] text-gray-900 leading-[24px] inline-flex items-baseline align-middle"
>
<slot name="title" />
Expand All @@ -22,5 +23,6 @@
defineProps<{
code?: string
anchor?: string
labelId?: string
}>()
</script>
9 changes: 7 additions & 2 deletions packages/app/src/settings/device/ExternalEditorSettings.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<template>
<SettingsSection>
<template #title>
<SettingsSection
label-id="choose-editor-label"
>
<template
#title
>
{{ t('settingsPage.editor.title') }}
</template>
<template #description>
Expand All @@ -10,6 +14,7 @@
<ChooseExternalEditor
v-if="props.gql.localSettings"
:gql="props.gql"
label-id="choose-editor-label"
@chose-editor="handleChoseEditor"
/>
</SettingsSection>
Expand Down
9 changes: 6 additions & 3 deletions packages/app/src/settings/device/NotificationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@

<div class="px-[16px] divide-y divide-gray-50">
<div
v-for="({id, title}) in switches"
v-for="({id, labelId, title}) in switches"
:key="id"
class="py-[16px]"
>
<h4 class="flex text-gray-800 text-[16px] leading-[24px] items-center">
<label :for="id">{{ title }}</label>
<label :id="labelId">{{ title }}</label>
<Switch
:id="id"
class="mx-[8px]"
:value="props.gql.localSettings.preferences[id] ?? false"
:name="id"
:label-id="labelId"
:disabled="!desktopNotificationsEnabled"
@update="(value) => updatePref(id, value)"
/>
Expand Down Expand Up @@ -149,10 +150,12 @@ mutation NotificationSettings_ShowNotification($title: String!, $body: String!)
const switches = [
{
id: 'notifyWhenRunStarts',
labelId: 'notifyWhenRunStartsLabel',
title: t('settingsPage.notifications.notifyMeWhenRunStarts'),
},
{
id: 'notifyWhenRunStartsFailing',
labelId: 'notifyWhenRunStartsFailingLabel',
title: t('settingsPage.notifications.notifyMeWhenRunIsFailing'),
},
]
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/settings/device/TestingPreferences.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('<TestingPreferences />', () => {
</div>),
})

cy.get(`#autoScrollingEnabled[role="switch"]`)
cy.get(`#autoScrollingToggle[role="switch"]`)
.should('have.attr', 'aria-checked', 'false')
})
})
5 changes: 3 additions & 2 deletions packages/app/src/settings/device/TestingPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
>
<div class="py-[16px]">
<h4 class="flex text-gray-800 text-[16px] leading-[24px] items-center">
<label :for="autoScrollingPreference.id">{{ autoScrollingPreference.title }}</label>
<label :id="autoScrollingPreference.id">{{ autoScrollingPreference.title }}</label>
<Switch
id="autoScrollingToggle"
class="mx-[8px]"
:value="props.gql.localSettings.preferences[autoScrollingPreference.id] ?? false"
:name="autoScrollingPreference.id"
:label-id="autoScrollingPreference.id"
@update="(value) => updatePref(value)"
/>
</h4>
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/specs/InlineRunAllSpecs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<button
class="flex h-full w-full items-center justify-center"
data-cy="run-all-specs-button"
:aria-label="t('specPage.runSelectedSpecs', specNumber)"
:disabled="specNumber === 0"
@click.stop="emits('runAllSpecs')"
>
Expand Down
Loading

2 comments on commit 6d25010

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d25010 Oct 10, 2024

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/14.0.0/linux-arm64/release/14.0.0-6d250106cc2184a79c36b6b35c3c5e77bd5b6218/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d25010 Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 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/14.0.0/win32-x64/release/14.0.0-6d250106cc2184a79c36b6b35c3c5e77bd5b6218/cypress.tgz

Please sign in to comment.