-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
WIP Native Events #2436
Closed
WIP Native Events #2436
Changes from 4 commits
Commits
Show all changes
255 commits
Select commit
Hold shift + click to select a range
c5e2070
click mostly working
kuceb 1e5c003
remove babelify code [skip ci]
kuceb bab30d7
add keyhole to native clicks
kuceb 246b58f
Merge remote-tracking branch 'origin/develop' into issue-311
kuceb b79af06
temp 11/09/18
kuceb 1bec79a
decaf
kuceb 36d60ff
decaffeinate: Rename files
kuceb 44c7ba4
decaffeinate: convert files
kuceb c42a22b
Merge branch 'decaf-issue-311' into temp-311-done
kuceb 8d6efcc
decaffeinate: Rename selection.coffee from .coffee to .js
kuceb cb92153
decaffeinate: Convert selection.coffee to JS
kuceb 3598821
decaffeinate: Run post-processing cleanups on selection.coffee
kuceb 979a99a
Merge branch 'decaf-issue-311' into issue-311
kuceb 8fa2af1
delete selection.js
kuceb 1e4637d
decaffeinate: Rename selection.coffee from .coffee to .js
kuceb 32c91c6
decaffeinate: Convert selection.coffee to JS
kuceb 3470e18
decaffeinate: Run post-processing cleanups on selection.coffee
kuceb cf02956
temp
kuceb 913ccac
temp 11/28/18
kuceb 9bc2ff7
native click and type [skip ci]
kuceb c1b761e
fix programmatic blur events, allow typing into currently focused, fi…
kuceb def6578
intercept .blur
kuceb afa9af8
reference issues in tests
kuceb 805a86b
add tests, escapse strings for console
kuceb aa40b4d
add comment about tests in logger.js
kuceb cdfb1d0
fix undefined prop bug
kuceb 6440c05
fix broken test
kuceb afc2ffb
decaffeinate: rename click, keyboard, mouse
kuceb d1f758f
decaffeinate: Convert click.coffee to JS
kuceb 7753277
decaffeinate: Run post-processing cleanups on click.coffee
kuceb d5fd549
decaffeinate: Rename click_spec.coffee from .coffee to .js
kuceb acc81f7
decaffeinate: Convert click_spec.coffee to JS
kuceb cb2c11c
decaffeinate: Run post-processing cleanups on click_spec.coffee
kuceb d208fb5
decaffeinate: Rename click.coffee from .coffee to .js
kuceb 37dd0f6
decaffeinate: Convert click.coffee to JS
kuceb ceec9d3
decaffeinate: Run post-processing cleanups on click.coffee
kuceb ac6e347
decaffeinate: Rename mouse.coffee from .coffee to .js
kuceb c442eab
decaffeinate: Convert mouse.coffee to JS
kuceb a95bd7c
decaffeinate: Run post-processing cleanups on mouse.coffee
kuceb 8c28e0b
decaffeinate: Rename keyboard.coffee from .coffee to .js
kuceb 501843b
decaffeinate: Convert keyboard.coffee to JS
kuceb c4749b8
decaffeinate: Run post-processing cleanups on keyboard.coffee
kuceb 1495901
update click to send all necessary events
kuceb 2b77127
add pointerevents, handle preventDefault
kuceb ca391da
move keyboard, mouse under cy/
kuceb fd291c7
recalculate coords after "nudge" scroll
kuceb 9555894
fix corrupting test in click_spec
kuceb c25cfa1
finish moving keyboard/mouse to cy/
kuceb 87515d4
remove .only from type_spec
kuceb f871b82
fix up click_spec, fix edge cases
kuceb 15593de
add "be.focused" to chai_jquery
kuceb 69eb24d
add comment explaining the mess
kuceb e513ff1
add type definitions
kuceb 94712b3
Merge remote-tracking branch 'origin/issue-97-focus-assertion' into i…
kuceb f932b13
refactor assertion to use jquery assertion
kuceb 34b52d3
remove trailing whitespace
jennifer-shehane 47f03a8
add test for multiple elements, update typedefs
kuceb 314e0f1
fix failing tests: not.be.visible -> not.exist
kuceb 8d3ace6
allow should(not.be.visible) for failed selectors
kuceb ab14758
remove unrelated visibility changes
kuceb b401c32
Merge remote-tracking branch 'origin/develop' into issue-97-focus-ass…
kuceb 763066a
extract only focus assertion
kuceb 835596e
Revert "Merge remote-tracking branch 'origin/develop' into issue-97-f…
kuceb b2e23d2
Merge remote-tracking branch 'origin/issue-97-focus-assertion' into i…
kuceb b9f1b91
temp 02/01/19
kuceb 63e68cb
polish for review
kuceb 255c0e8
play nice with consoleProps for cy.type
kuceb 780ed1a
add dblclick + tests
kuceb cdb464e
rightClick, focus test changes
kuceb 759cfdc
Merge remote-tracking branch 'origin/click-command-focus' into issue-…
kuceb 34aaea0
Revert "rightClick, focus test changes"
kuceb 2b21a8b
temp 02/07/19
kuceb 5683273
add rightclick, fix trigger coords, add retry for flaky tests, add jq…
kuceb 17cfd39
add rightclick, fix trigger coords, add retry for flaky tests, add jq…
kuceb 8bee37c
add custom matchers helper, fix trigger, update test
kuceb ba8d9da
remove only
kuceb ab1343d
add retries to flaky tests, remove debugging code
kuceb e36e2c3
fix leaking defaultCommandTimeout
kuceb be09673
fix duplicate chai declaration
kuceb 50ed3e3
fix deps
kuceb 5633145
Merge remote-tracking branch 'origin/issue-2957' into issue-311
kuceb ec2fcf6
base off simulated mouse fixes
kuceb 4d957c6
fix type.js, fix deps
kuceb bebcde6
temp 04/18/19 [skip ci] click_spec passing
kuceb cd8ff0b
temp 04/22/19 [skip ci] actionability accept more options, designmode…
kuceb 0d6fcfa
Add files via upload
kuceb dcb243a
temp 04/23/19 [skip ci] simulated default actions, change events corr…
kuceb 17578c6
Merge remote-tracking branch 'origin/issue-311' into issue-311
kuceb e94a6f5
temp 04/24/19 [skip ci] simulated/native handle singlevaluechange inp…
kuceb 145e4fe
add webpack
kuceb cf2a231
fix build proccess
kuceb 76cd436
fix reporter build and test
kuceb cd55666
fix reporter test .css
kuceb 7fe5fbe
use apply(window, ...) since strict mode in webpack
kuceb 7244966
temp 05/13/19 [skip ci] resolver
kuceb b77ac36
temp 05/14/19 [skip ci] webpack w/ root level symlinks
kuceb cad7fe4
run ci
kuceb 09cea7b
minor fixes
kuceb aad6ead
fix link-packages script
kuceb 1576309
hopefully fix mac build
kuceb 8e5de4a
re-add build-prod script in reporter
kuceb 2838223
fix typo in link-packages script
kuceb 32f9c30
Merge branch 'develop' into webpack-runner
kuceb ae68f6b
fix lint errors
kuceb 25cbb3e
fix node-version
kuceb 8a11acf
namespace files in webpack
kuceb f48a04f
bust circle ci cache
kuceb 03c173c
bust circle ci cache 2
kuceb 1e84ca4
remove deps
kuceb 8049ea4
bust circle ci cache 3
kuceb 71827f9
bust circle ci cache (launcher)
kuceb 8b328cd
ok circleci, you win. I will change all the cache keys
kuceb 030f407
update snapshot: not sure why added stack lines
kuceb 0621c9c
add mocha to reporter devDeps
kuceb 556676a
separate build file for reporter
kuceb a2e5680
remove unneeded code
kuceb 52b3f49
node-sass-globbing use relative imports for appveyor
kuceb 42fb24d
add debugging for appveyor failure
kuceb f7a747b
node-sass-globbing force unix paths for windows
kuceb 819f8b4
node-sass-globbing force unix paths for windows 2
kuceb d6f5a15
node-sass-globbing force unix paths for windows in runner
kuceb 4bdeb03
run ci
kuceb bbfa516
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb 6a0b69e
add checksum to packages caches
kuceb ebd37eb
bust circle ci cache (sub packages)
kuceb 756cc6d
Merge branch 'develop' into webpack-runner
kuceb a371737
testing code for appveyor env vars
kuceb 701ed0d
Merge remote-tracking branch 'origin/develop' into fix-appveyor-build…
kuceb be54ae6
fix appveyor env vars for branchname
kuceb bef2b7f
fix binary build script, smoke test catch errors, include pkg mains
kuceb 97c9965
Merge branch 'fix-appveyor-build-script-only-on-develop' into webpack…
kuceb be1858b
build binary in appveyor for this branch
kuceb 130130e
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb be68a88
fix binary unit test, revert mocha upgrade in root, fix e2e specs
kuceb beffd6e
statically replace symlinks at build time, add test, remove proxy pac…
kuceb bec4638
oops, update snapshot
kuceb be85fc5
bump circle packages cache
kuceb bebe19b
fix path.win32 on windows, add test for it
kuceb a56f6e5
Merge branch 'develop' into webpack-runner
kuceb fa9043a
for some reason packages ci cache is not including `rebuild-node-sass…
kuceb d2ad35d
emit during webpack-dev-server watch mode
kuceb 16ff7b1
temp 05/22/19 [skip ci]
kuceb be48969
try revert circle.yml
kuceb ea39c18
Merge branch 'develop' of github.com:cypress-io/cypress into webpack-…
kuceb be125b8
try revert everything
kuceb 31d406d
Revert "try revert everything"
kuceb be40ea2
no circle cache now
kuceb 3ca79ce
Merge branch 'webpack-runner' into issue-311
kuceb cafea7b
remove logging in reporter build
kuceb cafe318
Merge branch develop of github.com:cypress-io/cypress into webpack-ru…
kuceb f5ea47c
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb 88001b9
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb cafedfa
make build scripts DRY
kuceb cafe52b
fix missing fonts, better watch mode
kuceb cafe9e6
use webpack --progress in watch mode
kuceb 69296cf
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb cafedb2
move webpack config files into dedicated package
kuceb cafeab3
build desktop-gui with webpack, use relative scss url()s
kuceb cafe6ac
add timings info, fix configs
kuceb cafe978
enable sourcemaps "eval", fix desktopgui test
kuceb cafe152
try 2: fix desktopgui test
kuceb cafec8c
fix lint
kuceb cafef88
fix snapshot (very minor do not worry)
kuceb 24f7dc5
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb cafefa8
code cleanup
kuceb cafee99
try disable devtool
kuceb cafeb01
remove cypress:// devtool sourceURL mapping to prevent cross-domain o…
kuceb cafedc7
re-enable eval sourcemap in dev and prod
kuceb cafe68e
code cleanup
kuceb cafee13
refactor node-jsdom setup for tests
kuceb 8256a57
re-enable sourceURL protocol, enable crossorigin script on runner to …
kuceb 459ad32
smoke tests for static assets in binary build script, disable sourceU…
kuceb 4481f80
use cross-env for desktop-gui
kuceb 08af40a
desktop-dui: expect development NODE_ENV during build script (as has …
kuceb 55e11ad
fix build script unit test
kuceb 27a14f4
fix build script unit test for real
kuceb c8976a8
fix sourcemaps for dev/prod, add comments, add build static asset tests
kuceb 3bd7b04
add cross-env to runner devDeps
kuceb ee84009
fix unit tests for build binary script
kuceb 60049ea
fix whitespace
kuceb f44fbd9
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb c915774
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb 432e2a6
temp 06/07/19 [skip ci]
kuceb bf076e6
decaffeinate selection.js
kuceb 8a2cb30
support linting typescript
kuceb 5183ceb
temp 06/12/19 [skip ci] fix linting
kuceb 043b9d5
support linting typescript
kuceb b30c14d
use latest version of @typescript-eslint
kuceb 830b287
better eslintrc, eslintignore
kuceb b391d39
lint all the things
kuceb 3e8b093
lint all the things(typescript)
kuceb 9692861
fix lint script in ci
kuceb da90576
fix linting cli/types and coffeescript
kuceb e9dc70a
remove subpackages "lint" scripts
kuceb 41e82cc
remove un-needed dep
kuceb be920fb
rename lint-typescript job to more accurate name
kuceb bb28e91
rename lint-typescript job to more accurate name pt 2
kuceb e9fab04
add postcss autoprefixer + staticAsset tets
kuceb c578fa4
add eslintrc to scripts/unit
kuceb 17ac7dc
tabs -> spaces
kuceb 2c7f1eb
tabs -> spaces
kuceb b27e44e
tabs -> spaces
kuceb 4ea9c0f
Merge branch 'lint-typescript' into issue-311
kuceb 1a8316d
temp 06/13/19 [skip ci]
kuceb 598b187
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb 9fa99f9
Merge branch 'lint-typescript' into webpack-runner-lint-typescript
kuceb 7caaee7
Merge branch 'webpack-runner-lint-typescript' into issue-311
kuceb a63487b
Revert "temp 06/13/19 [skip ci]"
kuceb 1b31869
temp 06/13/19 [skip ci] merge in typescript-lint, webpack runner, spe…
kuceb c3fbc19
fix pre-commit lint hooks
kuceb 7ddc329
fix pre-commit lint hooks
kuceb 098d08f
fix binary/util scripts
kuceb b90f10e
Merge branch 'webpack-runner' into issue-311
kuceb fdc2bc6
fix .prettierignore
kuceb c426994
Merge branch 'lint-typescript' into webpack-runner-lint-typescript
kuceb a5aafff
temp 06/14/19 [skip ci] spec modules
kuceb 4352dc9
fix testStaticAssets in build script
kuceb 7d1396d
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb 250beba
Merge branch 'webpack-runner' into webpack-runner-lint-typescript
kuceb f2199f6
Merge branch 'webpack-runner-lint-typescript' into issue-311
kuceb a4d49b0
fix extension requiring node socket
kuceb 623a49a
Merge branch 'webpack-runner' into webpack-runner-lint-typescript
kuceb 404a7cf
Merge branch 'webpack-runner-lint-typescript' into issue-311
kuceb c4002ab
fix unit-test for binary build script
kuceb 8a6d48b
fix unit test for runner/reporter
kuceb 1e3e773
Merge remote-tracking branch 'origin/develop' into lint-typescript
kuceb 6ab3c78
exclude transpiled .js files from eslint
kuceb 2b4bf8a
Merge remote-tracking branch 'origin/develop' into lint-typescript
kuceb 25383ea
Merge remote-tracking branch 'origin/develop' into webpack-runner
kuceb f34beb7
Merge branch 'lint-typescript' into webpack-runner-lint-typescript
kuceb 6e66663
Merge branch 'webpack-runner-lint-typescript' into issue-311
kuceb 723e256
remove only
kuceb c110121
temp 06/17/19 [skip ci] eslint changes
kuceb e3afb5d
add rule: function-paren-newline:consistent
kuceb d6523ce
Merge branch 'lint-typescript' into issue-311
kuceb 2c35a56
lint files
kuceb 56c4e84
temp 06/17/19 [skip ci] foo
kuceb c5e9bbf
Merge remote-tracking branch 'origin/develop' into lint-typescript
kuceb a3f1b66
temp 06/17/19 [skip ci]
kuceb ebd35f4
remove un-needed eslintignore rules
kuceb 6654f9d
Merge remote-tracking branch 'origin/develop' into lint-typescript
kuceb 9a36c8f
bump pkg version 'eslint-plugin-cypress-dev'
kuceb 6c94290
lint files
kuceb 20d234e
Merge remote-tracking branch 'origin/develop' into lint-typescript
kuceb fcf8cba
Merge branch 'lint-typescript' into webpack-runner-lint-typescript
kuceb 71172a8
Merge branch 'webpack-runner' into webpack-runner-lint-typescript
kuceb cb1411a
Merge branch 'webpack-runner-lint-typescript' into issue-311
kuceb 92c9d36
temp 06/18/19 [skip ci] resposition HEAD
kuceb 6f18c12
foo only
kuceb 307c052
Merge remote-tracking branch 'origin/develop' into issue-311
kuceb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
require('@babel/polyfill') | ||
|
||
window.criRequest = function () {} | ||
const CRI = require('chrome-remote-interface') | ||
|
||
const Promise = require('bluebird') | ||
const debug = require('debug')('cypress:driver') | ||
|
||
let client | ||
|
||
const init = () => { | ||
return Promise.try(() => { | ||
if (client) { | ||
return client | ||
} | ||
// console.log('cy config', Cypress.config()) | ||
const wsUrl = Cypress.config('wsUrl') //'sdf'//window.config.wsUrl | ||
|
||
return CRI({ | ||
target: wsUrl, | ||
local: true, | ||
}) | ||
.then((cri_client) => { | ||
client = cri_client | ||
|
||
}) | ||
.catch((e) => { }) | ||
}) | ||
} | ||
|
||
const mousedown = ($elToClick, coords) => { | ||
// const x = coords.x + (coords.right - coords.left) / 2 | ||
// const y = coords.y + (coords.bottom - coords.top) / 2 | ||
const { x, y } = calculateTrueCoords(coords, $elToClick) | ||
return client.send('Input.dispatchMouseEvent', { | ||
x, | ||
y, | ||
type: 'mouseMoved', | ||
}) | ||
|
||
.then(() => { | ||
return client.send('Input.dispatchMouseEvent', { | ||
x: coords.x, | ||
y: coords.y, | ||
type: 'mousePressed', | ||
button: 'left', | ||
clickCount: 1, | ||
}) | ||
}) | ||
} | ||
|
||
const mouseup = ($elToClick, coords) => { | ||
const { x, y } = calculateTrueCoords(coords, $elToClick) | ||
return client.send('Input.dispatchMouseEvent', { | ||
x, | ||
y, | ||
type: 'mouseReleased', | ||
button: 'left', | ||
clickCount: 1, | ||
}) | ||
} | ||
|
||
module.exports = { | ||
mousedown, | ||
mouseup, | ||
} | ||
|
||
|
||
const calculateTrueCoords = (coords, $elToClick) => { | ||
let x = coords.x | ||
let y = coords.y | ||
let curWindow = $elToClick.ownerDocument.defaultView | ||
while (curWindow.frameElement) { | ||
const frame = curWindow.frameElement | ||
const rect = frame.getBoundingClientRect() | ||
x += rect.x | ||
y += rect.y | ||
curWindow = curWindow.parent | ||
} | ||
return { x, y } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y'all need some linters running on precommit hooks, debugger should never been committed. 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a WIP, so i use
--no-verify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should bother reviewing WIP PR's, isn't that the point of WIP? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @bkucera if we indicate a WIP on a PR it should be ignored and not be reviewed.