Skip to content

Commit

Permalink
Merge branch 'develop' into issue-17773-slow-browser-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding authored Aug 19, 2021
2 parents deb4c1d + e9656df commit 891f2ec
Show file tree
Hide file tree
Showing 15 changed files with 854 additions and 797 deletions.
17 changes: 13 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,17 @@ Here is a list of the core packages in this repository with a short description,
| [example](./packages/example) | `@packages/example` | Our example kitchen-sink application. |
| [extension](./packages/extension) | `@packages/extension` | The Cypress Chrome browser extension |
| [https-proxy](./packages/https-proxy) | `@packages/https-proxy` | This does https proxy for handling http certs and traffic. |
| [net-stubbing](./packages/net-stubbing) | `@packages/net-stubbing` | Contains server side code for Cypress' network stubbing features. |
| [network](./packages/networ ) | `@packages/network` | Various utilities related to networking. |
| [proxy](./packages/proxy) | `@packages/proxy` | Code for Cypress' network proxy layer. |
| [launcher](./packages/launcher) | `@packages/launcher` | Finds and launches browsers installed on your system. |
| [reporter](./packages/reporter) | `@packages/reporter` | The reporter shows the running results of the tests (The Command Log UI). |
| [root](./packages/root) | `@packages/root` | Dummy package pointing at the root of the repository. |
| [runner](./packages/runner) | `@packages/runner` | The runner is the minimal "chrome" around the user's application under test. |
| [runner-ct](./packages/runner-ct) | `@packages/runner-ct` | The runner for component testing |
| [runner-shared](./packages/runner-shared) | `@packages/runner-shared` | The shared components between the `runner` and the `runner-ct` packages |
| [server](./packages/server) | `@packages/server` | The <3 of Cypress. This orchestrates everything. The backend node process. |
| [server-ct](./packages/server-ct) | `@packages/server-ct` | Some Component Testing specific overrides. Mostly extends functionality from `@packages/server` |
| [socket](./packages/socket) | `@packages/socket` | A wrapper around socket.io to provide common libraries. |
| [static](./packages/static) | `@packages/static` | Serves static assets used in the Cypress GUI. |
| [ts](./packages/ts) | `@packages/ts` | A centralized version of typescript. |
Expand All @@ -295,10 +299,15 @@ Here is a list of the npm packages in this repository:

| Folder Name | Package Name | Purpose |
| :----------------------------------------------------- | :--------------------------------- | :--------------------------------------------------------------------------- |
| [eslint-plugin-dev](./npm/eslint-plugin-dev) | `@cypress/eslint-plugin-dev` | Eslint plugin for internal development. |
| [react](./npm/react) | `@cypress/react` | Cypress component testing for React. |
| [vue](./npm/vue) | `@cypress/vue` | Cypress component testing for Vue. |
| [webpack-preprocessor](./npm/webpack-preprocessor) | `@cypress/webpack-preprocessor` | Cypress preprocessor for bundling JavaScript via webpack. |
| [angular](./npm/angular) | `@cypress/angular` | Cypress component testing for Angular. |
| [create-cypress-tests](./npm/create-cypress-tests) | `@cypress/create-cypress-tests` | Tooling to scaffold Cypress configuration and demo test files. |
| [eslint-plugin-dev](./npm/eslint-plugin-dev) | `@cypress/eslint-plugin-dev` | Eslint plugin for internal development. |
| [mount-utils](./npm/mount-utils) | `@cypress/mount-utils` | Common functionality for Vue/React/Angular adapters. |
| [react](./npm/react) | `@cypress/react` | Cypress component testing for React. |
| [vite-dev-server](./npm/vite-dev-server) | `@cypress/vite-dev-server` | Vite powered dev server for Component Testing. |
| [webpack-preprocessor](./npm/webpack-preprocessor) | `@cypress/webpack-preprocessor` | Cypress preprocessor for bundling JavaScript via webpack. |
| [webpack-dev-server](./npm/webpack-dev-server) | `@cypress/webpack-dev-server` | Webpack powered dev server for Component Testing. |
| [vue](./npm/vue) | `@cypress/vue` | Cypress component testing for Vue. |

We try to tag all issues with a `pkg/` or `npm/` tag describing the appropriate package the work is required in. For public packages, we use their qualified package name: For example, issues relating to the webpack preprocessor are tagged under [`npm: @cypress/webpack-preprocessor`](https://github.com/cypress-io/cypress/labels/npm%3A%20%40cypress%2Fwebpack-preprocessor) label and issues related to the `driver` package are tagged with the [`pkg/driver`](https://github.com/cypress-io/cypress/labels/pkg%2Fdriver) label.

Expand Down
2 changes: 1 addition & 1 deletion browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"chrome:beta": "93.0.4577.42",
"chrome:beta": "93.0.4577.51",
"chrome:stable": "92.0.4515.159"
}
2 changes: 1 addition & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ declare namespace Cypress {
* .its('contentType')
* .should('eq', 'text/html')
*/
document(options?: Partial<Loggable>): Chainable<Document>
document(options?: Partial<Loggable & Timeoutable>): Chainable<Document>

/**
* Iterate through an array like structure (arrays or objects with a length property).
Expand Down
3 changes: 2 additions & 1 deletion npm/vite-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"files": [
"dist",
"client",
"index.html"
"index.html",
"index.d.ts"
],
"license": "MIT",
"repository": {
Expand Down
14 changes: 14 additions & 0 deletions packages/driver/cypress/integration/commands/assertions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,20 @@ describe('src/cy/commands/assertions', () => {
})
})
})

describe('escape markdown', () => {
// https://github.com/cypress-io/cypress/issues/17357
it('images', (done) => {
const text = 'hello world ![JSDoc example](/slides/img/jsdoc.png)'
const result = 'hello world ``![JSDoc example](/slides/img/jsdoc.png)``'

expectMarkdown(
() => expect(text).to.equal(text),
`expected **${result}** to equal **${result}**`,
done,
)
})
})
})

context('chai overrides', () => {
Expand Down
6 changes: 6 additions & 0 deletions packages/driver/src/cy/chai.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const leadingWhitespaces = /\*\*'\s*/g
const trailingWhitespaces = /\s*'\*\*/g
const whitespace = /\s/g
const valueHasLeadingOrTrailingWhitespaces = /\*\*'\s+|\s+'\*\*/g
const imageMarkdown = /!\[.*?\]\(.*?\)/g

let assertProto = null
let matchProto = null
Expand Down Expand Up @@ -130,6 +131,10 @@ chai.use((chai, u) => {
})
}

const escapeMarkdown = (message) => {
return message.replace(imageMarkdown, '``$&``')
}

const replaceArgMessages = (args, str) => {
return _.reduce(args, (memo, value, index) => {
if (_.isString(value)) {
Expand Down Expand Up @@ -447,6 +452,7 @@ chai.use((chai, u) => {
const actual = chaiUtils.getActual(this, customArgs)

message = removeOrKeepSingleQuotesBetweenStars(message)
message = escapeMarkdown(message)

try {
assertProto.apply(this, args)
Expand Down
Loading

2 comments on commit 891f2ec

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 891f2ec Aug 19, 2021

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

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.3.1/circle-issue-17773-slow-browser-detection-891f2ece3d6b195af58ab75c2edfd96f7fc1cc2e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 891f2ec Aug 19, 2021

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.3.1/circle-issue-17773-slow-browser-detection-891f2ece3d6b195af58ab75c2edfd96f7fc1cc2e/cypress.tgz

Please sign in to comment.