Commit Graph

20 Commits

Author SHA1 Message Date
Brian Mann b10210883c server: add logs for when requests are blacklisted 2018-02-12 13:03:19 -05:00
Brian Mann a648ee4686 server, driver: fixes #886 redefine self + parent to prevent framebusting and clickjacking security measures (#1295)
* server, driver: fixes #886 redefine self + parent to prevent framebusting and clickjacking security measures

- add modifyObjectiveCode config, true by default

* driver: increase timeout for flaky test in CI

* server, driver: moved obstructive code rewriting to the proxy layer, out of JS, providing more comprehensive fix

* server, driver: fixes failing tests, make regexp much more conservative

* server: increase security specificity... down the rabbit hole we go
2018-02-12 01:01:00 -05:00
Brian Mann c56e35c818 server, driver: fixes #1288, handle basic auth at the network level, attach authorization headers to requests matching remote origin (#1290)
* server, driver: fixes #1288, handle basic auth at the network level, attach authorization headers to requests matching remote origin

* server, driver: fixes failing tests

* driver: fix tests, move around order of ops

* driver: try cypress promise

* server, driver: increase timeouts, don't disable background networking
2018-02-10 21:44:28 -05:00
Brian Mann 191dbfb354 server: fixes #691, add event for exposing browser launch args (#1078)
* server: fixes #691, add event for exposing browser launch args

- enable special handling of ‘—load-extension’
- add e2e / integration / unit tests
- handle both chrome + electron cases

* server: iterate on failing tests, don't strip electron options else we lose valuable properties

- add better debugging

* server: fix failing tests, browsers needed

* server: send in a complete browser object for 'before:browser:launch'

