mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-24 23:19:39 -05:00
Fix can't have no bio
This commit is contained in:
parent
125dac42fa
commit
dbc0149df3
|
|
@ -27,7 +27,10 @@ const userEditActionSchema = z.object({
|
|||
)
|
||||
.nullable()
|
||||
),
|
||||
bio: z.preprocess(falsyToNull, z.string().max(USER_BIO_MAX_LENGTH)),
|
||||
bio: z.preprocess(
|
||||
falsyToNull,
|
||||
z.string().max(USER_BIO_MAX_LENGTH).nullable()
|
||||
),
|
||||
});
|
||||
|
||||
export const action: ActionFunction = async ({ request }) => {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ describe("User page", () => {
|
|||
cy.getCy("edit-page-link").should("not.exist");
|
||||
});
|
||||
|
||||
it.only("edits own profile", function () {
|
||||
it("edits own profile", function () {
|
||||
cy.intercept("/u/79237403620945920/edit?_data=routes%2Fu.%24identifier").as(
|
||||
"editPageData"
|
||||
);
|
||||
|
|
@ -34,9 +34,10 @@ describe("User page", () => {
|
|||
cy.contains("Finland");
|
||||
cy.contains(bio);
|
||||
|
||||
// let's also check clearing select is possible
|
||||
// let's also check that clearing inputs is possible
|
||||
cy.getCy("edit-page-link").click();
|
||||
cy.getCy("country-select").select(0);
|
||||
cy.getCy("bio-textarea").clear();
|
||||
cy.getCy("submit-button").click();
|
||||
cy.wait("@editPageData");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user