@@ -305,12 +305,12 @@ describe("Custom variables", () => {
|
||||
});
|
||||
it("does not allow saving very long name", async () => {
|
||||
const { nameInput, valueInput, saveButton } = await getAddSecretUI();
|
||||
await user.type(nameInput, new Array(300).fill("A").join("")); // Invalid name
|
||||
await user.type(nameInput, new Array(256).fill("A").join("")); // Invalid name
|
||||
await user.type(valueInput, "a value");
|
||||
await user.click(saveButton);
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
screen.getByText("Name may not exceed 256 characters")
|
||||
screen.getByText("Name may not exceed 255 characters")
|
||||
).toBeInTheDocument();
|
||||
expect(saveButton).toBeDisabled();
|
||||
});
|
||||
|
||||
@@ -53,9 +53,9 @@ const FORM_VALIDATIONS: IFormValidations = {
|
||||
{
|
||||
name: "notTooLong",
|
||||
isValid: (formData: IAddSecretModalScheduleFormData) => {
|
||||
return formData.name.length <= 256;
|
||||
return formData.name.length <= 255;
|
||||
},
|
||||
message: "Name may not exceed 256 characters",
|
||||
message: "Name may not exceed 255 characters",
|
||||
},
|
||||
{
|
||||
name: "doesNotIncludePrefix",
|
||||
|
||||
Reference in New Issue
Block a user