mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-31 02:26:50 +10:00
Add tests to new Pages
This commit is contained in:
parent
0f9da68d35
commit
17a96b4722
39 changed files with 3083 additions and 32 deletions
|
|
@ -23,13 +23,48 @@ describe('Application', () => {
|
|||
|
||||
it('renders correct routes in the server', () => {
|
||||
const urlTitles = {
|
||||
'/': 'Index page',
|
||||
'/search': 'Search page',
|
||||
'/': 'Landing page',
|
||||
'/s': 'Search page',
|
||||
'/l/1234': 'Listing page with listing id: #1234',
|
||||
'/u/1234': 'Profile page with display name: 1234',
|
||||
'/checkout/1234': 'Checkout page: 1234',
|
||||
'/login': 'Authentication page: login tab',
|
||||
'/signup': 'Authentication page: signup tab',
|
||||
'/password/forgotten': 'Request new password',
|
||||
'/password/change': 'Type new password',
|
||||
'/this-url-should-not-be-found': 'Page not found',
|
||||
};
|
||||
forEach(urlTitles, (title, url) => {
|
||||
const body = render(url, createServerRenderContext());
|
||||
const context = createServerRenderContext();
|
||||
const body = render(url, context);
|
||||
expect(body.includes(`>${title}</h1>`)).toEqual(true);
|
||||
});
|
||||
|
||||
const urlRedirects = {
|
||||
'/inbox': '/login',
|
||||
'/orders': '/login',
|
||||
'/sales': '/login',
|
||||
'/conversation/1234': '/login',
|
||||
'/order/1234': '/login',
|
||||
'/order/1234/discussion': '/login',
|
||||
'/order/1234/details': '/login',
|
||||
'/sale/1234': '/login',
|
||||
'/sale/1234/discussion': '/login',
|
||||
'/sale/1234/details': '/login',
|
||||
'/listings': '/login',
|
||||
'/account': '/login',
|
||||
'/account/contact-details': '/login',
|
||||
'/account/notifications': '/login',
|
||||
'/account/payment-methods': '/login',
|
||||
'/account/payout-preferences': '/login',
|
||||
'/account/security': '/login',
|
||||
};
|
||||
forEach(urlRedirects, (redirectPath, url) => {
|
||||
const context = createServerRenderContext();
|
||||
const body = render(url, context);
|
||||
const result = context.getResult();
|
||||
expect(result.redirect.pathname).toEqual(redirectPath);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
16
src/containers/AuthenticationPage/AuthenticationPage.test.js
Normal file
16
src/containers/AuthenticationPage/AuthenticationPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import AuthenticationPage from './AuthenticationPage';
|
||||
|
||||
describe('AuthenticationPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<AuthenticationPage location={{ state: { from: '/protected' } }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
exports[`AuthenticationPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Authentication page: undefined tab
|
||||
</h1>
|
||||
<p>
|
||||
You must log in to view the page at
|
||||
<code />
|
||||
</p>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign up
|
||||
</button>
|
||||
<p>
|
||||
or
|
||||
<a
|
||||
className=""
|
||||
href="/login"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Log in
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/CheckoutPage/CheckoutPage.test.js
Normal file
16
src/containers/CheckoutPage/CheckoutPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import CheckoutPage from './CheckoutPage';
|
||||
|
||||
describe('CheckoutPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<CheckoutPage params={{ displayName: 'my-shop' }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
exports[`CheckoutPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Checkout page: undefined
|
||||
</h1>
|
||||
<a
|
||||
className=""
|
||||
href="/order/12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<button>
|
||||
Pay
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/ContactDetailsPage/ContactDetailsPage.test.js
Normal file
16
src/containers/ContactDetailsPage/ContactDetailsPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import ContactDetailsPage from './ContactDetailsPage';
|
||||
|
||||
describe('ContactDetailsPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<ContactDetailsPage params={{ displayName: 'my-shop' }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`ContactDetailsPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Contact details
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/ConversationPage/ConversationPage.test.js
Normal file
16
src/containers/ConversationPage/ConversationPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import ConversationPage from './ConversationPage';
|
||||
|
||||
describe('ConversationPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<ConversationPage params={{ displayName: 'my-shop' }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
exports[`ConversationPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Conversation page
|
||||
</h1>
|
||||
<p>
|
||||
Conversation id:
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/EditProfilePage/EditProfilePage.test.js
Normal file
16
src/containers/EditProfilePage/EditProfilePage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import EditProfilePage from './EditProfilePage';
|
||||
|
||||
describe('EditProfilePage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<EditProfilePage params={{ displayName: 'my-shop' }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`EditProfilePage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Edit profile page with display name: my-shop
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
exports[`HomePage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<h1>
|
||||
Index page
|
||||
</h1>
|
||||
<a
|
||||
className=""
|
||||
href="/search"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
search page
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import HomePage from './HomePage';
|
||||
import InboxPage from './InboxPage';
|
||||
|
||||
describe('HomePage', () => {
|
||||
describe('InboxPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<HomePage />
|
||||
<InboxPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
152
src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap
Normal file
152
src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
exports[`InboxPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
undefined page
|
||||
</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
className=""
|
||||
href="/conversation/1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Single thread
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/LandingPage/LandingPage.test.js
Normal file
16
src/containers/LandingPage/LandingPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import LandingPage from './LandingPage';
|
||||
|
||||
describe('LandingPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<LandingPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
exports[`LandingPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Landing page
|
||||
</h1>
|
||||
<a
|
||||
className=""
|
||||
href="/s?location=helsinki"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Find studios
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/ListingPage/ListingPage.test.js
Normal file
16
src/containers/ListingPage/ListingPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import ListingPage from './ListingPage';
|
||||
|
||||
describe('ListingPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<ListingPage params={{ slug: 'really-nice-house-1234' }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
exports[`ListingPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Listing page with listing id: #1234
|
||||
</h1>
|
||||
<p>
|
||||
Slug:
|
||||
really-nice-house-1234
|
||||
</p>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<button>
|
||||
Book
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/ManageListingsPage/ManageListingsPage.test.js
Normal file
16
src/containers/ManageListingsPage/ManageListingsPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import ManageListingsPage from './ManageListingsPage';
|
||||
|
||||
describe('ManageListingsPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<ManageListingsPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
exports[`ManageListingsPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Manage listings
|
||||
</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
className=""
|
||||
href="/l/1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing 1234
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -1,6 +1,139 @@
|
|||
exports[`NotFoundPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Page not found
|
||||
</h1>
|
||||
|
|
@ -9,7 +142,7 @@ exports[`NotFoundPage matches snapshot 1`] = `
|
|||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
index page
|
||||
Index page
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import NotificationSettingsPage from './NotificationSettingsPage';
|
||||
|
||||
describe('NotificationSettingsPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<NotificationSettingsPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`NotificationSettingsPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Notification settings
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/OrderPage/OrderPage.jsx
Normal file
16
src/containers/OrderPage/OrderPage.jsx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import OrderPage from './OrderPage';
|
||||
|
||||
describe('OrderPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<OrderPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
16
src/containers/PasswordChangePage/PasswordChangePage.test.js
Normal file
16
src/containers/PasswordChangePage/PasswordChangePage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import PasswordChangePage from './PasswordChangePage';
|
||||
|
||||
describe('PasswordChangePage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<PasswordChangePage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`PasswordChangePage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Type new password
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import PasswordForgottenPage from './PasswordForgottenPage';
|
||||
|
||||
describe('PasswordForgottenPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<PasswordForgottenPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`PasswordForgottenPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Request new password
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js
Normal file
16
src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import PaymentMethodsPage from './PaymentMethodsPage';
|
||||
|
||||
describe('PaymentMethodsPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<PaymentMethodsPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`PaymentMethodsPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Payment methods
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import PayoutPreferencesPage from './PayoutPreferencesPage';
|
||||
|
||||
describe('PayoutPreferencesPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<PayoutPreferencesPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`PayoutPreferencesPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Payout preferences
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
16
src/containers/ProfilePage/ProfilePage.test.js
Normal file
16
src/containers/ProfilePage/ProfilePage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import ProfilePage from './ProfilePage';
|
||||
|
||||
describe('ProfilePage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<ProfilePage params={{ displayName: 'most-awesome-shop' }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
exports[`ProfilePage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Profile page with display name: most-awesome-shop
|
||||
</h1>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import SalesConversationPage from './SalesConversationPage';
|
||||
|
||||
describe('SalesConversationPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<SalesConversationPage params={{ id: 12345 }} />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
exports[`SalesConversationPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Sales conversation page
|
||||
</h1>
|
||||
<p>
|
||||
Sale id:
|
||||
12345
|
||||
</p>
|
||||
<a
|
||||
className=""
|
||||
href="/sale/12345/discussion"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Discussion tab
|
||||
</a>
|
||||
<br />
|
||||
<a
|
||||
className=""
|
||||
href="/sale/12345/details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Details tab
|
||||
</a>
|
||||
<p>
|
||||
Mobile layout needs different views for discussion and details.
|
||||
</p>
|
||||
<p>
|
||||
Discussion view is the default if route doesn\'t specify mobile tab (e.g.
|
||||
<i>
|
||||
/order/1234
|
||||
</i>
|
||||
)
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -1,23 +1,148 @@
|
|||
exports[`SearchPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Search page
|
||||
</h1>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
href="/l/Nice+studio-in-Helsinki-345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
index page
|
||||
</a>
|
||||
<br />
|
||||
<a
|
||||
className=""
|
||||
href="/home"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
home page
|
||||
Nice studio in Helsinki
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
|||
16
src/containers/SecurityPage/SecurityPage.test.js
Normal file
16
src/containers/SecurityPage/SecurityPage.test.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import renderer from 'react-test-renderer';
|
||||
import SecurityPage from './SecurityPage';
|
||||
|
||||
describe('SecurityPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const component = renderer.create(
|
||||
<BrowserRouter>
|
||||
<SecurityPage />
|
||||
</BrowserRouter>
|
||||
);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
exports[`SecurityPage matches snapshot 1`] = `
|
||||
<div
|
||||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/s"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Search
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/l/Bike-Pelago-12345"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Listing page
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/u/Bikerrs/edit"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Edit profile
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/checkout/lid1234"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Checkout
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/inbox"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Inbox
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/orders"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Orders
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/sales"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Sales
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/forgotten"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Request password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/password/change"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Change password
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/listings"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Manage listings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Account settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/contact-details"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Contact details
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/notifications"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Notification settings
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payment-methods"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payment methods
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/payout-preferences"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Payout preferences
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/account/security"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
Security
|
||||
</a>
|
||||
<button
|
||||
onClick={[Function]}>
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
<h1>
|
||||
Security
|
||||
</h1>
|
||||
<p>
|
||||
Change password, delete account
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
Loading…
Add table
Reference in a new issue