Repository: 4ian/GDevelop
File: newIDE/app/src/stories/componentStories/QuickCustomization/QuickPublish.stories.js (JavaScript)

Code before:
      >
        <QuickPublish
          project={testProject.project}
          gameAndBuildsManager={fakeEmptyGameAndBuildsManager}
          isSavingProject={false}
          isRequiredToSaveAsNewCloudProject={() =>
            // Indicates that the project is already saved, there will be
            // no need to save it as a new cloud project.
            false
          }
          onSaveProject={async () => {}}
          onlineWebExporter={onlineWebExporter}
          setIsNavigationDisabled={() => {}}
          onClose={action('onClose')}
          onContinueQuickCustomization={action('onContinueQuickCustomization')}
          onTryAnotherGame={action('onTryAnotherGame')}
        />
      </AuthenticatedUserContext.Provider>
    </Template>
  );
};

export const AuthenticatedAndLoadingUserCloudProjects = () => {
  return (
    <Template>
      <AuthenticatedUserContext.Provider
        value={{
          ...fakeAuthenticatedUserWithNoSubscriptionAndCredits,
          cloudProjects: null,
        }}
      >
        <QuickPublish
          project={testProject.project}
          gameAndBuildsManager={fakeEmptyGameAndBuildsManager}
          isSavingProject={false}
          isRequiredToSaveAsNewCloudProject={() => true}
          onSaveProject={async () => {}}
          onlineWebExporter={onlineWebExporter}
          setIsNavigationDisabled={() => {}}
          onClose={action('onClose')}
          onContinueQuickCustomization={action('onContinueQuickCustomization')}
          onTryAnotherGame={action('onTryAnotherGame')}
        />
      </AuthenticatedUserContext.Provider>
    </Template>
  );
};

export const AuthenticatedAndFails = () => {
  return (
    <Template>

Review comment (suggestion):
I feel like this comment should be next to the props type in QuickPublish. I was not sure what it meant before reading this comment

Code after:
          onClose={action('onClose')}
          onContinueQuickCustomization={action('onContinueQuickCustomization')}
          onTryAnotherGame={action('onTryAnotherGame')}
        />
      </AuthenticatedUserContext.Provider>
    </Template>
  );
};

export const AuthenticatedWithCloudProjectsMaximumReachedButSavedAlready = () => {
  return (
    <Template>
      <AuthenticatedUserContext.Provider
        value={{
          ...fakeAuthenticatedUserWithNoSubscriptionAndCredits,
          // We have more projects than the maximum allowed, but the project is already saved
          // so there are no problems.
          cloudProjects: tenCloudProjects,
        }}
      >
        <QuickPublish
          project={testProject.project}
          gameAndBuildsManager={fakeGameAndBuildsManager}
          isSavingProject={false}
          isRequiredToSaveAsNewCloudProject={() =>
            // Indicates that the project is already saved, there will be
            // no need to save it as a new cloud project.
            false
          }
          onSaveProject={async () => {}}
          onlineWebExporter={onlineWebExporter}
          setIsNavigationDisabled={() => {}}
          onClose={action('onClose')}
          onContinueQuickCustomization={action('onContinueQuickCustomization')}
          onTryAnotherGame={action('onTryAnotherGame')}
        />
      </AuthenticatedUserContext.Provider>
    </Template>
  );
};

export const AuthenticatedAndLoadingUserCloudProjects = () => {
  return (
    <Template>
      <AuthenticatedUserContext.Provider
        value={{
          ...fakeAuthenticatedUserWithNoSubscriptionAndCredits,
          cloudProjects: null,
        }}
      >
        <QuickPublish