Skip to content

Commit dc4c91b

Browse files
committed
Merge branch 'develop' into chore/update-burn-in-feat-from-develop
2 parents 3ef2fc7 + d6e2a0d commit dc4c91b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+762
-128
lines changed

.circleci/cache-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Bump this version to force CI to re-create the cache from scratch.
22

3-
11-07-23.1
3+
11-07-23.2

.circleci/workflows.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ windowsWorkflowFilters: &windows-workflow-filters
8888
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
8989
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
9090
- equal: [ 'em/shallow-checkout', << pipeline.git.branch >> ]
91+
- equal: [ 'mschile/mochaEvents_win_sep', << pipeline.git.branch >> ]
9192
- matches:
9293
pattern: /^release\/\d+\.\d+\.\d+$/
9394
value: << pipeline.git.branch >>
@@ -1345,18 +1346,7 @@ jobs:
13451346
resource_class: << parameters.resource_class >>
13461347
steps:
13471348
- update_known_hosts
1348-
- when:
1349-
condition:
1350-
equal: [ *windows-executor, << parameters.executor >> ]
1351-
steps: # issue with ssh keys on windows
1352-
- checkout
1353-
- unless:
1354-
condition:
1355-
equal: [ *windows-executor, << parameters.executor >> ]
1356-
steps:
1357-
- run:
1358-
name: checkout
1359-
command: git clone -b "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" . --depth 1
1349+
- checkout
13601350
- install-required-node
13611351
- verify-build-setup:
13621352
executor: << parameters.executor >>

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ We do not continuously deploy the Cypress binary, so `develop` contains all of t
442442
- Changes has user-facing impact:
443443
- `breaking` - A breaking change that will require a MVB
444444
- `dependency` - A change to a dependency that impact the user
445-
- `deprecation` - A API deprecation notice for users
445+
- `deprecation` - An API deprecation notice for users
446446
- `feat` - A new feature
447447
- `fix` - A bug fix or regression fix.
448448
- `misc` - a misc user-facing change, like a UI update which is not a fix or enhancement to how Cypress works

cli/CHANGELOG.md

+34-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,50 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2-
## 13.4.1
2+
## 13.6.0
33

4-
_Released 11/7/2023 (PENDING)_
4+
_Released 11/21/2023 (PENDING)_
55

66
**Features:**
77

