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

Electron v5.0.10 #4720

Merged
merged 116 commits into from Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
20a308b
fix specs
chrisbreiding May 31, 2019
4c31ec2
use debugger protocol for cookie handling in electron
chrisbreiding Jul 15, 2019
9471c99
use latest gulp
chrisbreiding Jul 15, 2019
74d4f81
use rimraf instead of gulp-clean
chrisbreiding Jul 15, 2019
2cf957e
use electron 3.1.8 and node 10.2.1
chrisbreiding Jul 15, 2019
2fdc5f7
use gulp 4 in packages/static
chrisbreiding Jul 15, 2019
2919c85
Merge remote-tracking branch 'origin/develop' into electron-3-from-de…
flotwig Jul 23, 2019
e2d477d
fix sendCommandAsync, log Schema.getDomains on CDP connect
flotwig Jul 23, 2019
3d9daad
autofill e2e test name [skip ci]
flotwig Jul 23, 2019
feae437
electron@5.0.7, see what new failures exist
flotwig Jul 23, 2019
63b20dc
--no-sandbox for launching Electron
flotwig Jul 23, 2019
d3939df
update cookies logic for electron
flotwig Jul 23, 2019
1e207bc
node 12
flotwig Jul 23, 2019
e406957
update snapshot for new node
flotwig Jul 23, 2019
9dbe872
update error message for new node
flotwig Jul 23, 2019
9ca576a
stub sendCommandAsync
flotwig Jul 23, 2019
f179eda
only connect to socket if path has been replaced, fixes #4776
flotwig Jul 23, 2019
aaa758d
update node-sass to support node 12
flotwig Jul 23, 2019
7bbc6c1
skip wacky socket tests for now
flotwig Jul 23, 2019
871f891
snapshot
flotwig Jul 23, 2019
2e4b0ca
fix run_plugins_spec snapshot, don't include stack trace
flotwig Jul 24, 2019
d736699
use --no-sandbox on linux to run as root
flotwig Jul 24, 2019
32688a7
allow sendCommandAsync to resolve
flotwig Jul 29, 2019
aa55852
use euid for root check
flotwig Jul 29, 2019
b5a9554
log domains even if undefined
flotwig Jul 29, 2019
036b444
don't worry about ending 1xx responses immediately anymore
flotwig Jul 29, 2019
ae5def7
use --max-http-header-size, change max size from 8kb to 1mb, fix #76
flotwig Jul 29, 2019
26c701a
do not send 502 on failed websocket, just send back ECONNRESET
flotwig Jul 29, 2019
af67060
update websocket spec port to not collide with other test
flotwig Jul 29, 2019
f0c2867
update outdated expect
flotwig Jul 29, 2019
51b6400
Revert "only connect to socket if path has been replaced, fixes #4776"
flotwig Jul 29, 2019
d32c6bd
update gulp in root
flotwig Jul 29, 2019
f0a87e0
update https-proxy unit tests
flotwig Jul 29, 2019
9a119cf
update network spec to properly close server
flotwig Jul 29, 2019
9e5254b
update reporter spec
flotwig Jul 29, 2019
0cbc7dd
Merge branch 'develop' into electron-3-from-develop
chrisbreiding Jul 29, 2019
9973d18
update https-proxy-agent to fix node 10.10.0 change
flotwig Jul 30, 2019
5c9ac25
only pass --max-http-header-size on node >=12
flotwig Jul 30, 2019
37c14a6
use own server-destroy implementation that supports secureConnect events
flotwig Jul 30, 2019
f224127
Merge remote-tracking branch 'origin/develop' into electron-3-from-de…
flotwig Jul 30, 2019
3f69ca4
oops
flotwig Jul 30, 2019
bc43b9e
update socket_spec
flotwig Jul 30, 2019
b782d4b
electron 6.0.0
flotwig Jul 30, 2019
e52d365
console.table introduced in node 10
flotwig Jul 31, 2019
37dbcf3
change browserify entry to init.js
flotwig Jul 31, 2019
3bdce38
handle edge case when no response body
flotwig Jul 31, 2019
1587e97
console.table added in node 10
flotwig Jul 31, 2019
f9ba42e
do not exit app when all BrowserWindows are closed
flotwig Aug 1, 2019
bd247bc
update e2e snapshots
flotwig Aug 1, 2019
46dddf6
value may not be null
flotwig Aug 1, 2019
e4a913c
update plugins spec
flotwig Aug 1, 2019
897fa41
correct cookie expiry, use browser.getversion for CDP version check
flotwig Aug 1, 2019
1a69d71
fix snapshotting for require stacks
flotwig Aug 1, 2019
850d164
reorder cookies in spec
flotwig Aug 1, 2019
f0f2224
warn when depreated electron callback apis are used
flotwig Aug 1, 2019
54b13b8
only report 1 plugin error per process
flotwig Aug 2, 2019
3759fc3
cleanup
flotwig Aug 2, 2019
0cbd954
node 12.4.0, cypress/browsers:node12.4.0-chrome76 docker image
flotwig Aug 2, 2019
8b6460d
update shell.openExternal to promisified
flotwig Aug 2, 2019
5f178b0
update dialog.showOpenDialog to promisified
flotwig Aug 2, 2019
727df3a
update webContents.session.setProxy to promisified
flotwig Aug 2, 2019
cd0232e
updating native dependencies since we don't need ancient node ABI sup…
flotwig Aug 5, 2019
bcfd805
WIP: switch cookies to simpler, jar-less approach
flotwig Aug 5, 2019
3d13822
WIP: switch cookies to simpler, jar-less approach
flotwig Aug 6, 2019
213941b
making tests pass
flotwig Aug 6, 2019
886b0f8
improve cookie filtering logic
flotwig Aug 6, 2019
0266fe4
Remove unneeded Promise.try
flotwig Aug 7, 2019
adb56d0
filter what makes it to the extension
flotwig Aug 7, 2019
75fc59a
properly re-set superdomain cookies on cross-origin cy.visit
flotwig Aug 8, 2019
2716ca2
allow comma-separated list of e2e tests
flotwig Aug 8, 2019
6698bbc
sort cookies in order of expiration date, ascending
flotwig Aug 8, 2019
214d02a
updating tests, cleanup
flotwig Aug 8, 2019
a7693c9
update tests
flotwig Aug 8, 2019
01ee3f7
version electron as a devDependency, electron@6.0.1
flotwig Aug 8, 2019
f2b62ea
cleanup, remove old automation
flotwig Aug 8, 2019
ca05670
cleanup, remove old automation
flotwig Aug 8, 2019
5e31479
bump chokidar to fix win10 + node12 issue
flotwig Aug 8, 2019
bb5de3e
enable now-supported quit role, re-enable old tests
flotwig Aug 9, 2019
4327d6b
don't need that arg there
flotwig Aug 12, 2019
04fdc2c
remove last deprecated callback electron invocations
flotwig Aug 12, 2019
6ec9516
Delete cypress.json
brian-mann Aug 13, 2019
2ec54e9
responding to PR feedback
flotwig Aug 14, 2019
ef66329
cleanup
flotwig Aug 14, 2019
323ff50
invoke
flotwig Aug 14, 2019
f70fbd2
use 'quit' role
flotwig Aug 14, 2019
20fe754
Use new appMenu role for Cypress menu on mac
flotwig Aug 14, 2019
b3ec1b5
electron@6.0.2
flotwig Aug 14, 2019
7247a60
Merge branch 'develop' into electron-3-from-develop
flotwig Aug 20, 2019
d2b05a5
electron@6.0.3
flotwig Aug 20, 2019
49e9168
remove domain: cookie.domain and see what happens
flotwig Aug 20, 2019
424570c
remove setErrorHandler
flotwig Aug 20, 2019
0c0d4f1
Revert "remove domain: cookie.domain and see what happens"
flotwig Aug 20, 2019
deded81
add unit tests for cookies
flotwig Aug 20, 2019
e141a1e
ci
flotwig Aug 20, 2019
447f011
fix project-content css
flotwig Aug 21, 2019
ad70513
Merge remote-tracking branch 'origin/develop' into electron-3-from-de…
flotwig Aug 21, 2019
ebc0374
electron@6.0.4
flotwig Aug 27, 2019
f34c1e4
Merge remote-tracking branch 'origin/develop' into electron-3-from-de…
flotwig Aug 27, 2019
567e346
fix specs_list test
flotwig Aug 27, 2019
77a91e1
electron@6.0.7
flotwig Sep 4, 2019
534277e
some cleanup
flotwig Sep 4, 2019
fd69b07
Merge branch 'develop' into electron-3-from-develop
flotwig Sep 18, 2019
b95c586
electron@6.0.9
flotwig Sep 18, 2019
6cedcbf
Update 8_reporters_spec.coffee.js
flotwig Sep 18, 2019
2d498bb
electron@5.0.10 - Chromium 73, Node 12
flotwig Sep 24, 2019
908c738
cli: fix the STDIN pipe on Windows (#5045)
bahmutov Sep 19, 2019
67c72c8
more permissive check for json to include application/vnd.api+j… (#5166)
jazwiecki Sep 20, 2019
400fbe3
fix eslint for fixture specs (#5176)
jennifer-shehane Sep 20, 2019
41758d6
Catch env variable with reserved name CYPRESS_ENV 1621 (#1626)
bahmutov Sep 23, 2019
1e698b5
Addresses #2953 (#5174)
ryan-snyder Sep 23, 2019
a724d4f
depromisify things that were promisified b/t electron 5 <=> 6
flotwig Sep 24, 2019
3581e52
node12.4.0-chrome76 => node12.0.0-chrome75
flotwig Sep 24, 2019
d2a0075
fix tests for electron downgrade
flotwig Sep 24, 2019
1a4aeab
Merge branch 'develop' into electron-3-from-develop
flotwig Sep 24, 2019
9135d3a
node12.0.0-chrome75 => node12.0.0-chrome73
flotwig Sep 24, 2019
0404a34
Merge branch 'electron-3-from-develop' of github.com:cypress-io/cypre…
flotwig Sep 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Expand Up @@ -22,6 +22,7 @@ Cached Theme Material Design.pak
packages/https-proxy/ca/

# from desktop-gui
packages/desktop-gui/cypress/videos
packages/desktop-gui/src/jsconfig.json

# from driver
Expand All @@ -32,9 +33,6 @@ packages/example/app
packages/example/build
packages/example/cypress

# from driver
packages/driver/test/cypress/videos

# from server
packages/server/.cy
packages/server/.projects
Expand Down
2 changes: 1 addition & 1 deletion .node-version
@@ -1 +1 @@
8.9.3
12.4.0
2 changes: 1 addition & 1 deletion .vscode/terminals.json
Expand Up @@ -29,7 +29,7 @@
"onlySingle": true,
"execute": false,
"cwd": "[cwd]/packages/server",
"command": "npm run test-e2e -- --spec name"
"command": "npm run test-e2e -- --spec [fileBasename]"
},
{
"name": "packages/runner watch",
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -7,7 +7,7 @@ branches:
# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use matching version of Node.js
nodejs_version: "8.9.3"
nodejs_version: "12.4.0"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Expand Up @@ -23,7 +23,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node8.9.3-npm6.10.1-chrome75
- image: cypress/browsers:node12.0.0-chrome73
environment:
PLATFORM: linux

Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -102,7 +102,6 @@
"cloudflare-cli": "3.2.2",
"coffeelint": "1.16.2",
"common-tags": "1.8.0",
"console.table": "0.10.0",
"debug": "4.1.1",
"decaffeinate": "6.0.1",
"del": "3.0.0",
Expand Down Expand Up @@ -161,7 +160,7 @@
"vinyl-paths": "2.1.0"
},
"engines": {
"node": ">=8.9.3"
"node": "12.4.0"
},
"productName": "Cypress",
"license": "MIT",
Expand Down
9 changes: 0 additions & 9 deletions packages/desktop-gui/cypress/integration/login_spec.js
Expand Up @@ -18,7 +18,6 @@ describe('Login', function () {
cy.stub(this.ipc, 'openProject').resolves(this.config)
cy.stub(this.ipc, 'getSpecs').yields(null, this.specs)
cy.stub(this.ipc, 'externalOpen')
cy.stub(this.ipc, 'clearGithubCookies')
cy.stub(this.ipc, 'logOut').resolves()

cy.stub(this.ipc, 'onAuthMessage').callsFake((function (_this) {
Expand Down Expand Up @@ -124,14 +123,6 @@ describe('Login', function () {
cy.get('.nav').contains('Log In')
})

it('calls clear:github:cookies', function () {
cy.get('nav a').contains('Jane').click()

cy.contains('Log Out').click().then(function () {
expect(this.ipc.clearGithubCookies).to.be.called
})
})

it('calls log:out', function () {
cy.get('nav a').contains('Jane').click()

Expand Down
1 change: 0 additions & 1 deletion packages/desktop-gui/src/auth/auth-api.js
Expand Up @@ -39,7 +39,6 @@ class AuthApi {
logOut () {
authStore.setUser(null)

ipc.clearGithubCookies()
ipc.logOut()
.catch((err) => {
err.name = 'An unexpected error occurred while logging out'
Expand Down
2 changes: 0 additions & 2 deletions packages/desktop-gui/src/lib/ipc.js
Expand Up @@ -11,7 +11,6 @@ const ipc = {
handleUnauthed () {
authStore.setUser(null)

ipc.clearGithubCookies()
ipc.logOut()
},
}
Expand All @@ -32,7 +31,6 @@ const register = (eventName, isPromiseApi = true) => {
register('add:project')
register('begin:auth')
register('on:auth:message', false)
register('clear:github:cookies')
register('close:browser')
register('close:project')
register('external:open')
Expand Down
1 change: 1 addition & 0 deletions packages/desktop-gui/src/project/project.scss
Expand Up @@ -4,4 +4,5 @@
flex-grow: 2;
margin-bottom: 0;
width: 100%;
min-height: 0;
}
1 change: 1 addition & 0 deletions packages/desktop-gui/src/specs/specs.scss
Expand Up @@ -5,6 +5,7 @@ $max-nesting-level: 14;
display: flex;
flex-direction: column;
width: 100%;
min-height: 0;

.empty-well code {
display: block;
Expand Down
10 changes: 5 additions & 5 deletions packages/driver/src/cy/stability.coffee
Expand Up @@ -5,20 +5,20 @@ tryFn = (fn) ->
Promise.try(fn)

create = (Cypress, state) ->
isStable = (bool = true, event) ->
return if state("isStable") is bool
isStable = (stable = true, event) ->
return if state("isStable") is stable

## if we are going back to stable and we have
## a whenStable callback
if bool and whenStable = state("whenStable")
if stable and whenStable = state("whenStable")
## invoke it
whenStable()

state("isStable", bool)
state("isStable", stable)

## we notify the outside world because this is what the runner uses to
## show the 'loading spinner' during an app page loading transition event
Cypress.action("cy:stability:changed", bool, event)
Cypress.action("cy:stability:changed", stable, event)

whenStable = (fn) ->
## if we are not stable
Expand Down
13 changes: 11 additions & 2 deletions packages/electron/lib/electron.coffee
@@ -1,5 +1,6 @@
fs = require("fs-extra")
cp = require("child_process")
os = require("os")
path = require("path")
debug = require("debug")("cypress:electron")
Promise = require("bluebird")
Expand Down Expand Up @@ -59,6 +60,10 @@ module.exports = {
.then ->
execPath = paths.getPathToExec()

## if running as root, no-sandbox must be passed or Chrome will not start
if os.platform() == "linux" && process.geteuid() == 0
argv.unshift("--no-sandbox")

## we have an active debugger session
if inspector.url()
dp = process.debugPort + 1
Expand All @@ -70,15 +75,19 @@ module.exports = {
if opts.inspectBrk
argv.unshift("--inspect-brk=5566")

## max HTTP header size 8kb -> 1mb
## https://github.com/cypress-io/cypress/issues/76
argv.unshift("--max-http-header-size=#{1024*1024}")
flotwig marked this conversation as resolved.
Show resolved Hide resolved

debug("spawning %s with args", execPath, argv)

if debug.enabled
## enable the internal chromium logger
argv.push("--enable-logging")

cp.spawn(execPath, argv, {stdio: "inherit"})
.on "close", (code) ->
debug("electron closing with code", code)
.on "close", (code, errCode) ->
debug("electron closing %o", { code, errCode })

if code
debug("original command was")
Expand Down
4 changes: 2 additions & 2 deletions packages/electron/lib/install.coffee
Expand Up @@ -10,8 +10,8 @@ log = require("debug")("cypress:electron")
fs = Promise.promisifyAll(fs)

## ensure we have an electronVersion set in package.json
if not electronVersion = pkg.electronVersion
throw new Error("Missing 'electronVersion' in ./package.json")
if not electronVersion = pkg.devDependencies.electron
throw new Error("Missing 'electron' devDependency in ./package.json")

module.exports = {
checkCurrentVersion: ->
Expand Down
4 changes: 2 additions & 2 deletions packages/electron/package.json
Expand Up @@ -26,6 +26,7 @@
"minimist": "1.2.0"
},
"devDependencies": {
"electron": "5.0.10",
"mocha": "3.5.3"
},
"files": [
Expand All @@ -34,6 +35,5 @@
],
"bin": {
"cypress-electron": "./bin/cypress-electron"
},
"electronVersion": "2.0.18"
}
}
41 changes: 19 additions & 22 deletions packages/example/gulpfile.js
@@ -1,10 +1,10 @@
let gulp = require('gulp')
let ghPages = require('gulp-gh-pages-will')
let clean = require('gulp-clean')
let RevAll = require('gulp-rev-all')
const gulp = require('gulp')
const ghPages = require('gulp-gh-pages-will')
const gulpClean = require('gulp-clean')
const RevAll = require('gulp-rev-all')

gulp.task('assets', function () {
let revAllOpts = {
const assets = () => {
const revAllOpts = {
dontGlobal: ['.ico', 'fira.css', 'javascript-logo.png'],
dontRenameFile: ['.ico', '.html', /fonts/],
dontSearchFile: ['.js'],
Expand All @@ -14,28 +14,25 @@ gulp.task('assets', function () {
return gulp.src('./app/**/*')
.pipe(RevAll.revision(revAllOpts))
.pipe(gulp.dest('build'))
})
}

gulp.task('cname', function () {
return gulp.src('CNAME')
const cname = () => {
return gulp.src('CNAME', { allowEmpty: true })
.pipe(gulp.dest('build'))
})
}

gulp.task('gitignore', function () {
return gulp.src('.gitignore', { allowEmpty: true })
.pipe(gulp.dest('build'))
})

gulp.task('clean', function () {
const clean = () => {
return gulp.src('./build', { allowEmpty: true })
.pipe(clean())
})
.pipe(gulpClean())
}

gulp.task('push-gh-pages', function () {
const pushGhPages = () => {
return gulp.src('build/**/*')
.pipe(ghPages())
})
}

const build = gulp.series(clean, gulp.parallel(assets, cname))

gulp.task('build', gulp.series('clean', gulp.parallel('assets', 'cname', 'gitignore')))
exports.build = build

gulp.task('deploy', gulp.series('build', 'push-gh-pages'))
exports.deploy = gulp.series(build, pushGhPages)
8 changes: 7 additions & 1 deletion packages/extension/app/background.coffee
Expand Up @@ -4,6 +4,10 @@ once = require("lodash/once")
Promise = require("bluebird")
client = require("./client")

COOKIE_PROPS = ['url', 'name', 'domain', 'path', 'secure', 'storeId']
GET_ALL_PROPS = COOKIE_PROPS.concat(['session'])
SET_PROPS = COOKIE_PROPS.concat(['value', 'httpOnly', 'expirationDate'])

httpRe = /^http/

firstOrNull = (cookies) ->
Expand Down Expand Up @@ -61,7 +65,7 @@ connect = (host, path) ->
ws.emit("automation:client:connected")

return ws

automation = {
connect

Expand All @@ -85,6 +89,7 @@ automation = {
.map(clear)

getAll: (filter = {}) ->
filter = pick(filter, GET_ALL_PROPS)
get = ->
new Promise (resolve) ->
chrome.cookies.getAll(filter, resolve)
Expand All @@ -105,6 +110,7 @@ automation = {
new Promise (resolve, reject) =>
## only get the url if its not already set
props.url ?= @getUrl(props)
props = pick(props, SET_PROPS)
chrome.cookies.set props, (details) ->
switch
when details
Expand Down