- useful for doing conditional things with version and/or path
2017-12-17 16:57:26 -05:00
Brian Mann 1fbfcd6087 Issue 442 - blacklisting hosts with config.json (#1062)
* erver: fixes #442 implements blacklisting hosts with config

* server: add validation rules for blacklistHosts

* server: fix bad cherrypick / merge for WIP feature

* server: enable passing exit false to prevent browser teardown on completed runs

* server: add e2e tests for blacklists, fix edge case where blacklisted localhost was causing ws connection issues

* server: add snapshot for blacklist e2e test
2017-12-14 21:38:57 -05:00
Gleb Bahmutov 8e21f87526 Add platform arch 824 (#986)
* add platform and arch to configuration object for #824

* pass platform and arch from config

* test Cypress.platform and Cypress.arch

* add TypeScript definitions for platform and arch
2017-11-30 15:30:18 -05:00
Csaba Palfi d2a1705390 Issue 962 - Skip invalid cookies instead of crashing (#963)
* skip invalid cookies instead of crashing

* driver: ignore invalid cookies, add test
2017-11-27 17:45:22 -05:00
Chris Breiding 1ec6f7815f Create plugins API and add preprocessor plugin support (#888)
* fix broken menu specs

* extract browserify code and create preprocessor abstraction

* server: remove unused code

* server: implement logic for importing preprocessor

* server: add eslintrc and ignore test fixtures

* server: implement plugins API

* server: add node_cache module to manage clearing a package and its dependencies

* server: clear plugins file from cache to re-require it

* server: set pluginsFile to absolute path

* server: add debug logging to plugins

* server: watch pluginsFile

* server: throw the right error when requiring plugins file

* server: organize config folders and keys visually

* server: scaffold plugins file

* server: require plugins file via nodeCache.require

* server: update browserify preprocessor name and point to github for now

* server: remove redundant integration tests

* server: always scaffold plugins file, except when falsey

* server: add plugins file test to scaffold spec

* server: always provide util.fileUpdated to preprocessor

* server: update browserify-preprocessor dep

* server: fix integration tests

* server: remove redundant logic

* server: catch errors thrown synchronously by plugins function

* server: reduce chances of flakyness in async test

* driver: fix broken spec

* server: don’t check for dirname of supportFile and pluginFile when we know they’re already a directory

* driver: there is no dist

* server: update default options sent to browserify preprocessor

* server: send config into browserify instead of options

* server: add test around default preprocessor

* server: update browserify preprocessor

* server: refactor events spec to better handle multiple calls to handleEvent

* server: add tests around project:open events

* server/desktop-gui: handle errors when plugins file changes

* server: fix events spec

* server: allow any file types to be spec files

* server: validate config.pluginsFile

* server: remove link to error doc

* server: improve plugins error message

* server: simplify example plugins file

* server: on:spec:file:preprocessor -> file:preprocessor

* server: wrap plugins in a child process

* server: rename specsGlob to testFiles

* server: bump browserify-preprocessor ‘version’

* server: fix references left by merge

* server: fix incorrect function names

* server: fix plugin error serialization

* server: display error if plugins process has an uncaught exception or unhandled rejection

* server: reset domain on reset

* server: exit early on plugin error headlessly

* server: add e2e tests for plugins/preprocessors

* server: remove obselete node cache file

* server: fix integration tests

* server: log plugins error before exiting

* server: use npm version of browserify preprocessor

* server: extract string-splitting function

* socket: use path.join in spec

* server: eslint ignore scaffold files

* server: fix scaffolded plugins file links, add snapshot test

* server: if app_spec runs, cause a failure [skip ci]

- tested locally
2017-11-19 23:20:54 -05:00
Gleb Bahmutov 6f657d0740 Send list of specs with record build 861 (#862)
* server: log some basic info when creating build through api

* send list of specs to API, close #861

* update a few unit tests

* set exact version of typescript and ts-node

* test integeration test

* use bluebird instead of ramba for tap-tap-tapping

* server: find and filter specs by specPattern, return name relative to integration folder, add better integration specs
2017-11-01 21:00:03 -04:00
Brian Mann c190a01817 driver, server: change isHeadless to isTextTerminal and add isInteractive config
-this enables us to have more fine grained control over headless / gui
behavior
-enables us to have consistent driver integration tests in CI
2017-08-12 15:43:33 -04:00
Brian Mann 08aead5daa Merge branch 'master' into driver-refactor-merge
# Conflicts:
#	circle.yml
#	docs/readme.md
#	packages/driver/src/cy/commands/actions/text.coffee
#	packages/driver/src/cy/commands/fixtures.coffee
#	packages/driver/src/cypress/dom.coffee
#	packages/driver/src/cypress/snapshot.coffee
#	packages/driver/test/unit/cy/commands/actions/select_spec.coffee
#	packages/driver/test/unit/cy/commands/fixtures_spec.coffee
#	packages/driver/test/unit/cy/snapshot_spec.coffee
#	packages/runner/src/lib/event-manager.js
#	packages/server/timers/child.js
#	packages/server/timers/parent.js
2017-08-11 13:35:58 -04:00
Brian Mann 9d654a9e16 server: extract html rewriter to util 2017-07-12 23:59:28 -04:00
Gleb Bahmutov a364607b6b Issue 281 - add @packages/root (#282)
* link: create fake @packages/root

* server: switch to loading @packages/root

* server: update tests after using @packages/root

* load root package in other places

* load root package in build using @packages/root

* update tests that mock root package

* server: fix server start whenever loading root package in updater

* fix updater test

* uncomment code
2017-07-10 10:07:52 -04:00
Chris Breiding 036cc22070 server: fix server throwing when fixturesFolder is false 2017-07-07 16:30:08 -04:00
Brian Mann 2421180cae server: accept only allowed content encodings (gzip) 2017-06-14 18:12:09 -04:00
Gleb Bahmutov 0e074f4c5e server: upgrade glob in server to get absolute paths of specs for #118 2017-06-06 12:03:43 -04:00
Gleb Bahmutov ba87bd5dfe Issue 118 - scaffolding in /tmp folder (#128)
* server: detect symlinked case in support file search for #118

* server fix problem found by unit test

* add unit test for paths

* correctly determining files in /tmp for a project

* server: cleanup resolving symlinks
2017-06-06 10:03:49 -04:00
Gleb Bahmutov 92f0cae349 bundles are saved and served from subfolders 2017-06-01 13:33:27 -04:00
Brian Mann 817758e4b6 all: symlink all cypress packages in root node_modules for easy access 2017-05-31 12:51:35 -04:00
Brian Mann 71f07c2512 server: rename packages/app -> packages/server 2017-05-09 13:51:45 -04:00