cypress-io / cypress-example-kitchensink Goto Github PK
View Code? Open in Web Editor NEWThis is an example app used to showcase Cypress.io testing.
Home Page: https://example.cypress.io/
License: MIT License
This is an example app used to showcase Cypress.io testing.
Home Page: https://example.cypress.io/
License: MIT License
Need an example for cypress-io/cypress#2305
There are several getComment aliases in the tests (network_requests.spec.js, waiting.spec.js and files.spec.js). Whenever the mentioned tests are run individually, they pass. Whenever all the tests are run together, the mentioned tests fail with the following error: "Timed out retrying: cy.wait() timed out waiting 5000ms for the 1st request to the route: 'getComment'. No request ever occurred."
https://example.cypress.io/commands/local-storage has a camel-cased href causing a 404
Just the simplest e2e test run
For convenience
We already have external GitLab CI connected to this project and need to
Creating cache gitlab-fixes-105...
WARNING: /root/.npm: no matching files
WARNING: /root/.cache: no matching files
Uploading cache.zip to http://runners-cache-3-internal.gitlab.com:444/runner/project/7942124/gitlab-fixes-105
Created cache
Job succeeded
To trigger Buildkite CI on commits
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing 🚨 |
---|---|
Dependency | eslint |
Current Version | 4.18.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 12 commits.
22ff6f3
4.18.2
817b84b
Build: changelog update for 4.18.2
6b71fd0
Fix: [email protected], because 4.0.3 needs "ajv": "^6.0.1" (#10022)
3c697de
Chore: fix incorrect comment about linter.verify return value (#10030)
9df8653
Chore: refactor parser-loading out of linter.verify (#10028)
f6901d0
Fix: remove catastrophic backtracking vulnerability (fixes #10002) (#10019)
e4f52ce
Chore: Simplify dataflow in linter.verify (#10020)
33177cd
Chore: make library files non-executable (#10021)
558ccba
Chore: refactor directive comment processing (#10007)
18e15d9
Chore: avoid useless catch clauses that just rethrow errors (#10010)
a1c3759
Chore: refactor populating configs with defaults in linter (#10006)
aea07dc
Fix: Make max-len ignoreStrings ignore JSXText (fixes #9954) (#9985)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
to keep dependencies up to date
These links are broken:
https://example.cypress.io/commands/fixtures
https://example.cypress.io/commands/readfile
https://example.cypress.io/commands/writefile
on main page: https://example.cypress.io/
To test Mac binary
to avoid parallel jobs both trying to start a server on the same port, saw an error message once
[tester A] + npm run test:ci:record:parallel
[tester A]
[tester A] > [email protected] test:ci:record:parallel /var/jenkins_home/workspace/cypress-example-kitchensink
[tester A] > run-p --race start:ci e2e:record:parallel
[tester A]
[tester B] [cypress-example-kitchensink] Running shell script
[tester B] + npm run test:ci:record:parallel
[tester B]
[tester B] > [email protected] test:ci:record:parallel /var/jenkins_home/workspace/cypress-example-kitchensink
[tester B] > run-p --race start:ci e2e:record:parallel
[tester B]
[tester A]
[tester A] > [email protected] start:ci /var/jenkins_home/workspace/cypress-example-kitchensink
[tester A] > http-server app -c-1 --silent
[tester A]
[tester A]
[tester A] > [email protected] e2e:record:parallel /var/jenkins_home/workspace/cypress-example-kitchensink
[tester A] > cypress run --record --parallel
[tester A]
[tester B]
[tester B] > [email protected] start:ci /var/jenkins_home/workspace/cypress-example-kitchensink
[tester B] > http-server app -c-1 --silent
[tester B]
[tester B]
[tester B] > [email protected] e2e:record:parallel /var/jenkins_home/workspace/cypress-example-kitchensink
[tester B] > cypress run --record --parallel
[tester B]
[tester B] events.js:167
[tester B] throw er; // Unhandled 'error' event
[tester B] ^
[tester B]
[tester B] Error: listen EADDRINUSE 0.0.0.0:8080
[tester B] at Server.setupListenHandle [as _listen2] (net.js:1330:14)
[tester B] at listenInCluster (net.js:1378:12)
[tester B] at doListen (net.js:1491:7)
[tester B] at process._tickCallback (internal/process/next_tick.js:174:19)
[tester B] at Function.Module.runMain (internal/modules/cjs/loader.js:721:11)
[tester B] at startup (internal/bootstrap/node.js:228:19)
[tester B] at bootstrapNodeJSCore (internal/bootstrap/node.js:575:3)
[tester B] Emitted 'error' event at:
[tester B] at emitErrorNT (net.js:1357:8)
[tester B] at process._tickCallback (internal/process/next_tick.js:174:19)
[tester B] [... lines matching original stack trace ...]
[tester B] at bootstrapNodeJSCore (internal/bootstrap/node.js:575:3)
[tester B] npm ERR! code ELIFECYCLE
[tester B] npm ERR! errno 1
[tester B] npm ERR! [email protected] start:ci: `http-server app -c-1 --silent`
[tester B] npm ERR! Exit status 1
[tester B] npm ERR!
[tester B] npm ERR! Failed at the [email protected] start:ci script.
https://github.com/typicode/jsonplaceholder
Because sometimes it goes down, and a lot of our CI examples fail
👋
i'm doing research on frontend testing for the company i work for and i came across Cypress.
i tried to run the kitchen sink testing suite to see it in action, but since it relies on port 8080
being free it broke due to a pre-existing webserver.
as a first-timer to the project i was uncertain if there was a port i could set anywhere to have it listen to another webserver, but after some digging it turns out you've just hardcoded the request URLs in the specs.
my suggestion would be
"baseUrl": "http://127.0.0.1:8080/"
in cypress.json
baseUrl
should match the url from npm run start
's outputStarting up http-server, serving app
Available on:
http://127.0.0.1:8080 <--- (this was http://127.0.0.1:8083 in my case)
~cblgh
Branch | Build failing 🚨 |
---|---|
Dependency | eslint |
Current Version | 4.11.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
sort-vars
(#9496) (Trevin Hofmann)beforeStatementContinuationChars
to semi (fixes #9521) (#9594) (Toru Nagashima)globals
to 11.0.1 (fixes #9614) (#9632) (Toru Nagashima)The new version differs by 15 commits.
f4a65c6
4.12.0
1cd1627
Build: changelog update for 4.12.0
76dab18
Upgrade: doctrine@^2.0.2 (#9656)
28c9c8e
New: add a Linter#defineParser function (#9321)
5619910
Update: Add autofix for sort-vars
(#9496)
71eedbf
Update: add beforeStatementContinuationChars
to semi (fixes #9521) (#9594)
4118f14
New: Adds implicit-arrow-linebreak rule (refs #9510) (#9629)
208fb0f
Fix: Use XML 1.1 on XML formatters (fixes #9607) (#9608)
6e04f14
Upgrade: globals
to 11.0.1 (fixes #9614) (#9632)
e13d439
Fix: space-in-parens crash (#9655)
92171cc
Docs: Updating migration guide for single-line disable (#9385)
f39ffe7
Docs: remove extra punctuation from readme (#9640)
a015234
Fix: prefer-destructuring false positive on "super" (fixes #9625) (#9626)
0cf081e
Update: add importNames option to no-restricted-imports (#9506)
332c214
Docs: Add @platinumazure to TSC (#9618)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Should we advise users to set CYPRESS_RECORD_KEY
environment variable as secure, and how to pass it to Linux agent?
Followed steps as outlined in https://github.com/cypress-io/cypress-example-kitchensink#1-fork-this-repo
Opened new terminal window to run npm run cy:open
to open up cypress test runner, but encounter following error when attempting to run any of the tests
$ npm run cy:open
> [email protected] cy:open /home/saiyaman/gitrepos/cloned/cypress-example-kitchensink
> cypress open
GET /__/ 200 145.607 ms - -
GET /__cypress/runner/cypress_runner.css 200 382.874 ms - -
GET /__cypress/runner/cypress_runner.js 200 1099.415 ms - -
GET /__cypress/static/favicon.ico 200 6.336 ms - -
GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 200 2.492 ms - 77160
GET /__cypress/iframes/integration/examples/actions.spec.js 200 15.477 ms - 745
{ Error: watch /home/saiyaman/gitrepos/cloned/cypress-example-kitchensink/package.json ENOSPC
at exports._errnoException (util.js:1024:11)
at FSWatcher.start (fs.js:1394:19)
at Object.fs.watch (fs.js:1420:11)
at createFsWatchInstance (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher.<anonymous> (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
at /home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
code: 'ENOSPC',
errno: 'ENOSPC',
syscall: 'watch /home/saiyaman/gitrepos/cloned/cypress-example-kitchensink/package.json',
filename: '/home/saiyaman/gitrepos/cloned/cypress-example-kitchensink/package.json' }
Error: watch /home/saiyaman/gitrepos/cloned/cypress-example-kitchensink/package.json ENOSPC
at exports._errnoException (util.js:1024:11)
at FSWatcher.start (fs.js:1394:19)
at Object.fs.watch (fs.js:1420:11)
at createFsWatchInstance (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher.<anonymous> (/home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
at /home/saiyaman/.cache/Cypress/3.1.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
To make sure we are not releasing Cypress with types that are not true representation of real world tests.
Related to cypress-io/cypress#1881
When the login process started the auth form in a separate tab, like oAuth2, there is no way to get hold of either collection of windows or tabs in the current library.
cy.window() doesn't get me to the form where username/password elements are located.
Seems Heroku CI sets random PORT
number and gives us an environment variable to use, and we cannot just force 8080 as usual.
PORT
from environment variable when startingPORT
variable, and not use hardcoded localhost:8080
and this is hard parthttps://github.com/cypress-io/cypress-example-kitchensink/blob/master/circle.yml#L16
there should be a fallback cache key, something like:
- restore_cache:
keys:
- cache-{{ .Branch }}-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- cache-
Should not use environment variables, instead should use commit-build-message to run with given NPM package and binary URL from the commit message.
otherwise does not test the new version
Other branches are fine - but master
is missing on https://semaphoreci.com/cypress-io/cypress-example-kitchensink
which breaks our badge https://semaphoreci.com/api/v1/cypress-io/cypress-example-kitchensink/branches/master/badge.svg
When running on Azure CI public pipelines, I do not see any way to cache NPM dependencies or Cypress binary between the runs. This lead to 3-5 minutes of install time per run.
~/.npm
and ~/.cache
folders somehowSeems some users are struggling to correctly assert selected option. For example in
<select class=" undefined " name="country">
<option value="GB">United Kingdom</option>
<option value="ES">Spain</option>
<option value="FR">France</option>
<option value="GB">United Kingdom</option>
cy.get('form')
.find('selector').select('United Kingdom').wait(1000)
.should('have.value', 'United Kingdom')
Which does not need wait(1000)
and the value should be "GB"
We should put the example under "select in actions" https://example.cypress.io/commands/actions
Our examples became quite complex because they show load balancing. This might be scary for people just looking for simple CI config
in the list of CI providers expand the table and include a link to the config file and you could show like… With Parallelization, Without Parallelization
two different links.
gleb [10:07 PM]
like in https://docs.cypress.io/guides/guides/continuous-integration.html#What-is-supported ?
brian-mann [10:07 PM]
yes!
gleb [10:07 PM]
sure, I could put these config examples into something like “basic”
brian-mann [10:07 PM]
yup add a basic
folder and add a readme in there
When two Jenkins parallel jobs run they use same workspace folder, meaning when second worker tries to trash assets (screenshots, videos), it might delete what the first one has written.
[tester B] > [email protected] e2e:record:parallel /var/jenkins_home/workspace/cypress-example-kitchensink
[tester B] > cypress run --record --parallel
[tester B]
[tester B] Warning: We failed to trash the existing run results.
[tester B]
[tester B] This error will not alter the exit code.
[tester B]
[tester B] Error: ENOENT: no such file or directory, open '/var/jenkins_home/workspace/cypress-example-kitchensink/cypress/videos/examples/viewport.spec.js.mp4'
With basic and parallel runs
The example_spec.js file is too long.
Could we cut it into separate files, each demonstrate a specific functionality like request_spec.js etc?
Failing on run, because Cypress binary is not installed
> [email protected] e2e:record /home/rof/src/github.com/cypress-io/cypress-example-kitchensink
> cypress run --record
cypress:cli cli starts with arguments ["/home/rof/.nvm/versions/node/v6.5.0/bin/node","/home/rof/src/github.com/cypress-io/cypress-example-kitchensink/node_modules/.bin/cypress","run","--record"] +0ms
cypress:cli NODE_OPTIONS is not set +0ms
cypress:cli program parsing arguments +3ms
cypress:cli running Cypress +2ms
cypress:cli parsed cli options { record: true } +85ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +1ms
cypress:cli checking if executable exists /home/rof/.cache/Cypress/3.0.2/Cypress/Cypress +4ms
The cypress npm package is installed, but the Cypress binary is missing.
We expected the binary to be installed here: /home/rof/.cache/Cypress/3.0.2/Cypress/Cypress
Reasons it may be missing:
- You're caching 'node_modules' but are not caching this path: /home/rof/.cache/Cypress
- You ran 'npm install' at an earlier build step but did not persist: /home/rof/.cache/Cypress
Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.
Alternatively, you can run 'cypress install' to download the binary again.
https://on.cypress.io/not-installed-ci-error
----------
Platform: linux (Ubuntu Linux - 14.04)
Cypress Version: 3.0.2
Codeship basic has problems with cy.exec
and Codeship Pro has great parallelization support
We run all tests but without recording
Explain what this project is, how to setup, run server, install cypress, run in CI, etc.
As example
Move the 2 external CSS resources to be served by localhost.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.