* cli: set NODE_OPTIONS=--max-http-header-size=1024*1024 on spawn
* electron: remove redundant max-http-header-size
* server: add useCli option to make e2e tests go thru cli
* server: add test for XHR with body > 100kb via CLI
* clean up conditional
* cli: don't pass --max-http-header-size in dev w node < 11.10
* add original_node_options to restore o.g. user node_options
* force no color
* WIP: add failing test job with non-root user
* change paths to node user
* print more info
* always use --no-sandbox when starting Electron on non-Windows OS
* add another test job that runs as a root
* use tilda
* use 12.0.0 image
* rename job
* grab binary and npm package from workspace
* update test-binary-against-kitchensink
* try installing several times
* update test-npm-module-and-verify-binary
* update test-binary-and-npm-against-other-projects job
* run test job after upload jobs
* update urls
* use current folder path
* dont log multiple:true by default in dblclick
* fix add in defaults
* fix consoleprops test
* Add link to issue this is addressing
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* test kitchensink on all commits
* separate build binary from upload binary jobs on Circle
* split Mac binary build from upload
* split npm build from upload
* test upload on this branch
* inspect tmp folder
* hmm, where is it
* print more
* ughh
* let us try again
* use root of project
* how is the file not found
* root cypress?
* update upload npm path
* more paths
* update Mac jobs
* remove temp branch
* cleanup type_spec, allow unused-vars for args
* fix missing return
* rename mouse/keyboard
* apply changes on this branch with rename
* temp 07/18/19 [skip ci] type_spec minor changes
* temp 07/19/19 [skip ci]
* temp 07/22/19 [skip ci]
* temp 07/22/19 [skip ci]
* remove accidental spec, use beforeEach visit in click_spec
* add tests for cy.trigger changes
* re-run build
* extract simulated type from native events
* most type_spec passing until tab
* add typedefs
* temp 08/08/19 [skip ci]
* fix type_spec, click_spec
* fix console table event table logging
* fix spec utils
* temp 08/12/19 [skip ci]
* large changes to selection.ts, working type_spec, eslint changes
* fix elements util, cleanup debugging code
* fix linting rules
* fix type_spec in electron by using plain Event contructor
* fix invalid clicking-into-iframe spec
* address review, cleanup
* use webpack-preprocessor (required for typescript files)
* fix invalid connectors_spec
* chore(lint): fix linting, since changed rules
* fix not borrowing property getter for maxlength
* temp 09/25/19 [skip ci]
* add test for clicking checkbox, cleanup click_spec
* document mouse click and mouse move algo, adjust mouse move, add test for recursive movement
* cleanup / formatting
* scope the getCommandLogWithText to the active runnable to prevent leakage
* cleanup tests, make values static so tests pass consistently
- use attach listener alias APIs
- remove magic number constants
- fix some incoherent html / script tag stuff
* begin implementation for returning fromAutWindow
- restore original fromWindow algorithm
- begin writing fromAutWindow for calculating red hitbox coordinates
which are layered on the AUT
* move describe block with the others
* refactor actions to DRY up duplicated logic between click/dblclick/rightclick
- tighten up the mouse.js method names, name them consistently
* remove comment
* fix iframe coords and test
* temp 10/06/19 [skip ci]
* rename fromDocCoords->fromWindowCoords, fix type_spec ux test
* fix after merge from mouse-fixes branch / develop
* temp 10/08/19 [skip ci]
* Revert "temp 10/08/19 [skip ci]"
This reverts commit 92b73f6107.
* remove only, fix contenteditable test
* add test for datetime-local inputs
* add webpack devdep
* fix debugging code
* fix force:true on hidden input
* up timeout for test in ci
* tighten up method, remove unnecessary arg
* add debug logic for retries to console.error() non cypress errors
* renamed fromWindow -> fromElWindow, and fromViewport -> fromElViewport
* handle calculating the fromElWindow coordinates inline
* extract out function for clarity, receive consistent arg names
* cleanup, add lots of comments
* fix display specific test
* fix type follow focus when redirect on focus
* cleanup new follow focus test
* upgrade eslint-plugin-dev to 5.0.0
* more [lint fixes]
* use typescript in driver
* cleanup minor
* remove unneeded file
* mild refactor webpack configs
* fix elements.ts
* fix isTextLike signature change
* fix isType check, fix type_spec
* actually use webpack-preprocessor
* fix isType domUtil
* fix connectors_spec
* cleanup connectors_spec
* address feedback- cleanup, add comments, refac
* answer: no, need index.js
* cleanup after driver typescript PR
* fix keyboard getActiveModifiers
* fix(driver:keyboard): fix typing negative numbers with existing text selection
* remove debugging code, cleanup
* link fixed issues in tests, actually fix one issue
* cleanup remove dead code
* remove unused helper
* add test for #2166
* pay no attention to the code and implementation changing... add tests and note for changing focus into date input
* mark fix for issue #3316
* mark fix for issue #3722
* rename elements.isType -> elements.isInputType for clarity
* restructure keyboard a bit, don't export default, rework static class properties to regular exports
- attach $Mouse + $Keyboard to Cypress
* tighten up
* coffeescript fixes, consistent regexp const naming
* capitalize interface, tighten up several modifier functions
* misc cleanup and tightening up
* rework impl to use stubs instead of numbers
* some more cleanup
* fix logic with when function is called
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* try connecting to chrome remote interface
* linting
* print CRI targets for better debugging
* linting
* load empty tab first when connecting to CRI
* first load blank page, then navigate
* Page.navigate is working
* linting
* remove title
* add mocha banner
* more banners
* update some server unit tests
* update integration test
* document how to run single driver spec file
* set the focus back on the page before navigating from blank chrome tab
* update server unit test
* do not store Chrome remote interface reference for now
* record video of the Chrome tab using screencast API
* use dynamic port to connect to Chrome remote interface
* update unit tests
* refactoring
* wrap chrome remote interface in our interface, limit access to send
* resolved merge
* fix reference
* passing run unit spec
* stub canary search for CI to pass
* add build step to packages/server
* update chrome spec
* do not build js on install for server
* updated spec snapshots
* update 6_visit_spec snapshot
* update snapshot for 6_web_security_spec
* update snapshot for 3_plugins_spec
* update snapshot for 3_user_agent_spec
* update snapshot for 5_stdout_spec
* update snapshot for 2_browser_path_spec
* do not git ignore js files, add note why
* update several snapshots with video on Chrome
* update visit performance snapshot
* add chrome-remote-interface dependency
* cleanup coffeescript conversion to JS, fix some type errors, make parallel override clearer
* fix failing tests
* Fix snapshot - now we do record in Chrome, so warning message is no longer there.
* remove chrome warnings about not recording from snapshot
* Remove performance tests from 6_visit_spec snapshot
* Remove error from snapshot
* Add newline back to cy_visit_performance_spec snapshot
* Use CDP to control Chrome cookies + screenshot
* Add devtools types
* Cleanup
* Cleanup
* Add guards for minimum CDP version
* Fix failing tests
* Split cdp_automation_spec out of electron_spec
* Move takeScreenshot to cri-client
* Navigate to about:blank
* look for blank page url
* add note about avoiding Prettier
* disable prettier a little more
* call chrome remote interface close after each spec
* return promise when starting screencast
* update failing unit tests, add cri client close test
* update integration test
* Add verbose debug statements to cri-client
* Use connect.createRetryingSocket for CDP connection
* record video from chrome browsers
* add method for validating browser family
* update e2e spec snapshot
* update 4_request_spec snapshot
* update snapshot for spec 1_commands_outside_of_test_spec
* update snapshot for 3_plugins_spec
* update snapshot for spec 3_user_agent_spec
* try: Always log video capturing errors
* update snapshot for 2_browser_path_spec
* update snapshot for 2_cookies_spec
* better browser family test
* update snapshot for 5_stdout_spec
* update snapshot for 5_subdomain_spec
* Add protocol_spec tests
* do not capture video during performance test
* Add test for VIDEO_POST_PROCESSING_FAILED warning
* Add basic cookie validation in cy.setCookie
* Update cdp_automation to throw on Network.setCookie failure code
* Update tests 🎉
* Update snapshot
* Fix test
* Remove redundant logs, cleanup
* Add cri-client_spec, fix some small bugs, improve errors
* Update dep
* use client.on to register screencast callback
* use isCookieName
* strict-cookie-parser@3.1.0
* cleanup prettier, extract some functions, switch to browser.family
* moar cleanup and fixes
* add logging to the cri-client so we can see every message sent + received to the cdp protocol
* bump bluebird to 3.7.0 for .tapCatch addition
* Fix unit tests
* WIP: update e2e test to ensure that duration of the video matches what we expect
* Test duration of recorded video
* Run 6_video_compression in chrome + electron
* Cleanup
* finish ffmpeg duration verification
* Update 8_reporters_spec snapshot
* Fix cri-client test
* Update CRI close logic to monkey-patch browser.kill
* add isBrowserFamily back
* make it possible for remote-debugging-port to get overridden
* Make CDP timeout 5s; add unit, e2e tests for CDP failure; add user-friendly CDP failure error
* Update tests
* Use CYPRESS_REMOTE_DEBUGGING_PORT to set CDP port; update CDP error message
* Change new Buffer to Buffer.from
* Apply name validation on all cookie commands
* Just throw on Chrome start if the CDP version is < 1.3
* Fix cypress_spec
* Use CDP to set resolution + scale factor in Chrome e2e
* Revert "Use CDP to set resolution + scale factor in Chrome e2e"
This reverts commit a1b86d9413.
* use CYPRESS_FORCE_BROWSER_SCALE to force standard resolution
* don't do --window-size --kiosk
* Use CDP to set resolution + scale factor in Chrome e2e
* Revert "use CYPRESS_FORCE_BROWSER_SCALE to force standard resolution"
This reverts commit 22c5e78670.
* Use Page.captureScreenshot for Electron + Chrome, reduce logic
* Use before() task to force device metrics in Chrome
* Fix protocol_spec
* Update 7_record_spec to allow for before() hook
* Update 6_task_spec snapshot
* Appease eslint
* Update hooks in 5_spec_isolation snapshot
* some general promisification and cleanup
* feedback on pluginsfile
* cdp_automation feedback
* chrome.coff feedback
* feedback
* run e2e tests on port 4466, ensure no e2e test ever runs on 5566 to prevent conflicting with debugger port
* accept new 'remote:debugger:protocol' automation command to control device metrics overrides
* update web security e2e to run on electron + chrome
* run web security tests in electorn, disable context isolation
* pass disable-site-isolation-trials to Electron so webSecurity works
* Fix errors in e2e tests caused by extra log item
* fix cri-client unit tests
* fancy arrows in log message
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* Begin inserting newlines for long specfiles in results table of stdout
* clean up some decaff weirdness
* move newlines function into util
- call ‘formatPath’ on any area where the path could be too long and
needs to word wrap
* Clean up some styles, padding that does nothing - get specname closer to symbol by 1 pixel
* Commit new snapshot changes. Word wrapping, some spacing changes
* remove more padding that does functionally nothing
* Fix more of the extra unnecessary padding in 'Running' table
* Update other CLI snapshots to match new spacing
* Remove the error thrown when colWidths exceeds 100, I don't see this as necessary since we have snapshots covering the design of the columns.
* Update some snapshots I missed
* Add gaurd in newLine function in case there is no specfile name
* fix more snapshots
* Fix snapshot extra space
* forcibly enable colors in all e2e tests, and strip them back out of the snapshots
* Fix colors that got lost in stdout
* Update newlines function to use simpler ramda split + fix implementation to remove last newline
- write unit test for newlines function for easier refactoring in future
* iterating on fixing the weird column issues
* handle if str is undefined in newlines function
* Draw the tables at exact 100 width, taking into account padding and borders
- Calculate the actual width of the table column in order to add
newlines at that length
- Add newlines for the ‘Finished processing’ output of video file
- Add newlines for the ‘Screenshots’ output of screenshot paths
* remove .only
* Remove extra 1 char padding
* Remove color changes (separate PR for this)
* Replace project path with same num chars of X's
We were just replacing it with foo/bar/baz which would mess up the
alignment of the snapshots since it was removing chars
* If we are running with a CYPRESS_ENV of 'test', replace the cwd
- Replace the current working directory if we’re running withing
Cypress so that our snapshots are consistent when run on diff machines.
- Ideally, I would have liked to have had a special ‘—fake-cwd-path’
flag so that we can override this later, but I couldn’t figure how to
pass that.
* Continue stripping the projectPath from snapshot output
- This is required because some messaging comes from outside of the
run.js file, so we still need to replace these paths in snapshot.
* Update snapshots to have correctly replaced cwd
* Update formatting of new Node Version path to properly return within our stdout tables
* remove tests for method that does not exist
- update the drawing of table columns to match the new logic - don’t
need weird spaces and padding right anymore.
- update snapshot to match
* Update snapshot for performance test that didn't previously run
* return empty string if no name passed (really just for weird edgecases in our own tests)
* Add instructions on how to run performance tests in server
* Update video processing and screenshot tables so they no longer use weird negative padding hack with ' ' border
* Update snapshots to reflect new table spacing
* Another snapshot update missed
* Accept 'FAKE_CWD_PATH' env var to replace it in the run
* Pad paren time to factor in extra whitespace
* Update snapshots to no longer have static 'acb123.mp4' for video names
- This was throwing off the table calculations.
* remove stripping screenshot dimensions + replace padStart with padEnd
* Update snapshots to instead user shorter form 'second' in order to account for shorter duration printing when it is 1 second
* Add correct padding for screenshot dimensions
* update perf spec
* Update performance snapshot
* remove unused 'stripAnsi' dep
* Fix merge conflict failure - didn't regenerate snapshot correctly last time.
* commit size of electron screenshot (fix incoming in another PR to avoid this)
* Correctly handle padding of node version so we don't have to rewrite this later.
* split out let & const assignments
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* Update circle.yml to run e2e tests in chrome + electron
* WIP: create multiple tests per browser, but utilizing the same base snapshot
- create a dynamic test title with browser appended
- use a base named snapshot without the browser name appended
- patch snap-shot-it not to rethrow twice unnecessarily which ends up
throwing the wrong error
* Add e2e.coffee to stop-only ignore
* Convert existing x-browser e2e tests to use e2e.it
* update snapshots
* really add e2e to stop-only skip
* Replace screenshot dimensions in all tests, run only in process.env.BROWSER
* add e2e.it to more tests that should be x-browser
* update snapshots
* PEMDAS
* default e2e browser -> electron
Run afterEaches when skipping testo
Recurse upwards with runAfterEach
stop promise chains
* Revert "default e2e browser -> electron"
This reverts commit 3104f998da.
* Undo
* snap-shot-it@7.9.0
* Remove snap-shot-it patch
* Change e2e snapshot to use allowSharedSnapshot
* Add keepScreenshotDimensions to screenshot specs
* update snapshots
* fix snapshotit
* keepScreenshotDimensions: true -> sanitizeScreenshotDimensions: false
* Fix screenshot snapshots
* reduce snapshot noise
* rm 0_simple_spec
* deabstract circle.yml command
* fix circle.yml
* reduce snapshot noise
* clean up 6_visit_spec snapshot
* use allowSharedSnapshot: true in 5_spec_isolation
* Fix 5_screenshots, 2_form_submissions
* Normalize screenshot sizes in 5_spec_isolation snapshot
* Add sanitizeScreenshotDimensions only to non-e2e-project tests
Add --window-size=1280,720 --kiosk to chrome args
* update snapshots
* Use e2e.it for chrome/electron-specific tests
* handle logic for skipping tests when default browsers do not match specified browser
- implement e2e.it.skip to match mocha’s it.skip
- allow turning off dynamic test generation
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* Updated cypress/scripts/binary/util/upload.coffee to use curl and API Tokens as the cfcli command currently *ONLY* supports API Keys.
* Update purge cache to use request-promise
* Cleanup & remove sync method
* Remove unused cloudflare-cli dep
* update appveyor encrypted secrets for cloudflare
* add missing deps
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* cleanup type_spec, allow unused-vars for args
* fix missing return
* rename mouse/keyboard
* apply changes on this branch with rename
* temp 07/18/19 [skip ci] type_spec minor changes
* temp 07/19/19 [skip ci]
* temp 07/22/19 [skip ci]
* temp 07/22/19 [skip ci]
* remove accidental spec, use beforeEach visit in click_spec
* add tests for cy.trigger changes
* re-run build
* add typedefs
* temp 08/08/19 [skip ci]
* fix type_spec, click_spec
* fix console table event table logging
* fix spec utils
* fix invalid clicking-into-iframe spec
* address review, cleanup
* temp 09/25/19 [skip ci]
* add test for clicking checkbox, cleanup click_spec
* document mouse click and mouse move algo, adjust mouse move, add test for recursive movement
* cleanup / formatting
* scope the getCommandLogWithText to the active runnable to prevent leakage
* cleanup tests, make values static so tests pass consistently
- use attach listener alias APIs
- remove magic number constants
- fix some incoherent html / script tag stuff
* begin implementation for returning fromAutWindow
- restore original fromWindow algorithm
- begin writing fromAutWindow for calculating red hitbox coordinates
which are layered on the AUT
* move describe block with the others
* refactor actions to DRY up duplicated logic between click/dblclick/rightclick
- tighten up the mouse.js method names, name them consistently
* remove comment
* fix iframe coords and test
* rename fromDocCoords->fromWindowCoords, fix type_spec ux test
* tighten up method, remove unnecessary arg
* add debug logic for retries to console.error() non cypress errors
* renamed fromWindow -> fromElWindow, and fromViewport -> fromElViewport
* handle calculating the fromElWindow coordinates inline
* extract out function for clarity, receive consistent arg names
* cleanup, add lots of comments
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* try connecting to chrome remote interface
* linting
* print CRI targets for better debugging
* linting
* load empty tab first when connecting to CRI
* first load blank page, then navigate
* Page.navigate is working
* linting
* remove title
* add mocha banner
* more banners
* update some server unit tests
* update integration test
* document how to run single driver spec file
* set the focus back on the page before navigating from blank chrome tab
* update server unit test
* do not store Chrome remote interface reference for now
* record video of the Chrome tab using screencast API
* use dynamic port to connect to Chrome remote interface
* update unit tests
* refactoring
* wrap chrome remote interface in our interface, limit access to send
* resolved merge
* fix reference
* passing run unit spec
* stub canary search for CI to pass
* add build step to packages/server
* update chrome spec
* do not build js on install for server
* updated spec snapshots
* update 6_visit_spec snapshot
* update snapshot for 6_web_security_spec
* update snapshot for 3_plugins_spec
* update snapshot for 3_user_agent_spec
* update snapshot for 5_stdout_spec
* update snapshot for 2_browser_path_spec
* do not git ignore js files, add note why
* update several snapshots with video on Chrome
* update visit performance snapshot
* add chrome-remote-interface dependency
* cleanup coffeescript conversion to JS, fix some type errors, make parallel override clearer
* fix failing tests
* Fix snapshot - now we do record in Chrome, so warning message is no longer there.
* remove chrome warnings about not recording from snapshot
* Remove performance tests from 6_visit_spec snapshot
* Remove error from snapshot
* Add newline back to cy_visit_performance_spec snapshot
* Navigate to about:blank
* look for blank page url
* add note about avoiding Prettier
* disable prettier a little more
* call chrome remote interface close after each spec
* return promise when starting screencast
* update failing unit tests, add cri client close test
* update integration test
* Add verbose debug statements to cri-client
* Use connect.createRetryingSocket for CDP connection
* record video from chrome browsers
* add method for validating browser family
* update e2e spec snapshot
* update 4_request_spec snapshot
* update snapshot for spec 1_commands_outside_of_test_spec
* update snapshot for 3_plugins_spec
* update snapshot for spec 3_user_agent_spec
* try: Always log video capturing errors
* update snapshot for 2_browser_path_spec
* update snapshot for 2_cookies_spec
* better browser family test
* update snapshot for 5_stdout_spec
* update snapshot for 5_subdomain_spec
* Add protocol_spec tests
* do not capture video during performance test
* Add test for VIDEO_POST_PROCESSING_FAILED warning
* use client.on to register screencast callback
* cleanup prettier, extract some functions, switch to browser.family
* moar cleanup and fixes
* add logging to the cri-client so we can see every message sent + received to the cdp protocol
* bump bluebird to 3.7.0 for .tapCatch addition
* Fix unit tests
* WIP: update e2e test to ensure that duration of the video matches what we expect
* Test duration of recorded video
* Run 6_video_compression in chrome + electron
* Cleanup
* finish ffmpeg duration verification
* Update 8_reporters_spec snapshot
* Update CRI close logic to monkey-patch browser.kill
* add isBrowserFamily back
* make it possible for remote-debugging-port to get overridden
* Make CDP timeout 5s; add unit, e2e tests for CDP failure; add user-friendly CDP failure error
* Update tests
* Use CYPRESS_REMOTE_DEBUGGING_PORT to set CDP port; update CDP error message
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Zach Bloomquist <github@chary.us>
* dont use jquery for width/height calculations for dom highlights, put opacity on wrapper element
* add test for inline els
* some final cleanup
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* [skip-ci] Add some of new Pull Request and Pull Request Review process to Contributing guide
* More updates to the Guidelines / dep updates and minor changes that were outdated.