Skip to content

Commit

Permalink
feat: #171 update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
trankhacvy committed Feb 7, 2020
1 parent 124365b commit 8b3cff8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,52 +220,12 @@ exports[`InstallationTable should match snapshot 1`] = `
}
data={
Array [
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c3",
"appName": undefined,
"client": "DXX",
"created": "2020-02-03T01:49:57",
"id": "b3c2f644-3241-4298-b320-b0398ff492f3",
"links": Array [
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/installations/b3c2f644-3241-4298-b320-b0398ff492f9",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/apps/062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"rel": "app",
},
],
"status": "Active",
},
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c2",
"appName": undefined,
"client": "DXX",
"created": "2020-01-31T12:57:12",
"id": "b3c2f644-3241-4298-b320-b0398ff492f2",
"links": Array [
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/installations/b3c2f644-3241-4298-b320-b0398ff492f9",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/apps/062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"rel": "app",
},
],
"status": "Active",
},
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"appName": undefined,
"client": "DXX",
"created": "2020-01-31T12:57:12",
"id": "b3c2f644-3241-4298-b320-b0398ff492f1",
"created": "2019-12-03T05:33:20",
"id": "b3c2f644-3241-4298-b320-b0398ff492f9",
"links": Array [
Object {
"action": "GET",
Expand Down Expand Up @@ -328,52 +288,12 @@ exports[`InstallationTable should match with null developerData 1`] = `
}
data={
Array [
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c3",
"appName": undefined,
"client": "DXX",
"created": "2020-02-03T01:49:57",
"id": "b3c2f644-3241-4298-b320-b0398ff492f3",
"links": Array [
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/installations/b3c2f644-3241-4298-b320-b0398ff492f9",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/apps/062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"rel": "app",
},
],
"status": "Active",
},
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c2",
"appName": undefined,
"client": "DXX",
"created": "2020-01-31T12:57:12",
"id": "b3c2f644-3241-4298-b320-b0398ff492f2",
"links": Array [
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/installations/b3c2f644-3241-4298-b320-b0398ff492f9",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/apps/062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"rel": "app",
},
],
"status": "Active",
},
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"appName": undefined,
"client": "DXX",
"created": "2020-01-31T12:57:12",
"id": "b3c2f644-3241-4298-b320-b0398ff492f1",
"created": "2019-12-03T05:33:20",
"id": "b3c2f644-3241-4298-b320-b0398ff492f9",
"links": Array [
Object {
"action": "GET",
Expand Down Expand Up @@ -457,52 +377,12 @@ exports[`InstallationTable should match with null installationsAppData 1`] = `
}
data={
Array [
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c3",
"appName": undefined,
"client": "DXX",
"created": "2020-02-03T01:49:57",
"id": "b3c2f644-3241-4298-b320-b0398ff492f3",
"links": Array [
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/installations/b3c2f644-3241-4298-b320-b0398ff492f9",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/apps/062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"rel": "app",
},
],
"status": "Active",
},
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c2",
"appName": undefined,
"client": "DXX",
"created": "2020-01-31T12:57:12",
"id": "b3c2f644-3241-4298-b320-b0398ff492f2",
"links": Array [
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/installations/b3c2f644-3241-4298-b320-b0398ff492f9",
"rel": "self",
},
Object {
"action": "GET",
"href": "http://dev.platformmarketplace.reapit.net/apps/062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"rel": "app",
},
],
"status": "Active",
},
Object {
"appId": "062a376c-f5a3-46a0-a64b-e4bc6e5af2c1",
"appName": undefined,
"client": "DXX",
"created": "2020-01-31T12:57:12",
"id": "b3c2f644-3241-4298-b320-b0398ff492f1",
"created": "2019-12-03T05:33:20",
"id": "b3c2f644-3241-4298-b320-b0398ff492f9",
"links": Array [
Object {
"action": "GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { appsDataStub } from '@/sagas/__stubs__/apps'
import { ReduxState } from '@/types/core'
import { DeveloperState } from '@/reducers/developer'
import { AppInstallationsState } from '@/reducers/app-installations'
import { installedAppsStub } from '@/components/ui/__stubs__/developer-installations-chart-data'

jest.mock('@reapit/elements', () => ({
...jest.requireActual('@reapit/elements'),
Expand Down Expand Up @@ -59,7 +58,10 @@ describe('mapStateToProps', () => {
})

describe('InstallationTable', () => {
const installedApps = handleMapAppNameToInstallation(installedAppsStub, appsDataStub.data.data || [])()
const installedApps = handleMapAppNameToInstallation(
installations.installationsAppData?.data || [],
appsDataStub.data.data || [],
)()

it('should match snapshot', () => {
expect(
Expand Down
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-functions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-statements.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b3cff8

Please sign in to comment.