mirror of
https://github.com/strapi/strapi.git
synced 2025-10-14 09:34:32 +00:00
fix: min/max value for components not clear (#23741)
This commit is contained in:
parent
fe161e34b5
commit
dbca516e7b
@ -69,6 +69,20 @@ export const advancedForm = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (repeatable) {
|
if (repeatable) {
|
||||||
|
const minComponentsAttribute = {
|
||||||
|
...attributeOptions.min,
|
||||||
|
intlLabel: {
|
||||||
|
id: getTrad('form.attribute.item.minimumComponents'),
|
||||||
|
defaultMessage: 'Minimum components',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const maxComponentsAttribute = {
|
||||||
|
...attributeOptions.max,
|
||||||
|
intlLabel: {
|
||||||
|
id: getTrad('form.attribute.item.maximumComponents'),
|
||||||
|
defaultMessage: 'Maximum components',
|
||||||
|
},
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
sections: [
|
sections: [
|
||||||
{
|
{
|
||||||
@ -79,8 +93,8 @@ export const advancedForm = {
|
|||||||
items: [
|
items: [
|
||||||
attributeOptions.required,
|
attributeOptions.required,
|
||||||
attributeOptions.private,
|
attributeOptions.private,
|
||||||
attributeOptions.max,
|
minComponentsAttribute,
|
||||||
attributeOptions.min,
|
maxComponentsAttribute,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -89,8 +89,10 @@
|
|||||||
"form.attribute.item.enumeration.placeholder": "Ex:\nmorning\nnoon\nevening",
|
"form.attribute.item.enumeration.placeholder": "Ex:\nmorning\nnoon\nevening",
|
||||||
"form.attribute.item.enumeration.rules": "Values (one line per value)",
|
"form.attribute.item.enumeration.rules": "Values (one line per value)",
|
||||||
"form.attribute.item.maximum": "Maximum value",
|
"form.attribute.item.maximum": "Maximum value",
|
||||||
|
"form.attribute.item.maximumComponents": "Maximum components",
|
||||||
"form.attribute.item.maximumLength": "Maximum length",
|
"form.attribute.item.maximumLength": "Maximum length",
|
||||||
"form.attribute.item.minimum": "Minimum value",
|
"form.attribute.item.minimum": "Minimum value",
|
||||||
|
"form.attribute.item.minimumComponents": "Minimum components",
|
||||||
"form.attribute.item.minimumLength": "Minimum length",
|
"form.attribute.item.minimumLength": "Minimum length",
|
||||||
"form.attribute.item.number.type": "Number format",
|
"form.attribute.item.number.type": "Number format",
|
||||||
"form.attribute.item.number.type.biginteger": "big integer (ex: 123456789)",
|
"form.attribute.item.number.type.biginteger": "big integer (ex: 123456789)",
|
||||||
|
@ -22,8 +22,12 @@
|
|||||||
"form.attribute.item.enumeration.placeholder": "Ex:\nmatin\nmidi\nsoir",
|
"form.attribute.item.enumeration.placeholder": "Ex:\nmatin\nmidi\nsoir",
|
||||||
"form.attribute.item.enumeration.rules": "Valeurs (les séparer par une nouvelle ligne)",
|
"form.attribute.item.enumeration.rules": "Valeurs (les séparer par une nouvelle ligne)",
|
||||||
"form.attribute.item.maximum": "Valeur maximum",
|
"form.attribute.item.maximum": "Valeur maximum",
|
||||||
|
"form.attribute.item.maximumComponents": "Composants maximum",
|
||||||
|
"form.attribute.item.maximumComponents.description": "Nombre maximum de composants",
|
||||||
"form.attribute.item.maximumLength": "Taille maximum",
|
"form.attribute.item.maximumLength": "Taille maximum",
|
||||||
"form.attribute.item.minimum": "Valeur minimun",
|
"form.attribute.item.minimum": "Valeur minimun",
|
||||||
|
"form.attribute.item.minimumComponents": "Composants minimun",
|
||||||
|
"form.attribute.item.minimumComponents.description": "Nombre minimum de composants",
|
||||||
"form.attribute.item.minimumLength": "Taille minimun",
|
"form.attribute.item.minimumLength": "Taille minimun",
|
||||||
"form.attribute.item.number.type": "Format nombre",
|
"form.attribute.item.number.type": "Format nombre",
|
||||||
"form.attribute.item.number.type.decimal": "décimal approximatif (ex: 2,22)",
|
"form.attribute.item.number.type.decimal": "décimal approximatif (ex: 2,22)",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { login } from '../../utils/login';
|
import { login } from '../../utils/login';
|
||||||
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
|
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
|
||||||
import { describeOnCondition, findAndClose } from '../../utils/shared';
|
import { clickAndWait, describeOnCondition, findAndClose } from '../../utils/shared';
|
||||||
|
|
||||||
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
|
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
|
||||||
|
|
||||||
@ -139,12 +139,10 @@ describeOnCondition(edition === 'EE')('settings', () => {
|
|||||||
await expect(requiredStageCombobox).toBeVisible();
|
await expect(requiredStageCombobox).toBeVisible();
|
||||||
await expect(requiredStageCombobox.locator('span').first()).toHaveText('Done');
|
await expect(requiredStageCombobox.locator('span').first()).toHaveText('Done');
|
||||||
|
|
||||||
// Navigate to Content Manager to check validation is working
|
|
||||||
await page.getByRole('link', { name: 'Content Manager' }).click();
|
|
||||||
|
|
||||||
// Go to the entry
|
// Go to the entry
|
||||||
await page.getByRole('link', { name: 'Content Manager' }).click();
|
await clickAndWait(page, page.getByRole('link', { name: 'Content Manager' }));
|
||||||
await page.getByRole('link', { name: 'Author' }).click();
|
await clickAndWait(page, page.getByRole('link', { name: 'Author' }));
|
||||||
|
|
||||||
await page.getByRole('gridcell', { name: 'Ted Lasso' }).click();
|
await page.getByRole('gridcell', { name: 'Ted Lasso' }).click();
|
||||||
await page.getByRole('textbox', { name: 'Name' }).fill('Ted Laso');
|
await page.getByRole('textbox', { name: 'Name' }).fill('Ted Laso');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user