Skip to content

Conversation

@stefrado
Copy link
Contributor

@stefrado stefrado commented Sep 10, 2025

Description

Implement multiple tools to have as much frontend coverage as possible:

  • Implement storybook to have some visiual tests.
    • Add storybook to the repository
    • Write visual tests for storybook.
    • Write interactive tests for storybook.
  • Improve frontend coverage (aim for > 95%)

Current coverage

File % Stmts % Branch % Funcs % Lines
All files 86.25 87.14 82.47 86.25
frontend 91.74 95.65 90.9 91.74

Storybook preview

Scherm­afbeelding 2025-09-10 om 16 36 59

@stefrado stefrado marked this pull request as draft September 10, 2025 14:42
@stefrado stefrado force-pushed the 3442-frontend-coverage branch from d10cf4b to 80d1344 Compare September 17, 2025 10:24
@stefrado stefrado force-pushed the 3442-frontend-coverage branch 2 times, most recently from 9cd67b5 to c378eb7 Compare October 6, 2025 11:02
@stefrado stefrado marked this pull request as ready for review October 6, 2025 11:05
@stefrado stefrado force-pushed the 3442-frontend-coverage branch from c378eb7 to 2b25a83 Compare October 6, 2025 11:07
@stefrado stefrado force-pushed the 3442-frontend-coverage branch from 97324f1 to ff11171 Compare October 13, 2025 10:34
@stefrado stefrado requested a review from jiromaykin October 23, 2025 16:34
Copy link

@jiromaykin jiromaykin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An impressive amount of stories, though my browser can hardly handle it. It takes such a long while to load the Storybook stories, wondering why that is. Since this does not seem to be a problem when running the rich text-editors in Django.

- name: Install dependencies
run: npm ci

# - name: Get Playwright version

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all commented out - is this for documentation only? Or not needed at all?

// All nodes and marks enabled
allowedNodes: Object.values(NodeType),
allowedMarks: Object.values(MarkType),
resize: "both",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These resize controls don't seem to do anything in none of the stories?
So the whole list with:

  • both
  • horizontal
  • vertical
  • block
  • inline
  • none

resize: {
control: "radio",
options: [
"both",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What effect should we see from these?

expectedJSON = baseBlockquoteJSONContent;
editor = await waitForEditor(canvasElement);
blockquoteBtn = await canvas.findByTitle("Change to block quote");
// styleDropdown = await canvas.findByText("Style");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out? not needed?

["caption", ["string|null"], "The caption of the image"],
],
},
// TODO [WIP]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you need a new PR for this? :-) then its fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants