mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
3 Commits
v5.5.239
...
update-sto
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dab847b4fc | ||
![]() |
cc75db6d09 | ||
![]() |
48d35a50b5 |
@@ -18,6 +18,5 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
'@storybook/preset-create-react-app',
|
||||
'storybook-addon-mock',
|
||||
],
|
||||
};
|
||||
|
@@ -202,7 +202,9 @@ const PrivateAssetPackInformationPage = ({
|
||||
CreditsPackageStoreContext
|
||||
);
|
||||
const [selectedUsageType, setSelectedUsageType] = React.useState<string>(
|
||||
privateAssetPackListingData.prices[0].usageType
|
||||
privateAssetPackListingData.prices.length
|
||||
? privateAssetPackListingData.prices[0].usageType
|
||||
: ''
|
||||
);
|
||||
const [
|
||||
purchasingPrivateAssetPackListingData,
|
||||
@@ -235,9 +237,7 @@ const PrivateAssetPackInformationPage = ({
|
||||
const userAssetPackPurchaseUsageType = React.useMemo(
|
||||
() =>
|
||||
getUserProductPurchaseUsageType({
|
||||
productId: privateAssetPackListingData
|
||||
? privateAssetPackListingData.id
|
||||
: null,
|
||||
productId: privateAssetPackListingData.id,
|
||||
receivedProducts: [
|
||||
...(receivedAssetPacks || []),
|
||||
...(receivedBundles || []),
|
||||
|
@@ -170,7 +170,9 @@ const PrivateGameTemplateInformationPage = ({
|
||||
null
|
||||
);
|
||||
const [selectedUsageType, setSelectedUsageType] = React.useState<string>(
|
||||
privateGameTemplateListingData.prices[0].usageType
|
||||
privateGameTemplateListingData.prices.length
|
||||
? privateGameTemplateListingData.prices[0].usageType
|
||||
: ''
|
||||
);
|
||||
const [
|
||||
purchasingPrivateGameTemplateListingData,
|
||||
@@ -202,9 +204,7 @@ const PrivateGameTemplateInformationPage = ({
|
||||
const userGameTemplatePurchaseUsageType = React.useMemo(
|
||||
() =>
|
||||
getUserProductPurchaseUsageType({
|
||||
productId: privateGameTemplateListingData
|
||||
? privateGameTemplateListingData.id
|
||||
: null,
|
||||
productId: privateGameTemplateListingData.id,
|
||||
receivedProducts: [
|
||||
...(receivedGameTemplates || []),
|
||||
...(receivedBundles || []),
|
||||
|
@@ -85,6 +85,7 @@ const useOpenInitialDialog = ({
|
||||
aiRequestId: null,
|
||||
paneIdentifier: 'center',
|
||||
});
|
||||
removeRouteArguments(['initial-dialog']);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import { AssetDetails } from '../../../../AssetStore/AssetDetails';
|
||||
import {
|
||||
fakeAssetShortHeader1,
|
||||
@@ -15,7 +16,7 @@ import { AssetStoreNavigatorStateProvider } from '../../../../AssetStore/AssetSt
|
||||
export default {
|
||||
title: 'AssetStore/AssetStore/AssetDetails',
|
||||
component: AssetDetails,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
const Wrapper = ({ children }: {| children: React.Node |}) => {
|
||||
|
@@ -2,7 +2,8 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import AssetPackInstallDialog from '../../../../AssetStore/AssetPackInstallDialog';
|
||||
import {
|
||||
fakeAsset1,
|
||||
@@ -23,8 +24,8 @@ import { AssetStoreNavigatorStateProvider } from '../../../../AssetStore/AssetSt
|
||||
export default {
|
||||
title: 'AssetStore/AssetStore/AssetPackInstallDialog',
|
||||
component: AssetPackInstallDialog,
|
||||
decorators: [paperDecorator],
|
||||
};
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
const mockApiDataForPublicAssets = [
|
||||
// Mock a successful response for the first asset:
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import FixedHeightFlexContainer from '../../../FixedHeightFlexContainer';
|
||||
import { AssetStoreStateProvider } from '../../../../AssetStore/AssetStoreContext';
|
||||
import { AssetStore } from '../../../../AssetStore';
|
||||
@@ -15,7 +16,7 @@ import { AssetStoreNavigatorStateProvider } from '../../../../AssetStore/AssetSt
|
||||
export default {
|
||||
title: 'AssetStore/AssetStore',
|
||||
component: AssetStore,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
const apiDataServerSideError = {
|
||||
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import { testProject } from '../../../GDevelopJsInitializerDecorator';
|
||||
|
||||
import ExtensionInstallDialog from '../../../../AssetStore/ExtensionStore/ExtensionInstallDialog';
|
||||
@@ -20,7 +21,7 @@ import {
|
||||
export default {
|
||||
title: 'AssetStore/ExtensionStore/ExtensionInstallDialog',
|
||||
component: ExtensionInstallDialog,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
const apiDataServerSideError = {
|
||||
|
@@ -4,6 +4,7 @@ import { I18n } from '@lingui/react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import { ExtensionStore } from '../../../../AssetStore/ExtensionStore';
|
||||
import FixedHeightFlexContainer from '../../../FixedHeightFlexContainer';
|
||||
import { ExtensionStoreStateProvider } from '../../../../AssetStore/ExtensionStore/ExtensionStoreContext';
|
||||
@@ -18,7 +19,7 @@ import PreferencesContext, {
|
||||
export default {
|
||||
title: 'AssetStore/ExtensionStore',
|
||||
component: ExtensionStore,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
const apiDataServerSideError = {
|
||||
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import ExtensionsSearchDialog from '../../../../AssetStore/ExtensionStore/ExtensionsSearchDialog';
|
||||
import { I18n } from '@lingui/react';
|
||||
import EventsFunctionsExtensionsProvider from '../../../../EventsFunctionsExtensionsLoader/EventsFunctionsExtensionsProvider';
|
||||
@@ -14,7 +15,7 @@ import { fakeExtensionsRegistry } from '../../../../fixtures/GDevelopServicesTes
|
||||
export default {
|
||||
title: 'AssetStore/ExtensionStore/ExtensionSearchDialog',
|
||||
component: ExtensionsSearchDialog,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
const apiDataServerSideError = {
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import paperDecorator from '../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
|
||||
import { GameRegistration } from '../../GameDashboard/GameRegistration';
|
||||
import GDevelopJsInitializerDecorator, {
|
||||
@@ -17,7 +18,7 @@ import { GDevelopGameApi } from '../../Utils/GDevelopServices/ApiConfigs';
|
||||
export default {
|
||||
title: 'GameDashboard/GameRegistration',
|
||||
component: GameRegistration,
|
||||
decorators: [paperDecorator, GDevelopJsInitializerDecorator],
|
||||
decorators: [paperDecorator, GDevelopJsInitializerDecorator, withMock],
|
||||
};
|
||||
|
||||
export const NoProjectLoaded = () => (
|
||||
|
@@ -27,6 +27,7 @@ import { GDevelopAssetApi } from '../../../Utils/GDevelopServices/ApiConfigs';
|
||||
import fakeResourceManagementProps from '../../FakeResourceManagement';
|
||||
import inAppTutorialDecorator from '../../InAppTutorialDecorator';
|
||||
import { useResponsiveWindowSize } from '../../../UI/Responsive/ResponsiveWindowMeasurer';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
|
||||
const apiDataServerSideError = {
|
||||
mockData: [
|
||||
@@ -161,7 +162,7 @@ const WrappedHomePage = ({
|
||||
export default {
|
||||
title: 'HomePage',
|
||||
component: WrappedHomePage,
|
||||
decorators: [GDevelopJsInitializerDecorator, inAppTutorialDecorator],
|
||||
decorators: [GDevelopJsInitializerDecorator, inAppTutorialDecorator, withMock],
|
||||
};
|
||||
|
||||
export const BuildSectionLoading = () => (
|
||||
|
@@ -3,6 +3,7 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { I18n } from '@lingui/react';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
|
||||
// Keep first as it creates the `global.gd` object:
|
||||
import { testProject } from '../../GDevelopJsInitializerDecorator';
|
||||
@@ -20,6 +21,7 @@ import PreferencesContext, {
|
||||
export default {
|
||||
title: 'ObjectEditor/NewBehaviorDialog',
|
||||
component: NewBehaviorDialog,
|
||||
decorators: [withMock],
|
||||
};
|
||||
|
||||
const apiDataServerSideError = {
|
||||
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import paperDecorator from '../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
import ProjectGeneratingDialog from '../../../ProjectCreation/ProjectGeneratingDialog';
|
||||
import UrlStorageProvider from '../../../ProjectsStorage/UrlStorageProvider';
|
||||
import { GDevelopGenerationApi } from '../../../Utils/GDevelopServices/ApiConfigs';
|
||||
@@ -12,7 +13,7 @@ import { fakeSilverAuthenticatedUser } from '../../../fixtures/GDevelopServicesT
|
||||
export default {
|
||||
title: 'Project Creation/ProjectGeneratingDialog',
|
||||
component: ProjectGeneratingDialog,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
export const Generating = () => {
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import paperDecorator from '../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
|
||||
import { OnlineGameLink } from '../../../ExportAndShare/GenericExporters/OnlineWebExport';
|
||||
import {
|
||||
@@ -16,7 +17,7 @@ import { GDevelopGameApi } from '../../../Utils/GDevelopServices/ApiConfigs';
|
||||
export default {
|
||||
title: 'Share/OnlineGameLink',
|
||||
component: OnlineGameLink,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
parameters: {
|
||||
mockData: [
|
||||
{
|
||||
|
@@ -1,6 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import paperDecorator from '../../../PaperDecorator';
|
||||
import withMock from 'storybook-addon-mock';
|
||||
|
||||
import InviteHome from '../../../../ExportAndShare/ShareDialog/InviteHome';
|
||||
import {
|
||||
@@ -42,7 +43,7 @@ const notOwnedProjectId = 'not-owned-project-id';
|
||||
export default {
|
||||
title: 'Share/InviteHome',
|
||||
component: InviteHome,
|
||||
decorators: [paperDecorator],
|
||||
decorators: [paperDecorator, withMock],
|
||||
};
|
||||
|
||||
export const NotLoggedInOrOffline = () => {
|
||||
|
Reference in New Issue
Block a user