Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions storybook/stories/components/DialogTemperedFiles.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export const TemperedFiles = {
"adminProjetX/themes/new-theme/public/meta.bundle.js",
"adminProjetX/themes/new-theme/public/module.bundle.js",
],
container_id: 'tempered_files_container',
content_action: '#',
},
play: async () => {
const dialog = document.querySelector(".dialog");
Expand Down
1 change: 1 addition & 0 deletions storybook/stories/components/RadioCard.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const Default = {
update_value: "update",
restore_value: "restore",
},
recommended: false,
},
};

Expand Down
4 changes: 3 additions & 1 deletion storybook/stories/components/RadioCardLocal.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const Local = {
releaseNote: "",
form_options: {
online_value: false,
online_recommended_value: false,
local_value: false,
},
form_fields: {
Expand All @@ -53,10 +54,11 @@ export const Local = {
zip: ["archive1.zip", "archive2.zip", "archive3.zip"],
xml: ["archive1.xml", "archive2.xml", "archive3.xml"],
},
local_requirements: {
requirements: {
requirements_ok: true,
errors: [],
warnings: [],
},
recommended: true,
},
};
25 changes: 24 additions & 1 deletion storybook/stories/components/RadioCardOnline.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const Online = {
disabledMessage: "",
form_options: {
online_value: false,
online_recommended_value: false,
local_value: false,
},
form_fields: {
Expand All @@ -47,11 +48,33 @@ export const Online = {
badge_status: "major",
release_note: "https://github.com/PrestaShop/autoupgrade",
version: "9.0.0",
recommended: false,
message: 'The maximum version of PrestaShop to which you can update your store, based on its PHP version.',
},
online_requirements: {
next_releases: {
online: {
badge_label: "Major version",
badge_status: "major",
release_note: "https://github.com/PrestaShop/autoupgrade",
version: "9.0.0",
recommended: false,
message: 'The maximum version of PrestaShop to which you can update your store, based on its PHP version.',
},
online_recommended: {
badge_label: "Minor version",
badge_status: "minor",
release_note: "https://github.com/PrestaShop/autoupgrade",
version: "8.2.3",
recommended: true,
message: 'The recommended version of PrestaShop to which you can update your store, based on its PHP version.',
},
},
requirements: {
requirements_ok: true,
errors: [],
warnings: [],
},
release_type: 'online',
form_option_online_value: 'online',
},
};
79 changes: 79 additions & 0 deletions storybook/stories/components/RadioCardOnlineRecommended.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/

import RadioCardOnline from "../../../views/templates/components/radio-card-online.html.twig";

export default {
component: RadioCardOnline,
title: "Components/Radio card",
};

export const OnlineRecommended = {
args: {
updateAssistantDocs:
"https://devdocs.prestashop-project.org/8/basics/keeping-up-to-date/use-autoupgrade-module/",
disabled: false,
disabledMessage: "",
form_options: {
online_value: false,
local_value: false,
},
form_fields: {
channel: "online",
archive_zip: "online",
archive_xml: "online",
},
current_values: {
channel: "online",
},
next_release: {
badge_label: "Minor version",
badge_status: "minor",
release_note: "https://github.com/PrestaShop/autoupgrade",
version: "8.2.3",
recommended: true,
message: 'The recommended version of PrestaShop to which you can update your store, based on its PHP version.',
},
next_releases: {
online: {
badge_label: "Major version",
badge_status: "major",
release_note: "https://github.com/PrestaShop/autoupgrade",
version: "9.0.0",
recommended: false,
message: 'The maximum version of PrestaShop to which you can update your store, based on its PHP version.',
},
online_recommended: {
badge_label: "Minor version",
badge_status: "minor",
release_note: "https://github.com/PrestaShop/autoupgrade",
version: "8.2.3",
recommended: true,
message: 'The recommended version of PrestaShop to which you can update your store, based on its PHP version.',
},
},
requirements: {
requirements_ok: true,
errors: [],
warnings: [],
},
release_type: 'online',
form_option_online_value: 'online',
},
};
3 changes: 3 additions & 0 deletions storybook/stories/pages/VersionChoice.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { Online } from "../components/RadioCardOnline.stories";
import { Local } from "../components/RadioCardLocal.stories";
import { NoLocalArchive } from "../components/Alert.stories";
import { VersionChoice as Stepper } from "../components/Stepper.stories";
import { OnlineRecommended } from "../components/RadioCardOnlineRecommended.stories";

export default {
component: VersionChoicePage,
Expand All @@ -45,12 +46,14 @@ export const VersionChoice = {
stepper_parent_id: "stepper_content",
radio_card_online_parent_id: "radio_card_online",
radio_card_archive_parent_id: "radio_card_archive",
radio_card_online_recommended_parent_id: "radio_card_online_recommended",
form_route_to_save: "update-step-version-choice-save-form",
form_route_to_submit: "update-step-version-choice-submit-form",
data_transparency_link:
"https://www.prestashop-project.org/data-transparency",
// Radio cards
...Online.args,
...OnlineRecommended.args,
...Local.args,
// Stepper
...Stepper.args,
Expand Down