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

chore: update burn-in feature branch from develop #28353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

11-07-23.1
11-07-23.2
14 changes: 2 additions & 12 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- equal: [ 'em/shallow-checkout', << pipeline.git.branch >> ]
- equal: [ 'mschile/mochaEvents_win_sep', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -1345,18 +1346,7 @@ jobs:
resource_class: << parameters.resource_class >>
steps:
- update_known_hosts
- when:
condition:
equal: [ *windows-executor, << parameters.executor >> ]
steps: # issue with ssh keys on windows
- checkout
- unless:
condition:
equal: [ *windows-executor, << parameters.executor >> ]
steps:
- run:
name: checkout
command: git clone -b "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" . --depth 1
- checkout
- install-required-node
- verify-build-setup:
executor: << parameters.executor >>
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ We do not continuously deploy the Cypress binary, so `develop` contains all of t
- Changes has user-facing impact:
- `breaking` - A breaking change that will require a MVB
- `dependency` - A change to a dependency that impact the user
- `deprecation` - A API deprecation notice for users
- `deprecation` - An API deprecation notice for users
- `feat` - A new feature
- `fix` - A bug fix or regression fix.
- `misc` - a misc user-facing change, like a UI update which is not a fix or enhancement to how Cypress works
Expand Down
41 changes: 34 additions & 7 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.4.1
## 13.6.0

_Released 11/7/2023 (PENDING)_
_Released 11/21/2023 (PENDING)_

**Features:**

- Adds Component Testing support for Angular version 17. Addresses [#28153](https://github.com/cypress-io/cypress/issues/28153).
- 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).

**Bugfixes:**

- 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).

**Misc:**

- 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).
- 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).

## 13.5.1

_Released 11/14/2023_

**Bugfixes:**

- 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).
- 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).
- 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).

## 13.5.0

_Released 11/8/2023_

**Features:**

- Added Component Testing support for [Angular](https://angular.io/) version 17. Addresses [#28153](https://github.com/cypress-io/cypress/issues/28153).

**Bugfixes:**

- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).
- 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).

## 13.4.0

