Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add manual_json and playwright-test #269

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RohittCodes
Copy link
Contributor

@RohittCodes RohittCodes commented Nov 21, 2024

refactored: manual_edit_json template ingestion into db.
included playwright tests

fixes: #261
/claim #261

cc: @seveibar

@RohittCodes
Copy link
Contributor Author

i forgot to claim the bounty for #265. and the fix for it temporarily solved the issue. i.e., whenever a new snippet was created it still showed the "Unsaved changes" text. This PR solves the issues with manual_edit_json.

const newSnippet = snippetSchema.parse({
...snippet,
manual_edits_json: JSON.stringify(manualEditsJsonTemplate, null, 2),
Copy link
Contributor

Choose a reason for hiding this comment

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

can we keep this object as null by default

Copy link
Contributor

Choose a reason for hiding this comment

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

if there is an issue with the default value, that should be handled on the frontend the first time it's selected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uhh, sure..

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

you didn't test saving the manual edits file, you just set a default value on the server and showed it loads in both views.

you must hit run/save and ensure that edits to it are saved

@RohittCodes RohittCodes marked this pull request as draft November 23, 2024 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a Playwright Test that tests saving manual edits and viewing the changes inside the "View Files" menu
2 participants