e2e-testing

Protractor: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined

拈花ヽ惹草 提交于 2020-05-14 18:42:05
问题 I am trying to write some end to end tests and waned to use async and await. configuration file exports.config = { framework: 'jasmine', seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['spec.js'], SELENIUM_PROMISE_MANAGER: false, getPageTimeout: 10000, multiCapabilities: [ { browserName: 'firefox' }, { browserName: 'chrome' } ] } spec file describe('home-view', function(){ beforeEach(async function(){ await browser.get('http://localhost:49335/index.html#!/home'); }); it('sorted by

Getting Header overflow error while using testcafe

随声附和 提交于 2020-04-30 07:03:07
问题 Using testcafe for automated testing but i am getting the following error while perfoming a particular action(click of a button) Failed to perform a request to the resource at "https://www.example.com" because of an error. Error: Parse Error: Header overflow The application is working fine when we try to do the same action manually in the browser.But throws this error while doing it using testcafe. Tried using lower version of node also it doesn't help.can someone help with this? 来源: https:/

TestCafé + React JSX error (unexpected Token)

雨燕双飞 提交于 2020-04-17 22:10:46
问题 I am new to test café, and am seeing some errors in my React project. All tests seem to be fine, except whenever it hits JSX code in a helper method, it gives a SyntaxError. SyntaxError: .../_helpers.js: Unexpected token (779:29) 777 | 778 | export const customLegend = (data) => { > 779 | if (isEmpty(data)) return (<div />); SyntaxError: .../_helpers.js: Unexpected token (710:4) 708 | } = props || {}; 709 | return ( > 710 | <div | ^ 711 | transform={`translate(${x},${y})`} I have not found a

TestCafé + React JSX error (unexpected Token)

谁说胖子不能爱 提交于 2020-04-17 22:07:05
问题 I am new to test café, and am seeing some errors in my React project. All tests seem to be fine, except whenever it hits JSX code in a helper method, it gives a SyntaxError. SyntaxError: .../_helpers.js: Unexpected token (779:29) 777 | 778 | export const customLegend = (data) => { > 779 | if (isEmpty(data)) return (<div />); SyntaxError: .../_helpers.js: Unexpected token (710:4) 708 | } = props || {}; 709 | return ( > 710 | <div | ^ 711 | transform={`translate(${x},${y})`} I have not found a

cy.url() and/or cy.location('href') does not return a string

狂风中的少年 提交于 2020-04-15 06:50:52
问题 I have an editor page. When I add any content and click the "Save" button my URL will change, adding a random id in the URL. I want to check if my ID's are changing every time when I click the "Save button". I save the URL result in variable and want to check it, I do it like this: const currentURL = cy.url(); cy.get('.editor-toolbar-actions-save').click(); cy.url().should('not.eq', currentURL); But my currentURL variable's type is not string: expected http://localhost:8080/editor/37b44d4d

cy.url() and/or cy.location('href') does not return a string

柔情痞子 提交于 2020-04-15 06:47:10
问题 I have an editor page. When I add any content and click the "Save" button my URL will change, adding a random id in the URL. I want to check if my ID's are changing every time when I click the "Save button". I save the URL result in variable and want to check it, I do it like this: const currentURL = cy.url(); cy.get('.editor-toolbar-actions-save').click(); cy.url().should('not.eq', currentURL); But my currentURL variable's type is not string: expected http://localhost:8080/editor/37b44d4d

How to test leaflet based maps using testcafe?

我们两清 提交于 2020-04-15 03:55:35
问题 We are building a series of tests using TestCafe. How do we test if a point or path in a leaflet control is rendered correctly? To be more specific we are trying to test the lat-lon data of a circle marker in the map. But, we do not have any leaflet map/marker object available in the scope of testcafe scripts. References: Unit testing leaflet maps 回答1: I created a simple example of an assertion for a path element in a leaflet control on the getting started demo page https://leafletjs.com

Continue test case on assert

我只是一个虾纸丫 提交于 2020-04-13 17:17:27
问题 last time i am using testcafe i have realized about function which missing me in this great framework. This function is something like "continue executing the rest of particular test despite of fact that assertions appears" To be more precise, I describe the reason i missing something like such function: Let say you are testing web application like web form where you are entering date for contracts. Such contract forms contains a lot of input boxes, dropdown menu, checkboxes etc. First simple