8-
- Adds Component Testing support for Angular version 17. Addresses [#28153](https://github.com/cypress-io/cypress/issues/28153).
8+
- When artifacts are uploaded to the Cypress Cloud, the duration of each upload will be displayed in the console. Addresses [#28237](https://github.com/cypress-io/cypress/issues/28237).
99

1010
**Bugfixes:**
1111

12+
- The URL of the application under test and command error "Learn more" links now open externally instead of in the Cypress-launched browser. Fixes [#24572](https://github.com/cypress-io/cypress/issues/24572).
13+
14+
**Misc:**
15+
16+
- Browser tabs and windows other than the Cypress tab are now closed between tests in Chromium-based browsers. Addressed in [#28204](https://github.com/cypress-io/cypress/pull/28204).
17+
- Cypress now ensures the main browser tab is active before running eaech command in Chromium-based browsers. Addressed in [#28334](https://github.com/cypress-io/cypress/pull/28334).
18+
19+
## 13.5.1
20+
21+
_Released 11/14/2023_
22+
23+
**Bugfixes:**
24+
25+
- Fixed a regression in [`13.5.0`](https://docs.cypress.io/guides/references/changelog/13.5.0) where requests cached within a given spec may take longer to load than they did previously. Addresses [#28295](https://github.com/cypress-io/cypress/issues/28295).
26+
- Fixed an issue where pages opened in a new tab were missing response headers, causing them not to load properly. Fixes [#28293](https://github.com/cypress-io/cypress/issues/28293) and [#28303](https://github.com/cypress-io/cypress/issues/28303).
27+
- We now pass a flag to Chromium browsers to disable default component extensions. This is a common flag passed during browser automation. Fixed in [#28294](https://github.com/cypress-io/cypress/pull/28294).
28+
29+
## 13.5.0
30+
31+
_Released 11/8/2023_
32+
33+
**Features:**
34+
35+
- Added Component Testing support for [Angular](https://angular.io/) version 17. Addresses [#28153](https://github.com/cypress-io/cypress/issues/28153).
36+
37+
**Bugfixes:**
38+
39+
- Fixed an issue in chromium based browsers, where global style updates can trigger flooding of font face requests in DevTools and Test Replay. This can affect performance due to the flooding of messages in CDP. Fixes [#28150](https://github.com/cypress-io/cypress/issues/28150) and [#28215](https://github.com/cypress-io/cypress/issues/28215).
40+
- Fixed a regression in [`13.3.3`](https://docs.cypress.io/guides/references/changelog/13.3.3) where Cypress would hang on loading shared workers when using `cy.reload` to reload the page. Fixes [#28248](https://github.com/cypress-io/cypress/issues/28248).
41+
- Fixed an issue where network requests made from tabs, or windows other than the main Cypress tab, would be delayed. Fixes [#28113](https://github.com/cypress-io/cypress/issues/28113).
42+
- Fixed an issue with 'other' targets (e.g. pdf documents embedded in an object tag) not fully loading. Fixes [#28228](https://github.com/cypress-io/cypress/issues/28228) and [#28162](https://github.com/cypress-io/cypress/issues/28162).
1243
- Fixed an issue where clicking a link to download a file could cause a page load timeout when the download attribute was missing. Note: download behaviors in experimental Webkit are still an issue. Fixes [#14857](https://github.com/cypress-io/cypress/issues/14857).
1344
- Fixed an issue to account for canceled and failed downloads to correctly reflect these status in Command log as a download failure where previously it would be pending. Fixed in [#28222](https://github.com/cypress-io/cypress/pull/28222).
1445
- Fixed an issue determining visibility when an element is hidden by an ancestor with a shared edge. Fixes [#27514](https://github.com/cypress-io/cypress/issues/27514).
1546
- We now pass a flag to Chromium browsers to disable Chrome translation, both the manual option and the popup prompt, when a page with a differing language is detected. Fixes [#28225](https://github.com/cypress-io/cypress/issues/28225).
16-
- Fixed an issue where in chromium based browsers, global style updates can trigger flooding of font face requests in DevTools and Test Replay. This can affect performance due to the flooding of messages in CDP. Fixes [#28150](https://github.com/cypress-io/cypress/issues/28150) and [#28215](https://github.com/cypress-io/cypress/issues/28215).
17-
- Fixed an issue with 'other' targets (e.g. pdf documents embedded in an object tag) not fully loading. Fixes [#28228](https://github.com/cypress-io/cypress/issues/28228) and [#28162](https://github.com/cypress-io/cypress/issues/28162).
18-
- Fixed an issue where network requests made from tabs/windows other than the main Cypress tab would be delayed. Fixes [#28113](https://github.com/cypress-io/cypress/issues/28113).
1947
- Stopped processing CDP events at the end of a spec when Test Isolation is off and Test Replay is enabled. Addressed in [#28213](https://github.com/cypress-io/cypress/pull/28213).
20-
- Fixed a regression in [`13.3.3`](https://docs.cypress.io/guides/references/changelog/13.3.3) where Cypress would hang on loading shared workers when using `cy.reload` to reload the page. Fixes [#28248](https://github.com/cypress-io/cypress/issues/28248).
2148

2249
## 13.4.0
2350

cli/types/cypress.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ declare namespace Cypress {
818818
* Trigger action
819819
* @private
820820
*/
821-
action: (action: string, ...args: any[]) => any[] | void
821+
action: <T = (any[] | void)>(action: string, ...args: any[]) => T
822822

823823
/**
824824
* Load files

npm/webpack-dev-server/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/webpack-dev-server-v3.7.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v3.6.1...@cypress/webpack-dev-server-v3.7.0) (2023-11-07)
2+
3+
4+
### Features
5+
6+
* add support for angular 17 ([#28152](https://github.com/cypress-io/cypress/issues/28152)) ([e8fc268](https://github.com/cypress-io/cypress/commit/e8fc26895354366211ace7e6550fe38c348c28bd))
7+
18
# [@cypress/webpack-dev-server-v3.6.1](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v3.6.0...@cypress/webpack-dev-server-v3.6.1) (2023-09-07)
29

310
# [@cypress/webpack-dev-server-v3.6.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v3.5.3...@cypress/webpack-dev-server-v3.6.0) (2023-09-07)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cypress",
3-
"version": "13.4.0",
3+
"version": "13.5.1",
44
"description": "Cypress is a next generation front end testing tool built for the modern web",
55
"private": true,
66
"scripts": {

packages/app/cypress/e2e/runner/support/mochaEventsUtils.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,8 @@ function sanitizeMochaEvents (args: CypressInCypressMochaEvent[]) {
204204
}
205205

206206
function getCallerFilename () {
207-
return (new Error()).stack!.split('\n')[1].split('/').slice(-1)[0].split(':')[0]
207+
const line = (new Error()).stack!.split('\n')[1]
208+
const pathSep = line.includes('\\') ? '\\' : '/'
209+
210+
return line.split(pathSep).slice(-1)[0].split(':')[0]
208211
}

packages/app/src/runner/SpecRunnerHeaderOpenMode.cy.tsx

+30
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useAutStore } from '../store'
33
import { SpecRunnerHeaderFragment, SpecRunnerHeaderFragmentDoc } from '../generated/graphql-test'
44
import { createEventManager, createTestAutIframe } from '../../cypress/component/support/ctSupport'
55
import { allBrowsersIcons } from '@packages/frontend-shared/src/assets/browserLogos'
6+
import { ExternalLink_OpenExternalDocument } from '@packages/frontend-shared/src/generated/graphql'
67

78
function renderWithGql (gqlVal: SpecRunnerHeaderFragment) {
89
const eventManager = createEventManager()
@@ -146,6 +147,35 @@ describe('SpecRunnerHeaderOpenMode', { viewportHeight: 500 }, () => {
146147
cy.findByTestId('viewport').should('be.visible').contains('500x500')
147148
})
148149

150+
it('opens aut url externally', () => {
151+
const autStore = useAutStore()
152+
const autUrl = 'http://localhost:3000/todo'
153+
154+
autStore.updateUrl(autUrl)
155+
156+
cy.mountFragment(SpecRunnerHeaderFragmentDoc, {
157+
onResult: (gql) => {
158+
gql.currentTestingType = 'e2e'
159+
},
160+
render: (gqlVal) => {
161+
return renderWithGql(gqlVal)
162+
},
163+
})
164+
165+
const openExternalStub = cy.stub()
166+
167+
cy.stubMutationResolver(ExternalLink_OpenExternalDocument, (defineResult, { url }) => {
168+
openExternalStub(url)
169+
170+
return defineResult({
171+
openExternal: true,
172+
})
173+
})
174+
175+
cy.findByTestId('aut-url-input').click()
176+
cy.wrap(openExternalStub).should('have.been.calledWith', 'http://localhost:3000/todo')
177+
})
178+
149179
it('does not show url section if currentTestingType is component', () => {
150180
const autStore = useAutStore()
151181

packages/app/src/runner/SpecRunnerHeaderOpenMode.vue

+6-4
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@
2525
</Button>
2626
<input
2727
ref="autUrlInputRef"
28-
target="_blank"
2928
:value="studioStore.needsUrl ? urlInProgress : autUrl"
3029
data-cy="aut-url-input"
3130
class="flex grow mr-[12px] leading-normal max-w-full text-indigo-500 z-51 self-center hocus-link-default truncate"
3231
@input="setStudioUrl"
33-
@click="openInNewTab"
32+
@click="openExternally"
3433
@keyup.enter="visitUrl"
3534
>
3635
<StudioUrlPrompt
@@ -186,6 +185,7 @@ import SpecRunnerDropdown from './SpecRunnerDropdown.vue'
186185
import { allBrowsersIcons } from '@packages/frontend-shared/src/assets/browserLogos'
187186
import BookIcon from '~icons/cy/book_x16'
188187
import { useStudioStore } from '../store/studio-store'
188+
import { useExternalLink } from '@cy/gql-components/useExternalLink'
189189
190190
gql`
191191
fragment SpecRunnerHeader on CurrentProject {
@@ -255,6 +255,8 @@ const activeSpecPath = specStore.activeSpec?.absolute
255255
256256
const isDisabled = computed(() => autStore.isRunning || autStore.isLoading)
257257
258+
const openExternal = useExternalLink()
259+
258260
function setStudioUrl (event: Event) {
259261
const url = (event.currentTarget as HTMLInputElement).value
260262
@@ -265,11 +267,11 @@ function visitUrl () {
265267
studioStore.visitUrl(urlInProgress.value)
266268
}
267269
268-
function openInNewTab () {
270+
function openExternally () {
269271
if (!autStore.url || studioStore.isActive) {
270272
return
271273
}
272274
273-
window.open(autStore.url, '_blank')?.focus()
275+
openExternal(autStore.url)
274276
}
275277
</script>

packages/driver/cypress/e2e/commands/actions/click.cy.js

+13
Original file line numberDiff line numberDiff line change
@@ -1678,12 +1678,25 @@ describe('src/cy/commands/actions/click', () => {
16781678
it('can scroll to and click elements in html with scroll-behavior: smooth', () => {
16791679
cy.get('html').invoke('css', 'scrollBehavior', 'smooth')
16801680
cy.get('#table tr:first').click()
1681+
// Validate that the scrollBehavior is still smooth even after the actionability fixes we do
1682+
cy.get('html').invoke('css', 'scrollBehavior').then((scrollBehavior) => expect(scrollBehavior).to.eq('smooth'))
1683+
})
1684+
1685+
// https://github.com/cypress-io/cypress/issues/28150
1686+
it('can scroll to and click elements in html with scroll-behavior: smooth and overflow-y: auto', () => {
1687+
cy.get('html').invoke('css', 'scrollBehavior', 'smooth')
1688+
cy.get('body').invoke('css', 'overflow-y', 'auto')
1689+
cy.get('#table tr:first').click()
1690+
// Validate that the scrollBehavior is still smooth even after the actionability fixes we do
1691+
cy.get('html').invoke('css', 'scrollBehavior').then((scrollBehavior) => expect(scrollBehavior).to.eq('smooth'))
16811692
})
16821693

16831694
// https://github.com/cypress-io/cypress/issues/3200
16841695
it('can scroll to and click elements in ancestor element with scroll-behavior: smooth', () => {
16851696
cy.get('#dom').invoke('css', 'scrollBehavior', 'smooth')
16861697
cy.get('#table tr:first').click()
1698+
// Validate that the scrollBehavior is still smooth even after the actionability fixes we do
1699+
cy.get('#dom').invoke('css', 'scrollBehavior').then((scrollBehavior) => expect(scrollBehavior).to.eq('smooth'))
16871700
})
16881701
})
16891702
})

packages/driver/cypress/e2e/cypress/browser.cy.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@ import browserProps from '@packages/driver/src/cypress/browser'
22

33
describe('src/cypress/browser', () => {
44
beforeEach(function () {
5-
this.commands = (browser = { name: 'chrome', family: 'chromium' }) => {
5+
this.commands = (browser = { name: 'chrome', family: 'chromium', isHeadless: false }) => {
66
return browserProps({ browser })
77
}
88
})
99

1010
context('.browser', () => {
1111
it('returns the current browser', function () {
12-
expect(this.commands().browser).to.eql({ name: 'chrome', family: 'chromium' })
12+
expect(this.commands().browser).to.eql({ name: 'chrome', family: 'chromium', isHeadless: false })
1313
})
1414
})
1515

1616
context('.isBrowser', () => {
1717
it('returns true if it\'s a match', function () {
1818
expect(this.commands().isBrowser('chrome')).to.be.true
1919
expect(this.commands().isBrowser({ family: 'chromium' })).to.be.true
20+
expect(this.commands().isBrowser({ isHeadless: false })).to.be.true
2021
})
2122

2223
it('returns false if it\'s not a match', function () {
2324
expect(this.commands().isBrowser('firefox')).to.be.false
25+
expect(this.commands().isBrowser({ isHeadless: true })).to.be.false
2426
})
2527

2628
it('is case-insensitive', function () {
@@ -33,6 +35,7 @@ describe('src/cypress/browser', () => {
3335
expect(this.commands().isBrowser({
3436
family: 'chromium',
3537
name: '!firefox',
38+
isHeadless: false,
3639
})).to.be['true']
3740

3841
expect(this.commands().isBrowser({

packages/driver/cypress/e2e/dom/visibility.cy.ts

+24-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('src/cypress/dom/visibility', () => {
5353
expect(fn()).to.be.true
5454
})
5555

56-
it('returns false window and body > window height', () => {
56+
it('returns false if window and body < window height', () => {
5757
cy.$$('body').html('<div>foo</div>')
5858

5959
const win = cy.state('window')
@@ -65,6 +65,29 @@ describe('src/cypress/dom/visibility', () => {
6565
expect(fn()).to.be.false
6666
})
6767

68+
it('returns true if document element and body > window height', function () {
69+
this.add('<div style="height: 1000px; width: 10px;" />')
70+
const documentElement = Cypress.dom.wrap(cy.state('document').documentElement)
71+
72+
const fn = () => {
73+
return dom.isScrollable(documentElement)
74+
}
75+
76+
expect(fn()).to.be.true
77+
})
78+
79+
it('returns false if document element and body < window height', () => {
80+
cy.$$('body').html('<div>foo</div>')
81+
82+
const documentElement = Cypress.dom.wrap(cy.state('document').documentElement)
83+
84+
const fn = () => {
85+
return dom.isScrollable(documentElement)
86+
}
87+
88+
expect(fn()).to.be.false
89+
})
90+
6891
it('returns false el is not scrollable', function () {
6992
const noScroll = this.add(`\
7093
<div style="height: 100px; overflow: auto;">

0 commit comments

Comments
 (0)