Commit Graph

1456 Commits

Author SHA1 Message Date
Brian Mann 9efad08f8c fixes #1585 exit with status 1 whenever no specs were found (#1587)
* fixes #1585 exit with status 1 whenever no specs were found

* add a couple tests around spec video file name

* cleanup old circleci branch filters

* bump up range of expected timings

* rename specsUtil for clarity, fix failing tests
2018-04-15 00:43:34 -04:00
Brian Mann 40813b1954 Issue 416 431 681 980 1248 (#1583)
* extract random string to util

* run specs in isolation, aggregate totalFailures, display output per spec, enable globbing for specs

* extract electron app ready into its own module

* WIP: e2e tests around spec isolation, snapshots, stdout, and complete test results

* removed unused and deprecated remove id's feature

* move fs_warn to fs util to promisify an fs singleton

* create a glob singleton util

* cleanup dead removeIds code

* extract files controller specs into its own file

* extract finding specs out of project instance into its own utility with no state

* use glob util singleton

* use fs util singleton

* lots of formatting and cleanup

* fixes failing headless specs

* fixes all failing unit tests

* fixes failing integration test

* WIP: temporarily throw old error msg

* WIP: skip failing --record integration tests for now

* fix failing e2e tests
2018-04-14 23:13:44 -04:00
Chris Breiding 3917545579 preload open sans font to fix screenshot rendering issue (#1509) 2018-04-12 15:46:47 -04:00
Chris Breiding c1f3f38ec7 Watch pluginsFile dependency tree for changes (#1463)
* server: watch pluginsFile dependency tree for changes

* server: fix project unit test re: watching plugins dependency tree

* add unit test for node_modules filtering
2018-04-11 16:23:21 -04:00
Heather Roberts ae794d1f8c Issue 831 (#1480)
* Check actual is not null or undefined rather than a falsy value

This fixes an issue when checking if actual was an empty string

* Add test to check empty string attributes are handled as expected
2018-03-25 10:55:54 -04:00
Pavel 'Strajk' Dolecek ba73e1cc5d Allow text selection in UI (#1474) 2018-03-19 14:18:48 -04:00
Chris Breiding f135f8fd8c server: watch cypress.env.json for changes (#1465) 2018-03-15 12:36:12 -04:00
Oscar Persson 881a164bd1 Lower minimum viewport bound from 200 to 20 pixels (#1448) 2018-03-14 20:44:29 -04:00
Jennifer Shehane c8f2cede1a update fixture and spec for onboarding modal
- should test that ‘plugins’ and ‘index.js’ are displayed as scaffolded
- also test that the scaffolded files/folders are properly nested
2018-03-14 13:44:16 -04:00
Brian Mann d6a6a1100b iterate on flaky test, send in event props, change event type 2018-03-14 00:07:39 -04:00
Brian Mann 88950a42f6 Issue 1436 (#1437)
* driver: add eslint cypress plugin

* server, driver, runner: add __Cypress__ global to runner, add Jira rule to rewrite function to return correct window
2018-03-09 14:58:56 -05:00
Brian Mann 4c5b6aeb47 server: fixes #1415 update some data structures (#1416)
* server: fixes #1415 update some data structures

* server: rename API routes using 'builds' with 'runs'

* server: update API endpoints to newest versions, update response data structures

* server: fix flaky test, ensure response is delayed 10ms
2018-03-04 23:52:13 -05:00
Brian Mann e2a36add47 server: fixes #1413 gzip requests made to the API (#1414) 2018-03-04 22:48:04 -05:00
Brian Mann 13279322dc Issue 1170 1169 1163 (#1412)
* server: WIP fixes #1163, aggregate mocha stats ourselves. rename reporter stats, change test counting semantics

* server: better debugging logs

* fixes: #1169 and #1170 duration accounts for hooks, and capture test + hook timings

- associate test failures to hooks when they occur there
- capture test + hook bodies for display
- capture hook timings per test
- aggregate hook timings + test duration for the actual ‘test duration’
- set ‘skipped’ test state by default
- properly send ‘start’ and ‘end’ dates from the driver - source of
truth
- send test.title as an array instead of serializing it
- capture all tests + hooks during a run

* server: support outputPath args

* server, driver: WIP timings, wall clock durations, hook durations, lifecycle and after runnable fn durations

* server, driver: WIP continue to improve #1163, add skipped, aggregate stats differently from mocha, fix after all hooks not collecting timings

* server: add chai uuid

* server: add e2e tests around timings, update headless to output more complete payload

* server: update ended early to conform to new stats structure

* server, driver: fixes many failing tests (few more to go)

* server: fix failing e2e tests

* server: fix failing tests, come up with interstitial solution for failingTests to prevent breaking changes

* server: fixes failing e2e tests

* server, driver: correctly calculate videoTimeStamp based on wallClockStart

- send wallClockStart so timings accurately reflect when test started
in browser

* server: fix failing e2e tests, normalize dynamic props so tests pass

* server: fix another failing e2e test

* driver: increase timeouts for XHR's to prevent flaky timeouts in CI due to low defaults

* server: increase lifecycle required timing for CI

- saw that CI took up to 247ms for lifecycle
2018-03-04 21:09:10 -05:00
Brian Mann 70e5916a28 server: fixes #1192 pass reporter errors along and provide stack if module doesn't exist (#1411) 2018-03-04 01:17:06 -05:00
Chris Breiding 5dbb7ee5b8 Add selector playground configuration methods (#1378)
* driver: remove duplicate error messages

* driver: add Cypress.SelectorPlayground.defaults

* runner: upgrade unique-selector to 0.4.1

* runner: set font-family and font-size on selector playground tooltip

* driver, runner: bump selector playground to fix edge cases, move files around, add a few more tests
2018-03-01 05:20:13 -05:00
Corneliu 352809ad3e Replacing "\\" with "/" for Windows tests to be rendered in folders (#1336)
* Replacing "\\" with "/" for Windows tests to be rendered in folders

closes #1335

* add fixture to reflect windows paths for specs

* add tests to ensure windows specs are displaying properly nested

* remove .only

* fix issue with other specs missing their ipc setup

- replace linux test with linux paths.
2018-02-20 17:32:44 -05:00
Jennifer Shehane cf47c6ddd8 update viewport dropdown to show proper json formatting (#1354)
- close #1350
2018-02-20 13:59:42 -05:00
Brian Mann 5b9b13aa5f server, driver: fixes #1343, ensure we fire 'test:after:run' events for tests which failed due to a before hook and have sibling tests (#1347)
- add e2e test around this behavior
- cleanup runner code for clarity
2018-02-19 17:51:05 -05:00
Brian Mann c59eafdccd Issue 674 1338 (#1339)
* server: add debug logs for the reporter web socket events

* driver: fixes #1338, more intelligently parse + append error messages

- better handling of empty messages
- better handling of error messages that have strings found inside the
stack

* driver: always serialize props unless they are undefined

- this correctly serializes error.message props which were falsy

* reporter: always set error props regardless of falsiness

* driver: fixes some edge cases for event firing (this was manually merged from a commit in 3.0)

* server, reporter: fixes #674 if no state changes on test update, fire callback anyways when passed

- this prevents a situation where all test props were identical, but
we’re waiting for change event to occur

* server, driver, reporter: add missing tests, fix failing tests

* driver: simplify error appending algorithm, should pass all tests now

* driver: delete this file, its an e2e test

* server: fixes to snapshots. the snapshots previously contained error appending bugs, but now they are correct
2018-02-18 06:14:28 -05:00
Brian Mann 72cc5885a6 server: fixes #1334, tighten up security regexp, add 44 lib tests to ensure nothing is modified (#1337)
* server: fixes #1334, tighten up security regexp, add 44 lib tests to ensure nothing is modified

* server: fix failing test
2018-02-17 23:40:53 -05:00
Brian Mann 68fd25e9dd server: better debugging logs for post tests completion 2018-02-17 23:11:46 -05:00
Brian Mann 2f8da7a7f0 server: fix runaway regexp fails parsing a massive JS file (#1331)
* server: fix runaway regexp fails parsing a massive JS file

* server: fix linting errors, better debug logs

* server: lint fix again
2018-02-17 00:26:38 -05:00
Jacob Rothstein 302a25f34f always escape text before interpolating (#1323)
even if it’s a regex, this selector is still passed to sizzle and needs to be valid, which means quotes must be escaped
2018-02-16 16:20:57 -05:00
Brian Mann 4db34c9c75 Issue 1124 (#1310)
* server: fixes #1124, clear the disk cache whenever launching the browser

* server: bump express to 4.16.2

* server: fixes failing tests
2018-02-14 15:08:12 -05:00
Jennifer Shehane 3c0b08bad2 Issue 1306 (#1307)
* Display empty msg about orgs if only default org available

* remove .only
2018-02-14 11:14:16 -05:00
Jennifer Shehane fedf01c875 remove message about private projects being 'free while in beta' (#1308)
- with billing being released, this message is no longer needed.
- #close #827
2018-02-14 11:13:54 -05:00
Brian Mann 4af9c9893e server: add logs for project config 2018-02-12 14:27:10 -05:00
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 386bed4480 driver: fixes #1156 ensure that spies and stubs and primitives retry when used as an alias (#1294) 2018-02-11 16:05:57 -05:00
Brian Mann b8c1dbc703 driver: increase timeout for flaky test in CI 2018-02-11 16:05:12 -05:00
Brian Mann a360ac098a server, driver: fixes #1292 relax domain parsing rules and fallback to naive segment parsing to fix local and localhost (#1293)
* server, driver: fixes #1292 relax domain parsing rules and fallback to naive segment parsing to fix local and localhost

* driver: simplify ip address regexp
2018-02-11 16:05:06 -05:00
Brian Mann f9e1687f5c driver: increase exec timeout to ensure profile can be read in 2018-02-11 12:10:59 -05:00
Brian Mann b48d29c07e electron: upgrade to 1.8.2, node 8.2.1, chromium 59 (#1275)
* electron: upgrade to 1.8.2, node 8.2.1, chromium 59

* server: update snapshots for node

* server: try to debug timeouts for mochawesome

* bump zunder

- node-sass 3.13.1 does not work with Node 8, since we’re upgrading the
project to node 8.2.1, we needed node-sass 4.5.3+. This node-sass dep
was coming from gulp-sass dep in zunder which has since been updated

* server: figured out that fixture scaffolding can cause timeouts

* bump zunder - get fix so that asserts are not prefixed with /

* server: use our own heroku example app

* use cypress/browsers:chrome64 docker image on Circle with Node 8

* update root folder name

* add hash to root cache

* disable permissions test, because cannot run as root

* server: only disable test in CI

* test new binary against other projects

* all: rename cypress-monorepo -> cypress

* scripts: use latest docker container

* server: don't skip as this messes up hooks which cause failures downstream

* driver: bump timeout for zonejs

* server: make tests pass for node 8.2.1 and 8.4.0
2018-02-10 22:08:56 -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 31f22c24b2 Issue 1155 (#1272)
* server: move hosts out of CLI args, keep as config only

* server, desktop-gui: fixes #1155 accept blacklistHosts from config CLI, display array on desktop gui settings

* server: pass args.config since its no longer flattened

* server: WIP trying to simplify config management

* server: fixes failing tests and circular refs

* server: fix failing tests with config hosts updates
2018-02-07 16:56:40 -05:00
Brian Mann 001a310b04 Issue 1159 (#1259)
* server: pass --cwd from CLI to use when resolving relative paths for various options

- remove unnecessary cwd manipulation in scripts/start

* server: fixes #1159, specs are normalized into an array resolved against cwd

- projectPath is now normalized against cwd as well

* server: move hosts out of CLI args, keep as config only

* server: convert spec array to string on module API

* cli: must ref root package directly

* server: fixes busted specs due to cherry pick

* server: temporary fix for specs being normalized into an array

* server: move around spec flattening earlier

* server: pass absolute path for specs

* server: revert flattening hosts into config temporarily

* server: add correct relative + absolute path to spec

* driver: normalize spec path against project

* driver: skip flaky test for now [skip ci]
2018-02-07 12:11:24 -05:00
Brian Mann e08778dd89 Issue 1175 (#1257)
* server: fixes #802 and fixes #380 and fixes #402 and fixes #493 and fixes #1161

- use the public suffix when parsing tld’s so that document.domain is
set correctly

* driver: move location spec back into cypress tests

* server, driver: fixes: #600 and fixes #1175 use public suffix for parsing tld, handle multiple different subdomains on cy.visit
2018-02-04 17:28:33 -05:00
Brian Mann aa667d5319 server: fixes #802 and fixes #380 and fixes #402 and fixes #493 and fixes #1161 (#1256)
- use the public suffix when parsing tld’s so that document.domain is
set correctly
2018-02-04 17:28:13 -05:00
Peter Hrynkow 893406f121 Allow .localhost tld to be parsed correctly (#1216)
* closes #451 - allow .localhost tld to be parsed correctly

* server: add unit + e2e tests for localhost, simplify regexp
2018-02-04 15:27:51 -05:00
Jacob Rothstein d462e0b83b return NODE_ENV to previous state after konfig() (#1224) close #1223
if the key previously did not exist, delete it
2018-01-25 09:25:05 -05:00
Gleb Bahmutov 11f1d1b6e3 Banner for server e2e tests (#1199)
* server: use terminal-banner in e2e tests

* add mocha-banner to integration tests

* different banner between e2e specs
2018-01-17 12:49:18 -05:00
Gleb Bahmutov 938190aaa5 linted example spec and include example plugins folder 2018-01-08 13:24:53 -05:00
Brian Mann edab5a452b driver: ufff move back e2e setup prior to all reporter tests 2018-01-07 11:27:01 -05:00
Brian Mann 81294562e3 server: fix snapshots, and don't print warnings when socket has been ended 2018-01-06 18:15:10 -05:00
Brian Mann d42be106ef server: derp .only 2018-01-06 17:36:04 -05:00
Brian Mann 0e539c0232 server: enable long stack traces, nest mocha awesome setup 2018-01-06 15:45:37 -05:00
Brian Mann f83c39dd3c Issue 551 1063 1141 (#1158)
* server: fixes #1141 use runner.failures and increment them ourselves

* server: opt, install to server node_modules and then copy into e2e

* server: fixes #1063 and #551, ensure hooks cause exit codes + mochawesome resports are generated

* server: reduce unnecessary async ops
2018-01-06 13:10:40 -05:00
Brian Mann 93317d5e1b server: fixes #1142 polyfill titlePath for reporters using peer dependencies of mocha >= 4 2018-01-05 17:40:05 -05:00