Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.

Do not merge: Issue 31 test #32

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions test/end-to-end/issue-31/input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react';
import { PropTypes } from 'prop-types';
import './_campaign-cart.scss';

const CampaignCart = ({ campaign }) =>
<div className="campaign-cart">
<div className="campaign-cart__header">
Campaign cart
</div>
<div className="campaign-cart__description">
Total campaign cost overview
</div>
<br/>

<table>
<tbody>
<tr>
<td>Campaign type</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>Audience size</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>Cost per profile</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>Sub total</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>GST</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td><b>TOTAL COST</b></td>
<td>{campaign.type}</td>
</tr>
</tbody>
</table>
<a href="javascript:void(0);" className="campaign-cart__button">Checkout</a>
</div>;

CampaignCart.propTypes = {
campaign: PropTypes.shape({
type: PropTypes.string.isRequired,
stars: PropTypes.number.isRequired,
completed: PropTypes.number.isRequired
})
};

export default CampaignCart;
51 changes: 51 additions & 0 deletions test/end-to-end/issue-31/output.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React from 'react';
import './_campaign-cart.scss';
type CampaignCartProps = {
campaign?: {
type: string,
stars: number,
completed: number,
},
};
const CampaignCart: React.SFC<CampaignCartProps> = ({ campaign }) => (
<div className="campaign-cart">
<div className="campaign-cart__header">Campaign cart</div>
<div className="campaign-cart__description">Total campaign cost overview</div>
<br />

<table>
<tbody>
<tr>
<td>Campaign type</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>Audience size</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>Cost per profile</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>Sub total</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>GST</td>
<td>{campaign.type}</td>
</tr>
<tr>
<td>
<b>TOTAL COST</b>
</td>
<td>{campaign.type}</td>
</tr>
</tbody>
</table>
<a href="javascript:void(0);" className="campaign-cart__button">
Checkout
</a>
</div>
);
export default CampaignCart;