{ "info": { "author": "Timo Stollenwerk & David Rodriguez Fuentes", "author_email": "stollenwerk@kitconcept.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Robot Framework", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython" ], "description": "==============================================================================\nA Robot Framework library for React.\n==============================================================================\n\n.. image:: https://travis-ci.org/kitconcept/robotframework-react.svg?branch=master\n :target: https://travis-ci.org/kitconcept/robotframework-react\n\n.. image:: https://img.shields.io/pypi/status/robotframework-react.svg\n :target: https://pypi.python.org/pypi/robotframework-react/\n :alt: Egg Status\n\n.. image:: https://img.shields.io/pypi/v/robotframework-react.svg\n :target: https://pypi.python.org/pypi/robotframework-react/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/l/robotframework-react.svg\n :target: https://pypi.python.org/pypi/robotframework-react/\n :alt: License\n\n|\n\n.. image:: https://raw.githubusercontent.com/kitconcept/robotframework-react/master/kitconcept.png\n :alt: kitconcept\n :target: https://kitconcept.com/\n\n\nIntroduction\n------------\n\nReactLibrary is a Robot Framework library for React. It currently provides a single 'Wait for React' keyword that makes sure your React application has been fully loaded and can be interacted with.\n\n\nInstallation\n------------\n\nInstall robotframework-react with pip::\n\n $ pip install robotframework-react\n\n\nUsage\n-----\n\nIn order to write your first robot test, make sure that you include SeleniumLibrary and ReactLibrary. Create a test.robot file with the following content::\n\n *** Settings ***\n\n Library SeleniumLibrary timeout=10 implicit_wait=0\n Library React Library\n Suite Setup Open browser https://airbnb.com chrome\n Suite Teardown Close browser\n\n\n *** Test Cases ***\n\n Scenario: Wait for react\n Go To https://airbnb.com\n Wait for react\n Page Should Contain Airbnb Book unique homes\n\n Scenario: Wait for react with reducer\n Go To https://airbnb.com\n Wait for react reducer=headlines\n Page Should Contain Airbnb Book unique homes\n\n\nKeywords\n--------\n\nrobotframework-react currently only provides a single keyword \"Wait for React\".\nThe keyword makes sure the React app is fully loaded.\n\n\nPlain React Example\n^^^^^^^^^^^^^^^^^^^\n\nWhen used without any parameter, \"Wait for react\" expects the React app to\nset a global variable named \"window.appStatus\" to true when the app is fully\nloaded.\n\nTo make this work with your React app, add a global window.appStatus to your\nindex.js::\n\n window.appStatus = false\n const updateStatus = () => {\n window.appStatus = true\n }\n\n ReactDOM.render(, document.getElementById('root'));\n\nAdd an \"isLoading\" state to your App and update it on componentDidMount and componentDidUpdate (App.js)::\n\n class App extends Component {\n state = {\n isLoading: true,\n }\n\n componentDidMount() {\n wait(2000).then(() => {\n this.setState({ isLoading: false })\n })\n }\n\n componentDidUpdate() {\n if (!this.state.isLoading) {\n this.props.updateStatus()\n }\n }\n ...\n }\n\nYou can find a full working example here: https://github.com/kitconcept/robotframework-react/tree/master/tests/create-react-app\n\nRobot Test: https://github.com/kitconcept/robotframework-react/blob/master/tests/create-react-app/test.robot\n\nRedux\n^^^^^\n\nWhen working with Redux, you have to pass the name of the reducer to the 'Wait for React' keyword::\n\n Wait for react reducer=headlines\n\nThe reducer should implement an \"isFetching\" attribute in the Redux state::\n\n const initialState = {\n isFetching: false,\n ...\n };\n\nInstead of adding \"isFetching\", you can also name the attribute whatever you want, and pass in the \"stateName\" parameter to the 'Wait for react' keyboard::\n\n Wait for react reducer=headlines stateName=isLoading\n\nYou can find a full working example here:\n\nhttps://github.com/kitconcept/robotframework-react/tree/master/tests/create-react-app-with-redux\n\nRobot Test with Redux:\n\nhttps://github.com/kitconcept/robotframework-react/blob/master/tests/create-react-app-with-redux/test.robot\n\n\n\n1.0.0a2 (2018-07-10)\n--------------------\n\n- Switch from robotframework-selenium2library to robotframework-seleniumlibrary.\n [timo]\n\n- Add a parameter called \"stateName\" to allow configurable attribute name so \"isFetching\" is not required for Redux functionality \n [bxie1]\n\n1.0.0a1 (2018-03-08)\n--------------------\n\n- Initial release.\n [timo, davidrf]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://kitconcept.com", "keywords": "robotframework react javascript", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "robotframework-react", "package_url": "https://pypi.org/project/robotframework-react/", "platform": "", "project_url": "https://pypi.org/project/robotframework-react/", "project_urls": { "Homepage": "https://kitconcept.com" }, "release_url": "https://pypi.org/project/robotframework-react/1.0.0a2/", "requires_dist": null, "requires_python": "", "summary": "A Robot Framework library for React.", "version": "1.0.0a2" }, "last_serial": 4048351, "releases": { "1.0.0a1": [ { "comment_text": "", "digests": { "md5": "15ea1f50514d21cc65979276f4bccfef", "sha256": "9dca3dca77cb40138a293149673c5b3c690b25c261bdad25dd692099278296da" }, "downloads": -1, "filename": "robotframework-react-1.0.0a1.tar.gz", "has_sig": false, "md5_digest": "15ea1f50514d21cc65979276f4bccfef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54434, "upload_time": "2018-03-08T08:25:03", "url": "https://files.pythonhosted.org/packages/8a/8b/b8b46b4722478d19e3597f6917d72fb45980b07e19b5407ffce90a9dd5a2/robotframework-react-1.0.0a1.tar.gz" } ], "1.0.0a2": [ { "comment_text": "", "digests": { "md5": "73fa2d7093eed1226004e28615795af0", "sha256": "4c3010f3368eda3d10fda96598d3b04f7acce25c543a195a10c45b04fdcc9ea4" }, "downloads": -1, "filename": "robotframework-react-1.0.0a2.tar.gz", "has_sig": false, "md5_digest": "73fa2d7093eed1226004e28615795af0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54798, "upload_time": "2018-07-10T19:43:10", "url": "https://files.pythonhosted.org/packages/c0/4b/dea67e396e693fce04d908eedd695df16a14c4acda1bda3c2fb5fe6d0616/robotframework-react-1.0.0a2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "73fa2d7093eed1226004e28615795af0", "sha256": "4c3010f3368eda3d10fda96598d3b04f7acce25c543a195a10c45b04fdcc9ea4" }, "downloads": -1, "filename": "robotframework-react-1.0.0a2.tar.gz", "has_sig": false, "md5_digest": "73fa2d7093eed1226004e28615795af0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54798, "upload_time": "2018-07-10T19:43:10", "url": "https://files.pythonhosted.org/packages/c0/4b/dea67e396e693fce04d908eedd695df16a14c4acda1bda3c2fb5fe6d0616/robotframework-react-1.0.0a2.tar.gz" } ] }