Commit Graph

11314 Commits

Author SHA1 Message Date
Gleb Bahmutov
7a2c21144f add missing TypeScript jsdocs for types for issue 2009 (#2137)
* doc second cy.find type

* document type for cy.request

* document Cypress.env command

* doc type for Cypress.log

* doc types for uncheck

* add type docs for cy.spy

* document spies and stubs types

* add space to align jsdoc stars

* types: show to correctly pass request options, close #2093

* cast just the http method property

* types for spy withArgs and as

* doc more types for overrides

* type for spread

* type for overriden then

* types for cy.trigger overrides

* rest of types of overriden methods, close #2009
2018-07-12 18:42:50 -04:00
Chris Breiding
a97d9be210 Fix screenshot paths differing between interactive and run modes (#2103)
* refactor desktop-gui spec path handling

- differentiate folders vs spec files
- simplify specs store, remove mutations
- fix spec changing via browser url
- normalize paths for windows on server

* move windows paths logic back to desktop-gui

using any method from node’s path util converts / back to \ on windows, so trying to normalize the paths to use / is futile. instead, properly split and compare paths in the desktop gui as needed
2018-07-12 18:15:07 -04:00
Chris Breiding
9291eba1a1 Fallback to env variables for git info and include PR id and default branch (#2089)
* make it alphabetical

* fallback to env variables for git info

* fix git info implementation / handle unhandled provider

* fix unit test

* update json schemas with PR number and default branch

* parse Circle url to get PR number

* test getCirclePrNumber

* remove only

* pullRequestId is a string

* warn on commit if there are tests with .only

* bump json-schemas to 5.10.0
2018-07-12 18:11:18 -04:00
Jennifer Shehane
0f9abeab80 update kitchen-sink example to 1.0.2 release (#2063) 2018-07-12 17:49:34 -04:00
Brian Mann
2689ff8416 add more debug logs (#2109) 2018-07-06 17:19:20 -04:00
Brian Mann
7ac3b85577 enable disabling chromeWebSecurity in chrome 67 (#2077)
fixes #1951 
fixes #2001
2018-07-01 02:58:42 -04:00
Jennifer Shehane
03c9069624 Issue 2060 (#2061)
* display name of browser within runs list

* remove .only
2018-06-30 20:44:36 -04:00
Jennifer Shehane
c5af554dca bump deps for security warnings (#2067)
- removes security warning during npm audit
- close #1701
2018-06-30 04:48:03 -04:00
Brian Mann
2f90edfb13 release 3.0.2 [skip ci] v3.0.2 2018-06-29 05:08:37 -04:00
Brian Mann
58f3453b35 remove unused file causing binary build failures 2018-06-29 00:12:59 -04:00
Chris Breiding
7f1a69f20e Add 'after:screenshot' plugin event (#2058)
- Fixes #2039
- Fixes #2040
2018-06-28 23:11:43 -04:00
Ben Kucera
ddec7db17a fix error typo (#2057) 2018-06-28 11:08:44 -04:00
Brian Mann
dc28e87fb8 add support for handling event streams / server sent events / SSE (#2054)
* WIP: fixing SSE

* adds tests and error handling for event streams

* fixes failing tests due to request dep upgrade

* whoops, make sure e2e tests finish. add snapshot
2018-06-28 06:22:38 -04:00
Brian Mann
a9d08cfebe security stripping oversight (#2031)
fixes #2030
2018-06-26 18:36:02 -04:00
Gleb Bahmutov
ee3eb4a2dd add cy.stub type for window alert and confirm (#2008)
* add cy.stub type for window alert and confirm

* jsdoc for cy.contains

* add jsdoc for viewport width and height

* jsdoc for prev command

* add jsdoc for cy.wait

* add jsdoc for clearLocalStorage

* jsdoc for wrap

* add jsdoc for screenshot with filename

* add jsdoc for clock

* add jsdoc example to cy.its

* complete jsdoc for siblings

* jsdoc for route overrides
2018-06-25 16:42:51 -07:00
Zeus
3cbc0b9c67 Update <head> element regex to avoid testing positive on <header> elements (#2021)
* Update <head> element regex to avoid testing positive on <header> elements

* Add basic rewriter unit tests

* Cleanup excess whitespace in spec

* add integration test around not injecting into <header> elements when <head> is not present

* remove unit tests since they are already covered in integration tests
2018-06-25 13:16:58 -07:00
Chris Breiding
2ca10ef2e1 state.json changes/improvements (#2020)
- Fixes #2013
- Fixes #1912
- Fixes #1905
- Fixes #1890
2018-06-25 13:09:57 -07:00
Roman Hotsiy
1137840bfe driver: use fromViewport vs fromWindow coords in actionability check (fixes #1475) (#1478)
* driver: use fromViewport vs fromWindow coords in actionability check (fixes #1475)

* Write test that ensure entire page does not scroll when action on sticky el

- with old code - there were 36 elements scrolled, with new code only 2.

* target only sticky elements in scrollable check

* fix comment and add link to the PR
2018-06-25 11:45:00 -07:00
Brian Mann
55b352a11d enable passing string arguments to timers (#2025)
fixes #1854
2018-06-25 11:44:25 -07:00
Brian Mann
df0ec8ea8c catch EPIPE errors (#2011)
fixes #1841
2018-06-21 18:29:27 -04:00
Chris Breiding
ace7e97675 don’t truncate xhr urls in command log (#2004) 2018-06-21 11:39:17 -04:00
Brian Mann
8aa1922c13 dont blow away the default electron options (#1993)
fixes #1992
2018-06-20 16:14:52 -04:00
Ben Kucera
f90bfbec90 update ci error msg (#1928) 2018-06-20 00:14:15 -04:00
Ben Kucera
db4a4a6d22 Improve Error logging around Cypress verify (#1986)
close #1984 improve error logging for `cypress verify`
close #1985 remove "skipping install" message to local users, keep in CI
2018-06-19 21:52:25 -04:00
Ben Kucera
5a4b2a4a0a allow relative paths in CYPRESS_* env vars (#1989) 2018-06-19 17:34:51 -04:00
Chris Breiding
06fd648901 fix reporter command shift when transiting from pending (#1988) 2018-06-19 12:39:55 -04:00
Brian Mann
c2256684be decode multi bytes correctly when stripping security from files (#1977)
* decode multi bytes correctly when stripping security from files

* fixes proxy errors occurring due to bad gzip responses from servers

- test that error handling on streams works as intended, send back 502
- test that truncated gzip responses are handled correctly
2018-06-19 03:21:42 -04:00
Brian Mann
7c6c8a2838 WIP: fix focus / blur event handling (#1962)
- fixes #1909 
- fixes #1939 
- fixes #1940
2018-06-18 05:36:23 -04:00
Brian Mann
eda664891a increase allowed zip size... again
@Bkucera probably want to look at this again
2018-06-18 03:16:27 -04:00
Brian Mann
abfb594872 add browser.isHeadless + browser.isHeaded (#1975)
* add isHeadless + isHeaded to browser

- move around logic so that instead of launching a browser by name, its
passed the entire browser object
- simplify logic for passing around options.headed

* launch the browser with an object, not browser name

* update browser types

* fix failing tests
2018-06-18 03:15:19 -04:00
Brian Mann
98fc4bc83c screenshot perf and high dpi res (#1864)
- fixes #1857 
- fixes #1863
2018-06-18 03:15:02 -04:00
Brian Mann
fc1cf4a144 fix failing build script 2018-06-18 02:56:44 -04:00
Chris Breiding
0e2246785c Screenshot fixes/enhancements (#1858)
* create directory path from screenshot name

* fix screenshot e2e specs

* ensure unique file paths for non-named screenshots

* append failure screenshots with ‘— failure’

* fix snapshot differences caused by slow computer

* fix driver specs

* fix minutes/seconds e2e snapshot replacer

* fix minutes/seconds e2e snapshot replacer again

* fix e2e specs failing due to screenshot path differences

* more snapshot fixes

* more snapshot fixes

* more snapshot fixes

* fix reporter showing wrong path for nested spec when no tests

* nest non-named screenshots in path based on spec path

* fix specs

* fix snapshot

* test that server + project state is reset between specs in cypress run mode

* rename spec.path to spec.relative. pass around the spec object instead of a string path

- store state on the project for current spec + browsers
- simplify how desktop gui passes around spec object
- fixes #1921
- make all specs a real spec model
- rename ‘Run all tests’ to ‘Run all specs’

* remove pretty-error dependency

* fixes #1919 and #1918, add Cypress.spec and Cypress.browser

* fixes all the failing tests

* fixes failing tests

* types: Cypress.spec

* add types for Cypress.browser

* fixes more failing tests

* enable null for spec props when running "All Specs"

* read comments per PR

https://github.com/cypress-io/cypress/pull/1858#issuecomment-396121876

* fixes failing tests

* fix linting

* fix types assertion

* fixes failing tests

* fixes failing tests, update from -- failed to (failed)

* ugh regexp

* fixes more tests

* add name, specName, and testFailure to the afterScreenshot props

* fix failing tests. append (failed) for failed screenshots

- use { testFailure: true } to indicate a failing test screenshot for
use in props
2018-06-17 20:01:27 -04:00
Brian Mann
5c08e2aae6 upgrade ffmpeg to v4, add more debug logs (#1973)
- fixes #1971 
- fixes #1972
2018-06-17 20:00:31 -04:00
Jennifer Shehane
453313fe92 bump cachedir to 1.3.0 (#1947) 2018-06-14 23:52:39 -04:00
Josh Pike
40c3a6b104 Updated request in CLI package.json (#1916) 2018-06-09 16:23:17 -04:00
Gleb Bahmutov
360b58b27d Ts server yields 1907 (#1911)
* types: cy.server yields default server options, close #1907

* add examples to a few TS commands
2018-06-08 11:47:24 -04:00
Gleb Bahmutov
3241c6e229 types for auth in cy.visit, close #1897 (#1908) 2018-06-08 10:11:36 -04:00
Gleb Bahmutov
ff58367838 Ts definition for clear local storage 1899 (#1903)
* types: clearLocalStorage yields localStorage, close #1899

* types: minimatch is a function, close #1902
2018-06-07 20:10:45 -04:00
Chris Breiding
5efe2db542 Ensure errors from res.sendFile propagate and fail test run (#1883)
* ensure errors from res.sendFile propagate and fail test run

* fix e2e specs

* fix e2e test regression by correctly catching res.sendFile errors
2018-06-06 14:14:13 -04:00
Ben Kucera
56e00981aa cache commands, --no-exit (#1875)
* add --no-exit, cache commands

* Manage -> Manages

* fix run, run spec

* remove comments
2018-06-05 16:19:23 -04:00
Gleb Bahmutov
39b31fd771 Route typescript fix 1831 (#1874)
* types: add object to routes, close #1831

* types: remove Response type from cy.route, it belongs only in cy.request

* add example to cy.route doc

* types: add PATCH method, same as pull request #1778
2018-06-05 15:33:24 -04:00
David Almeida
a77e7255ca server(fix) cleanup integrationFolder in filePath, close #1704 (#1705) 2018-06-05 15:22:56 -04:00
Kevin Heard
5330ccd476 fix typo in comments (#1791) 2018-06-05 15:20:59 -04:00
Ben Kucera
ca9cb8f10b env vars from configs, respect loglevel from npm (#1855) 2018-06-05 15:14:51 -04:00
Chris Breiding
39164a5c31 Fix handling of absolute path to pluginsFile (#1868)
* fix handling of absolute path to pluginsFile

* fix unit tests for pluginsFile absolute path changes
2018-06-05 15:13:00 -04:00
Jennifer Shehane
4869d64c82 Add pull request template [skip ci] 2018-06-05 12:46:08 -04:00
Jennifer Shehane
94d9269ec4 Update issue templates [skip ci] 2018-06-05 12:39:57 -04:00
Jennifer Shehane
7d999e0252 Update project name in nav to display as last dir when in Windows (#1833)
* Update project name in nav to display as last dir when in Windows

- close #1830

* let -> const

* set project name to projectName when returned from open:project

* Update imported Component name to match exported Component name

* update tests to reflect use of 'projectName' for nav and setup form
2018-06-01 15:32:00 -04:00
Przemek
298f610275 fix for issue-1226 - preserve styles for empty style tags - css-in-js (#1852)
closes #1226
2018-06-01 14:04:28 -04:00