UNPKG

cucumber-protractor

Version:

POM CukeTractor - Bootstrap your cucumber tests with cucumber, protractor and a structured way of creating page objects and component objects

50 lines (45 loc) 1.33 kB
import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter as Router } from "react-router-dom"; import './index.css'; import { Route, Switch } from 'react-router-dom'; import asyncComponent from './AsyncComponent'; const AsyncHomePage = asyncComponent(() => import('./HomePage')); const AsyncOtherPage = asyncComponent(() => import('./OtherPage')); const AsyncWebComponentsPage = asyncComponent(() => import('./WebComponentsPage')); const AsyncSimplePage = asyncComponent(() => import('./SimplePage')); const Routes = ({ childProps }) => <Switch> <Route path="/" exact component={AsyncHomePage} props={childProps} /> <Route path="/other-page" exact component={AsyncOtherPage} props={childProps} /> <Route path="/simple-page" exact component={AsyncSimplePage} props={childProps} /> <Route path="/web-components" exact component={AsyncWebComponentsPage} props={childProps} /> {/* another-simple-page is another route to tests a page object with a path */} <Route path="/another-simple-page" exact component={AsyncSimplePage} props={childProps} /> </Switch> ReactDOM.render(<Router><Routes /></Router>, document.getElementById('root'));