cypress

Error: Set the experimentalDecorators option to remove this warning

风流意气都作罢 提交于 2019-12-24 13:44:13
问题 I'm using Cypress version 3.3.1. I'm getting the following error: Error: "TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." PS: I've set "experimentalDecorators": true in tsconfig.json . Tried the following but it didn't work: https://github.com/cypress-io/eslint-plugin-dev/issues/4 Code where the error is being reported: @observable public someVar: dataType; 回答1: I created

cypress throwing Uncaught TypeError: Illegal invocation appears to be false positive

不问归期 提交于 2019-12-24 09:13:46
问题 In a rails (5.1.6) project, when a Cypress (3.1.0) test suite clicks a Logout link, an "Uncaught TypeError: Illegal invocation" error is thrown. The output goes on to explain that "This error originated from your application code, not from Cypress." Tracking my local server logs when the click takes place and doing the same in the chrome javascript console, I can find no errors of any kind being thrown. Clicking the Logout button when the app runs in development mode produces no error. As a

How can we setup Cypress for IE and Edge?

╄→гoц情女王★ 提交于 2019-12-24 07:26:01
问题 I need to use Cypress for testing angular and react application on Internet Explorer and Microsoft edge. I have gone through some links which mentions that Cypress supports only Chrome, Chromium and Electron. Is it true ? if not the how can i use it for testing IE and Edge.? 回答1: As per the documentation Canary, Chrome, Chromium and Electron are supported. Cypress supported browsers Which means you cannot make a test with IE or present Edge browser. But you can try to make a test with new MS

How to group together certain tests or files when doing a run in Cypress?

混江龙づ霸主 提交于 2019-12-24 05:56:16
问题 I am currently running Cypress and I have folders inside of it, where I have tests located for different applications. I have a folder entitled "smhw-qa" which contains sub-folders and tests files for this specific application. This directory apps will also include other applications too in future. What I wish to do In order to avoid having to run every test for a run, I wish to only run this specific folder. The location of the folder is as such: 'cypress/integration/apps/smhw-qa' Over time,

How do I fix console log encoding issues on Azure CI?

时光总嘲笑我的痴心妄想 提交于 2019-12-24 03:44:10
问题 I'm getting this on Azure CI when running Cypress in a docker container in a release pipeline. I'm guessing it could be because of some setting in Cypress, docker, NodeJS, or the CI itself. ![ ]1 I tried the NO_COLOR=1 Cypress option in the pipeline, but it didn't seem to have an effect. 回答1: The environment variables set in the pipeline will not be active inside the Docker container. The Docker container has its own set of environment variables. I believe you will be able to resolve your

verify loading indicator shows with cypress

三世轮回 提交于 2019-12-24 01:38:15
问题 I have the following spec: context('Contact update', () => { it.only('Can update contact', () => { const address = 'new address 123' const cardId = 'c2card-38AF429999C93B5DC844D86381734E62' cy.viewport('macbook-15') cy.authVisit('/contact/list') cy.getByTestId('open-doc-Aaron Dolney-0').click() cy.get('[name="physicaladdress"').type(`{selectall}{backspace}${address}`) cy.getByTestId(cardId, 'save-button').click() cy.getByTestId(cardId, 'loading') cy.get('[name="physicaladdress"').should('have

Cypress Custom TypeScript Command is not a Function

烈酒焚心 提交于 2019-12-24 00:18:42
问题 I am implementing a custom Cypress in TypeScript: // support/commands.js const login = () => { console.log('Logging in...'); }; Cypress.Commands.add('login', login); declare namespace Cypress { interface Chainable { login: typeof login; } } I try to call it using: describe('Login Scenario', () => { it('should allow a user to login', () => { cy.visit('/'); cy.login(); }); }); Yet, it seems the command is not set up: TypeError: cy.login is not a function If I write the command in pure

Multipart formdata POST request just doesn't work in Cypress for me

爷,独闯天下 提交于 2019-12-23 19:03:07
问题 Nothing works for me. If I use cy.request(), I'm unable to send formdata with it which contains a text and an image. So I've to go via XHR route. So, in my command.js I've used the following code to create a command: - Cypress.Commands.add("formrequest", (method, url, formData, done) => { cy.window().then(win => { return new Promise((resolve, reject) => { const xhr = new XMLHttpRequest(); xhr.open(method, url, false); xhr.setRequestHeader("accept", "application/json"); xhr.setRequestHeader(

mocking server for SSR react app e2e tests with cypress.io

巧了我就是萌 提交于 2019-12-23 01:04:20
问题 I'm building a single page web application (SPA) with server side rendering (SSR). We have a node backend API which is called both from the node server during SSR and from the browser after initial rendering. I want to write e2e tests that configures API responses (like with nock ) and work both with browser calls and SSR server calls. some pseudo-code : it('loads some page (SSR mode)', () => { mockAPI.response('/some-path', {text: "some text"}); // here i configure the mock server response

Check outgoing browser network calls using Cypress.io

爷,独闯天下 提交于 2019-12-22 10:28:20
问题 On our site, we have Omniture calls that are fired when someone clicks on a link or takes some action. In Chrome DevTools in the network tab, you can see the network request being fired. Is there a way for Cypress.io to capture outgoing network requests, so we can inspect/parse the URLs? The equivalent to this would be something like Browsermob proxy for webdriver set ups. I want to use Cypress.io to tell it to click the link, but then I want to check the outgoing network request by the