Skip to content

Commit

Permalink
refactor: #1325 Refactor developer app revision modal using react-red…
Browse files Browse the repository at this point in the history
…ux hooks (#1823)

* refactor: #1325 Refactor app revision modal using react-redux hooks
Vu Nguyen authored Jun 24, 2020
1 parent 6c23ebb commit e8631e9
Showing 3 changed files with 142 additions and 329 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DeveloperAppRevisionModal should match a snapshot 1`] = `
<Component
afterClose={[Function]}
footerItems={
<Unknown
dataTest="revision-approve-button"
disabled={false}
onClick={[Function]}
type="button"
variant="primary"
>
CANCEL PENDING REVISIONS
</Unknown>
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
title="Pending Revisions"
visible={true}
>
<Component
afterClose={[MockFunction]}
appDetailState={
Object {
"appDetailData": Object {
@@ -68,170 +65,25 @@ exports[`DeveloperAppRevisionModal should match a snapshot 1`] = `
"loading": false,
}
}
revisionDetailState={
Object {
"approveFormState": "PENDING",
"declineFormState": "PENDING",
"error": false,
"loading": false,
"revisionDetailData": Object {
"data": Object {
"appId": "029b80f2-dc1c-4f80-adca-86dd6d4ff89b",
"description": "Download the app now and start shopping our selection of fashion, books, toys, home
appliances, sport accessories and much more.
-Easy
Compare prices and check
availability instantly by using your voice, scanning a
Once you complete your order,
track it easily and get notifications about your shipment.
- Convenient
Never
miss a deal or a discount with easy access to Lighting Deals and Deal of the Day.
Get
notifications when a new deal is available.",
"developerId": "abbc4353-8ef7-44fc-8181-0e2e68217b62",
"homePage": "https://www.amazon.com/",
"id": "1265b090-1113-4f25-ace2-adb19656d3bc",
"links": Array [
Object {
"action": "GET",
"href": "http://reapit.cloud.tyk.io/marketplace/apps/029b80f2-dc1c-4f80-adca-86dd6d4ff89b/revisions/1265b090-1113-4f25-ace2-adb19656d3bc",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://reapit.cloud.tyk.io/marketplace/apps/029b80f2-dc1c-4f80-adca-86dd6d4ff89b",
"rel": "app",
},
Object {
"action": "GET",
"href": "http://reapit.cloud.tyk.io/marketplace/developers/abbc4353-8ef7-44fc-8181-0e2e68217b62",
"rel": "developer",
},
],
"name": "Amazon Shopping 2",
"scopes": Array [
Object {
"description": "Read data about developers",
"name": "Marketplace/developers.read",
},
Object {
"description": "Write data about developers",
"name": "Marketplace/developers.write",
},
],
"summary": "Shop millions of products, never miss amazing deals, compare prices and reviews
and track your orders easily with the Amazon Shopping App!",
"supportEmail": "[email protected]",
"telephone": "0800 279 7234",
},
"desktopIntegrationTypes": Object {
"data": Array [
Object {
"description": "Replaces the standard ID check screen",
"id": "IdCheck",
"name": "Identity Check",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#id-check",
},
Object {
"description": "Replaces the standard property marketing screen",
"id": "PrpMarketing",
"name": "Property Marketing Information",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#property-marketing-information",
},
Object {
"description": "Replaces the vendor marketing report",
"id": "VendorMarketing",
"name": "Vendor Marketing Report",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#vendor-marketing-report",
},
Object {
"description": "Replaces the functionality to generate property particulars",
"id": "PrintWizard",
"name": "Property Details Generation",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#property-detail-generation",
},
Object {
"description": "Provides ability to export a saved applicant to third party system",
"id": "AppExport",
"name": "Applicant Export",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#applicant-export",
},
Object {
"description": "Launchable from the property screen",
"id": "Property",
"name": "Property",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#property-1",
},
Object {
"description": "Launchable from the applicant scree",
"id": "Applicant",
"name": "Applicant",
"url": "https://foundations-documentation.reapit.cloud/api/desktop-api#applicant",
},
],
"pageCount": 7,
"pageNumber": 1,
"pageSize": 200,
"totalCount": 7,
},
"scopes": Array [
Object {
"description": "Read data about developers",
"name": "Marketplace/developers.read",
},
Object {
"description": "Write data about developers",
"name": "Marketplace/developers.write",
},
],
},
}
}
/>
<Component
afterClose={[Function]}
footerItems={
<React.Fragment>
<Unknown
loading={false}
onClick={[Function]}
type="button"
variant="danger"
>
YES, PROCEED
</Unknown>
appId="1"
visible={true}
>
<Component
afterClose={[Function]}
footerItems={
<Unknown
dataTest="revision-approve-button"
disabled={true}
onClick={[Function]}
type="button"
variant="primary"
>
CANCEL
CANCEL PENDING REVISIONS
</Unknown>
</React.Fragment>
}
title="Please confirm"
visible={false}
>
<p>
Are you sure you wish to cancel any pending revisions for this App?
</p>
</Component>
<Component
afterClose={[Function]}
visible={false}
>
<CallToAction
buttonText="BACK TO APP"
isCenter={true}
onButtonClick={[Function]}
title="SUCCESS"
type="success"
>
All pending revisions for this app have been cancelled. You can now use the ‘Edit Detail’ option to make any additional changes as required.
</CallToAction>
}
title="Pending Revisions"
visible={true}
/>
</Component>
</Component>
</Provider>
`;
Loading

0 comments on commit e8631e9

Please sign in to comment.