Expand Down
2 changes: 1 addition & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ declare namespace Cypress {
* Trigger action
* @private
*/
action: (action: string, ...args: any[]) => any[] | void
action: <T = (any[] | void)>(action: string, ...args: any[]) => T

/**
* Load files
Expand Down
7 changes: 7 additions & 0 deletions npm/webpack-dev-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@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)


### Features

* add support for angular 17 ([#28152](https://github.com/cypress-io/cypress/issues/28152)) ([e8fc268](https://github.com/cypress-io/cypress/commit/e8fc26895354366211ace7e6550fe38c348c28bd))

# [@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)

# [@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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress",
"version": "13.4.0",
"version": "13.5.1",
"description": "Cypress is a next generation front end testing tool built for the modern web",
"private": true,
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/app/cypress/e2e/runner/support/mochaEventsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,8 @@ function sanitizeMochaEvents (args: CypressInCypressMochaEvent[]) {
}

function getCallerFilename () {
return (new Error()).stack!.split('\n')[1].split('/').slice(-1)[0].split(':')[0]
const line = (new Error()).stack!.split('\n')[1]
const pathSep = line.includes('\\') ? '\\' : '/'

return line.split(pathSep).slice(-1)[0].split(':')[0]
}
30 changes: 30 additions & 0 deletions packages/app/src/runner/SpecRunnerHeaderOpenMode.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useAutStore } from '../store'
import { SpecRunnerHeaderFragment, SpecRunnerHeaderFragmentDoc } from '../generated/graphql-test'
import { createEventManager, createTestAutIframe } from '../../cypress/component/support/ctSupport'
import { allBrowsersIcons } from '@packages/frontend-shared/src/assets/browserLogos'
import { ExternalLink_OpenExternalDocument } from '@packages/frontend-shared/src/generated/graphql'

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

it('opens aut url externally', () => {
const autStore = useAutStore()
const autUrl = 'http://localhost:3000/todo'

autStore.updateUrl(autUrl)

cy.mountFragment(SpecRunnerHeaderFragmentDoc, {
onResult: (gql) => {
gql.currentTestingType = 'e2e'
},
render: (gqlVal) => {
return renderWithGql(gqlVal)
},
})

const openExternalStub = cy.stub()

cy.stubMutationResolver(ExternalLink_OpenExternalDocument, (defineResult, { url }) => {
openExternalStub(url)

return defineResult({
openExternal: true,
})
})

cy.findByTestId('aut-url-input').click()
cy.wrap(openExternalStub).should('have.been.calledWith', 'http://localhost:3000/todo')
})

it('does not show url section if currentTestingType is component', () => {
const autStore = useAutStore()

Expand Down
10 changes: 6 additions & 4 deletions packages/app/src/runner/SpecRunnerHeaderOpenMode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
</Button>
<input
ref="autUrlInputRef"
target="_blank"
:value="studioStore.needsUrl ? urlInProgress : autUrl"
data-cy="aut-url-input"
class="flex grow mr-[12px] leading-normal max-w-full text-indigo-500 z-51 self-center hocus-link-default truncate"
@input="setStudioUrl"
@click="openInNewTab"
@click="openExternally"
@keyup.enter="visitUrl"
>
<StudioUrlPrompt
Expand Down Expand Up @@ -186,6 +185,7 @@ import SpecRunnerDropdown from './SpecRunnerDropdown.vue'
import { allBrowsersIcons } from '@packages/frontend-shared/src/assets/browserLogos'
import BookIcon from '~icons/cy/book_x16'
import { useStudioStore } from '../store/studio-store'
import { useExternalLink } from '@cy/gql-components/useExternalLink'

gql`
fragment SpecRunnerHeader on CurrentProject {
Expand Down Expand Up @@ -255,6 +255,8 @@ const activeSpecPath = specStore.activeSpec?.absolute

const isDisabled = computed(() => autStore.isRunning || autStore.isLoading)

const openExternal = useExternalLink()

function setStudioUrl (event: Event) {
const url = (event.currentTarget as HTMLInputElement).value

Expand All @@ -265,11 +267,11 @@ function visitUrl () {
studioStore.visitUrl(urlInProgress.value)
}

function openInNewTab () {
function openExternally () {
if (!autStore.url || studioStore.isActive) {
return
}

window.open(autStore.url, '_blank')?.focus()
openExternal(autStore.url)
}
</script>
13 changes: 13 additions & 0 deletions packages/driver/cypress/e2e/commands/actions/click.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1678,12 +1678,25 @@ describe('src/cy/commands/actions/click', () => {
it('can scroll to and click elements in html with scroll-behavior: smooth', () => {
cy.get('html').invoke('css', 'scrollBehavior', 'smooth')
cy.get('#table tr:first').click()
// Validate that the scrollBehavior is still smooth even after the actionability fixes we do
cy.get('html').invoke('css', 'scrollBehavior').then((scrollBehavior) => expect(scrollBehavior).to.eq('smooth'))
})

// https://github.com/cypress-io/cypress/issues/28150
it('can scroll to and click elements in html with scroll-behavior: smooth and overflow-y: auto', () => {
cy.get('html').invoke('css', 'scrollBehavior', 'smooth')
cy.get('body').invoke('css', 'overflow-y', 'auto')
cy.get('#table tr:first').click()
// Validate that the scrollBehavior is still smooth even after the actionability fixes we do
cy.get('html').invoke('css', 'scrollBehavior').then((scrollBehavior) => expect(scrollBehavior).to.eq('smooth'))
})

// https://github.com/cypress-io/cypress/issues/3200
it('can scroll to and click elements in ancestor element with scroll-behavior: smooth', () => {
cy.get('#dom').invoke('css', 'scrollBehavior', 'smooth')
cy.get('#table tr:first').click()
// Validate that the scrollBehavior is still smooth even after the actionability fixes we do
cy.get('#dom').invoke('css', 'scrollBehavior').then((scrollBehavior) => expect(scrollBehavior).to.eq('smooth'))
})
})
})
Expand Down
7 changes: 5 additions & 2 deletions packages/driver/cypress/e2e/cypress/browser.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@ import browserProps from '@packages/driver/src/cypress/browser'

describe('src/cypress/browser', () => {
beforeEach(function () {
this.commands = (browser = { name: 'chrome', family: 'chromium' }) => {
this.commands = (browser = { name: 'chrome', family: 'chromium', isHeadless: false }) => {
return browserProps({ browser })
}
})

context('.browser', () => {
it('returns the current browser', function () {
expect(this.commands().browser).to.eql({ name: 'chrome', family: 'chromium' })
expect(this.commands().browser).to.eql({ name: 'chrome', family: 'chromium', isHeadless: false })
})
})

context('.isBrowser', () => {
it('returns true if it\'s a match', function () {
expect(this.commands().isBrowser('chrome')).to.be.true
expect(this.commands().isBrowser({ family: 'chromium' })).to.be.true
expect(this.commands().isBrowser({ isHeadless: false })).to.be.true
})

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

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

expect(this.commands().isBrowser({
Expand Down
25 changes: 24 additions & 1 deletion packages/driver/cypress/e2e/dom/visibility.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('src/cypress/dom/visibility', () => {
expect(fn()).to.be.true
})

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

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

it('returns true if document element and body > window height', function () {
this.add('<div style="height: 1000px; width: 10px;" />')
const documentElement = Cypress.dom.wrap(cy.state('document').documentElement)

const fn = () => {
return dom.isScrollable(documentElement)
}

expect(fn()).to.be.true
})

it('returns false if document element and body < window height', () => {
cy.$$('body').html('<div>foo</div>')

const documentElement = Cypress.dom.wrap(cy.state('document').documentElement)

const fn = () => {
return dom.isScrollable(documentElement)
}

expect(fn()).to.be.false
})

it('returns false el is not scrollable', function () {
const noScroll = this.add(`\
<div style="height: 100px; overflow: auto;">
Expand Down
Loading