automated-tests

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

Selenium (Python) >> selenium.common.exceptions.NoSuchFrameException:

我的梦境 提交于 2020-04-17 21:33:52
问题 I've been trying to enter to an iframe and write text in a search bar ( tag) in Safari: I can't post the html because it's huge and it isn't mine but this is the iframe code: <iframe frameborder="0" id="contentIFrame0" name="contentIFrame0" title="Área de contenido" style="border: 0px none; overflow: hidden; position: absolute; left: 0px; right: 0px; height: 100%; width: 100%; visibility: visible; display: block;"> (...Content of the iframe...) </iframe> Here is python code: wait.until(ec

Selenium (Python) >> selenium.common.exceptions.NoSuchFrameException:

风格不统一 提交于 2020-04-17 21:32:05
问题 I've been trying to enter to an iframe and write text in a search bar ( tag) in Safari: I can't post the html because it's huge and it isn't mine but this is the iframe code: <iframe frameborder="0" id="contentIFrame0" name="contentIFrame0" title="Área de contenido" style="border: 0px none; overflow: hidden; position: absolute; left: 0px; right: 0px; height: 100%; width: 100%; visibility: visible; display: block;"> (...Content of the iframe...) </iframe> Here is python code: wait.until(ec

Selenium (Python) >> selenium.common.exceptions.NoSuchFrameException:

依然范特西╮ 提交于 2020-04-17 21:31:09
问题 I've been trying to enter to an iframe and write text in a search bar ( tag) in Safari: I can't post the html because it's huge and it isn't mine but this is the iframe code: <iframe frameborder="0" id="contentIFrame0" name="contentIFrame0" title="Área de contenido" style="border: 0px none; overflow: hidden; position: absolute; left: 0px; right: 0px; height: 100%; width: 100%; visibility: visible; display: block;"> (...Content of the iframe...) </iframe> Here is python code: wait.until(ec

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