Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #367 from mocks-server/release
Release v3.6
- Loading branch information
Showing
391 changed files
with
9,930 additions
and
3,425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
branches: | ||
- master | ||
- release | ||
- feat-concepts | ||
pull_request: | ||
jobs: | ||
get-affected: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...-data-provider-e2e-mocks/mocks/mocks.json → ...provider-e2e-mocks/mocks/collections.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[ | ||
{ | ||
"id": "base", | ||
"routesVariants": ["get-user:1"] | ||
"routes": ["get-user:1"] | ||
}, | ||
{ | ||
"id": "user2", | ||
"from": "base", | ||
"routesVariants": ["get-user:2"] | ||
"routes": ["get-user:2"] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
mocks/admin-api-client-data-provider-e2e-react-app/src/modules/about/AboutView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...n-api-client-data-provider-e2e-react-app/src/modules/collections/CollectionsController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { withData } from "@data-provider/react"; | ||
import { collections } from "@mocks-server/admin-api-client-data-provider"; | ||
|
||
import CollectionsView from "./CollectionsView"; | ||
|
||
const CollectionsController = withData(collections, "collections")(CollectionsView); | ||
|
||
export default CollectionsController; |
28 changes: 28 additions & 0 deletions
28
...s/admin-api-client-data-provider-e2e-react-app/src/modules/collections/CollectionsView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import PropTypes from "prop-types"; | ||
|
||
const CollectionsView = ({ collections }) => { | ||
return ( | ||
<div className="content"> | ||
<p className="content__title">Mocks</p> | ||
<ul> | ||
{collections.map((collection) => { | ||
return ( | ||
<li | ||
key={collection.id} | ||
data-testid={`collection-${collection.id}`} | ||
className="collections-collection-item" | ||
> | ||
{JSON.stringify(collection)} | ||
</li> | ||
); | ||
})} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
CollectionsView.propTypes = { | ||
collections: PropTypes.array, | ||
}; | ||
|
||
export default CollectionsView; |
1 change: 1 addition & 0 deletions
1
mocks/admin-api-client-data-provider-e2e-react-app/src/modules/collections/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./CollectionsController"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 22 additions & 19 deletions
41
...-data-provider-e2e-react-app/src/modules/current-route-variant/CurrentRouteVariantView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,50 @@ | ||
import PropTypes from "prop-types"; | ||
import { settings } from "@mocks-server/admin-api-client-data-provider"; | ||
import { config } from "@mocks-server/admin-api-client-data-provider"; | ||
|
||
const CurrentRouteVariantView = ({ mock, routeVariant }) => { | ||
const CurrentRouteVariantView = ({ collection, variant }) => { | ||
const setBehaviorBase = () => { | ||
settings.update({ | ||
mocks: { | ||
selected: "base", | ||
config.update({ | ||
mock: { | ||
collections: { | ||
selected: "base", | ||
}, | ||
}, | ||
}); | ||
}; | ||
|
||
const setBehaviorUser2 = () => { | ||
settings.update({ | ||
mocks: { | ||
selected: "user2", | ||
config.update({ | ||
mock: { | ||
collections: { | ||
selected: "user2", | ||
}, | ||
}, | ||
}); | ||
}; | ||
|
||
return ( | ||
<div className="content"> | ||
<p className="content__title"> | ||
Current Mock: <span data-testid="current-mock-id">{mock.id}</span> | ||
Current Collection: <span data-testid="current-collection-id">{collection.id}</span> | ||
</p> | ||
<p data-testid="current-mock">{JSON.stringify(mock)}</p> | ||
<p data-testid="current-collection">{JSON.stringify(collection)}</p> | ||
<p className="content__title"> | ||
Current Route Variant:{" "} | ||
<span data-testid="current-route-variant-id">{routeVariant.id}</span> | ||
Current Route Variant: <span data-testid="current-variant-id">{variant.id}</span> | ||
</p> | ||
<p data-testid="current-route-variant">{JSON.stringify(routeVariant)}</p> | ||
<button onClick={setBehaviorBase} data-testid="set-mock-base"> | ||
Set mock base | ||
<p data-testid="current-variant">{JSON.stringify(variant)}</p> | ||
<button onClick={setBehaviorBase} data-testid="set-collection-base"> | ||
Set collection base | ||
</button> | ||
<button onClick={setBehaviorUser2} data-testid="set-mock-user2"> | ||
Set mock user2 | ||
<button onClick={setBehaviorUser2} data-testid="set-collection-user2"> | ||
Set collection user2 | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
CurrentRouteVariantView.propTypes = { | ||
mock: PropTypes.object, | ||
routeVariant: PropTypes.object, | ||
collection: PropTypes.object, | ||
variant: PropTypes.object, | ||
}; | ||
|
||
export default CurrentRouteVariantView; |
8 changes: 0 additions & 8 deletions
8
mocks/admin-api-client-data-provider-e2e-react-app/src/modules/mocks/MocksController.js
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
mocks/admin-api-client-data-provider-e2e-react-app/src/modules/mocks/MocksView.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
mocks/admin-api-client-data-provider-e2e-react-app/src/modules/mocks/index.js
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...s/admin-api-client-data-provider-e2e-react-app/src/modules/settings/SettingsController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { withData } from "@data-provider/react"; | ||
import { settings } from "@mocks-server/admin-api-client-data-provider"; | ||
import { config } from "@mocks-server/admin-api-client-data-provider"; | ||
|
||
import SettingsView from "./SettingsView"; | ||
|
||
const SettingsController = withData(settings, "settings")(SettingsView); | ||
const SettingsController = withData(config, "config")(SettingsView); | ||
|
||
export default SettingsController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.