Skip to content

Commit

Permalink
Merge branch 'develop' into omit_csp_report_only
Browse files Browse the repository at this point in the history
  • Loading branch information
sdemjanenko authored Jul 13, 2020
2 parents d612288 + c4dda17 commit 1a2d480
Show file tree
Hide file tree
Showing 24 changed files with 1,568 additions and 1,515 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"is-installed-globally": "0.3.2",
"lazy-ass": "1.6.0",
"listr": "0.14.3",
"lodash": "4.17.15",
"lodash": "4.17.19",
"log-symbols": "3.0.0",
"minimist": "1.2.5",
"moment": "2.26.0",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
"@types/lodash": "4.14.149",
"@types/markdown-it": "0.0.9",
"@types/mini-css-extract-plugin": "0.8.0",
"@types/node": "12.12.21",
"@types/node": "12.12.50",
"@types/prismjs": "1.16.0",
"@types/ramda": "0.25.47",
"@types/react": "16.9.35",
"@types/react-dom": "16.9.4",
"@types/react": "16.9.42",
"@types/react-dom": "16.9.8",
"@types/request-promise": "4.1.45",
"@types/sinon-chai": "3.2.3",
"@typescript-eslint/eslint-plugin": "2.14.0",
Expand Down Expand Up @@ -155,7 +155,7 @@
"lerna": "3.20.2",
"lint-staged": "9.4.1",
"listr": "0.14.3",
"lodash": "4.17.15",
"lodash": "4.17.19",
"make-empty-github-commit": "1.2.0",
"mocha": "3.5.3",
"mocha-banner": "1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"fira": "cypress-io/fira#fb63362742eea8cdce0d90825ab9264d77719e3d",
"gravatar": "1.8.0",
"human-interval": "0.1.6",
"lodash": "4.17.15",
"lodash": "4.17.19",
"markdown-it": "8.4.2",
"mobx": "5.15.4",
"mobx-react": "6.1.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"jquery.scrollto": "2.1.2",
"js-cookie": "2.2.1",
"jsdom": "14.1.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"lolex": "4.1.0",
"md5": "2.2.1",
"method-override": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"debug": "4.1.1",
"electron-packager": "14.1.1",
"fs-extra": "8.1.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"minimist": "1.2.5"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"bluebird": "3.5.3",
"lodash": "4.17.15"
"lodash": "4.17.19"
},
"devDependencies": {
"@cypress/icons": "0.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/https-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"bluebird": "3.5.3",
"debug": "4.1.1",
"fs-extra": "8.1.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"node-forge": "0.9.0",
"proxy-from-env": "1.1.0",
"semaphore": "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"debug": "4.1.1",
"execa": "4.0.0",
"fs-extra": "8.1.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"plist": "2.1.0",
"ramda": "0.24.1"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"build-prod": "tsc --project .",
"clean": "rm lib/*.js",
"clean-deps": "rm -rf node_modules",
"test": "yarn test-unit",
"test-debug": "yarn test-unit --inspect-brk=5566",
Expand All @@ -16,7 +17,7 @@
"bluebird": "3.5.3",
"concat-stream": "1.6.2",
"debug": "4.1.1",
"lodash": "4.17.15",
"lodash": "4.17.19",
"proxy-from-env": "1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"debug": "4.1.1",
"grapheme-splitter": "1.0.4",
"iconv-lite": "0.5.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"pumpify": "1.5.1",
"through": "2.3.8",
"utf8-stream": "0.0.0"
Expand Down
19 changes: 14 additions & 5 deletions packages/reporter/cypress/integration/tests_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,21 @@ describe('controls', function () {
})

it('calculates correct width', function () {
cy.clock(1577836801500, ['Date'])
const { wallClockStartedAt } = this.runnables.suites[0].suites[0].tests[1].commands[0]

// take the wallClockStartedAt of this command and add 2500 milliseconds to it
// in order to simulate the command having run for 2.5 seconds of the total 4000 timeout
const date = new Date(wallClockStartedAt).setMilliseconds(2500)

cy.clock(date, ['Date'])
cy.get('.runnable-active').click()
cy.get('.command-progress > span').should('have.attr', 'style').should('contain', 'animation-duration: 2500ms')
cy.get('.command-progress > span').should('have.attr', 'style').should('contain', 'width: 62.5%')
// ensures that actual width hits 0 within remaining 2.5 seconds
cy.get('.command-progress > span', { timeout: 2500 }).should('have.css', 'width', '0px')
cy.get('.command-progress > span').should(($span) => {
expect($span.attr('style')).to.contain('animation-duration: 1500ms')
expect($span.attr('style')).to.contain('width: 37.5%')

// ensures that actual width hits 0 within default timeout
expect($span).to.have.css('width', '0px')
})
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion packages/reporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2",
"jsdom": "14.1.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"markdown-it": "8.4.2",
"mobx": "5.15.4",
"mobx-react": "6.1.8",
Expand Down
4 changes: 3 additions & 1 deletion packages/reporter/src/runnables/runnables-store.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ describe('runnables store', () => {
let scroller: Scroller

beforeEach(() => {
global.requestAnimationFrame = (cb: (() => void)) => {
// @ts-ignore
global.requestAnimationFrame = (cb: FrameRequestCallback) => {
// @ts-ignore
return cb()
}

Expand Down
6 changes: 4 additions & 2 deletions packages/reporter/src/test/test.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ describe('<Test />', () => {
beforeEach(() => {
scroller = scrollerStub()

global.window.requestAnimationFrame = function (callback: () => void) {
callback()
// @ts-ignore
global.window.requestAnimationFrame = function (callback: FrameRequestCallback) {
// @ts-ignore
return callback()
}
})

Expand Down
2 changes: 1 addition & 1 deletion packages/rewriter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"bluebird": "3.7.2",
"chai-as-promised": "7.1.1",
"debug": "4.1.1",
"lodash": "4.17.15",
"lodash": "4.17.19",
"parse5-html-rewriting-stream": "5.1.1",
"recast": "0.19.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2",
"jsdom": "14.1.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"mobx": "5.15.4",
"mobx-react": "6.1.8",
"mocha": "7.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ const getMsgByType = function (type, arg1 = {}, arg2, arg3) {
return stripIndent`\
The support file is missing or invalid.
Your \`supportFile\` is set to \`${arg1}\`, but either the file is missing or it's invalid. The \`supportFile\` must be a \`.js\` or \`.coffee\` file or, if you're using a preprocessor plugin, it must be supported by that plugin.
Your \`supportFile\` is set to \`${arg1}\`, but either the file is missing or it's invalid. The \`supportFile\` must be a \`.js\`, \`.ts\`, \`.coffee\` file or be supported by your preprocessor plugin (if configured).
Correct your \`${arg2}\`, create the appropriate file, or set \`supportFile\` to \`false\` if a support file is not necessary for your project.
Expand All @@ -561,9 +561,9 @@ const getMsgByType = function (type, arg1 = {}, arg2, arg3) {
msg = stripIndent`\
The plugins file is missing or invalid.
Your \`pluginsFile\` is set to \`${arg1}\`, but either the file is missing, it contains a syntax error, or threw an error when required. The \`pluginsFile\` must be a \`.js\` or \`.coffee\` file.
Your \`pluginsFile\` is set to \`${arg1}\`, but either the file is missing, it contains a syntax error, or threw an error when required. The \`pluginsFile\` must be a \`.js\`, \`.ts\`, or \`.coffee\` file.
Or you might have renamed the extension of your \`pluginsFile\` to \`.ts\`. If that's the case, restart the test runner.
Or you might have renamed the extension of your \`pluginsFile\`. If that's the case, restart the test runner.
Please fix this, or set \`pluginsFile\` to \`false\` if a plugins file is not necessary for your project.`.trim()

Expand Down
3 changes: 1 addition & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"launch-editor": "2.2.1",
"lazy-ass": "1.6.0",
"lockfile": "1.0.4",
"lodash": "4.17.15",
"lodash": "4.17.19",
"log-symbols": "2.2.0",
"marionette-client": "cypress-io/marionette-client#2cddf7d791cca7be5191d7fe103d58be7283957d",
"md5": "2.2.1",
Expand Down Expand Up @@ -144,7 +144,6 @@
"@packages/ts": "*",
"@types/chai-as-promised": "7.1.2",
"@types/chrome": "0.0.101",
"@types/node": "8.10.55",
"awesome-typescript-loader": "5.2.1",
"babel-loader": "8.1.0",
"babel-plugin-add-module-exports": "1.0.2",
Expand Down
7 changes: 6 additions & 1 deletion packages/server/test/support/helpers/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ const replaceDurationFromReporter = (str, p1, p2, p3) => {

const replaceNodeVersion = (str, p1, p2, p3) => _.padEnd(`${p1}X (/foo/bar/node)`, (p1.length + p2.length + p3.length))

const replaceCypressVersion = (str, p1, p2) => {
// Cypress: 12.10.10 -> Cypress: 1.2.3 (handling padding)
return _.padEnd(`${p1}1.2.3`, (p1.length + p2.length))
}

// when swapping out the duration, ensure we pad the
// full length of the duration so it doesn't shift content
const replaceDurationInTables = (str, p1, p2) => {
Expand Down Expand Up @@ -151,7 +156,7 @@ const normalizeStdout = function (str, options: any = {}) {
.replace(/(\s+?)(\d+ms|\d+:\d+:?\d+)/g, replaceDurationInTables)
.replace(/(coffee|js)-\d{3}/g, '$1-456')
// Cypress: 2.1.0 -> Cypress: 1.2.3
.replace(/(Cypress\:\s+)(\d+\.\d+\.\d+)/g, '$11.2.3')
.replace(/(Cypress\:\s+)(\d+\.\d+\.\d+)/g, replaceCypressVersion)
// Node Version: 10.2.3 (Users/jane/node) -> Node Version: X (foo/bar/node)
.replace(/(Node Version\:\s+v)(\d+\.\d+\.\d+)( \(.*\)\s+)/g, replaceNodeVersion)
// 15 seconds -> X second
Expand Down
3 changes: 0 additions & 3 deletions packages/ts/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ declare module 'http' {
createSocket(req: ClientRequest, options: RequestOptions, cb: SocketCallback): void
createConnection(options: RequestOptions, cb: Optional<SocketCallback>): void
protocol: 'http:' | 'https:' | string
freeSockets: {
[key: string]: Socket[]
}
}

interface ClientRequest {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"classnames": "2.2.6",
"cypress-multi-reporters": "1.4.0",
"file-loader": "4.3.0",
"lodash": "4.17.15",
"lodash": "4.17.19",
"mobx": "5.15.4",
"mobx-react": "6.1.7",
"prop-types": "15.7.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/web-config/node-jsdom-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,20 @@ export const register = ({
const sinonChai = require('sinon-chai')
// const chaiEnzyme = require('chai-enzyme')

// @ts-ignore
global.window = window
global.document = window.document;

// DOMWindow doesn't have Selection yet.
(window as any).Selection = { prototype: { isCollapsed: {} } }

// @ts-ignore
global.navigator = {
userAgent: 'node.js',
}

global.requestAnimationFrame = function (callback: ((...args: any[]) => void)) {
// @ts-ignore
global.requestAnimationFrame = function (callback: FrameRequestCallback) {
return setTimeout(callback, 0)
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/binary/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const checkZipSize = function (zipPath) {
const zipSize = filesize(stats.size, { round: 0 })

console.log(`zip file size ${zipSize}`)
const MAX_ALLOWED_SIZE_MB = os.platform() === 'win32' ? 245 : 200
const MAX_ALLOWED_SIZE_MB = os.platform() === 'win32' ? 245 : 190
const MAX_ZIP_FILE_SIZE = megaBytes(MAX_ALLOWED_SIZE_MB)

if (stats.size > MAX_ZIP_FILE_SIZE) {
Expand Down
Loading

0 comments on commit 1a2d480

Please sign in to comment.