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 validation and playwright-test #269

Open
wants to merge 16 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
@RohittCodes RohittCodes marked this pull request as ready for review November 23, 2024 09:32
@RohittCodes RohittCodes changed the title fix: add manual_json and playwright-test fix: add manual_json validation and playwright-test Nov 23, 2024
@RohittCodes
Copy link
Contributor Author

@seveibar all the failing tests are passing in my local setup again. Not sure what's causing the checks fail here. 🤷‍♂️

@seveibar
Copy link
Contributor

@RohittCodes can you make sure youve got the latest deps by running "bun i" locally then rerunning tests. Is it a timeout issue on ci?

@RohittCodes
Copy link
Contributor Author

RohittCodes commented Nov 24, 2024

yeah all the deps are up to date, and i don't think there is any timeout issue for bun tests, but the playwright-test has timeout issues on preview-page and footprint-dialog. @seveibar

@seveibar
Copy link
Contributor

Hmm maybe configure for longer timeout in the config/workflow?

@RohittCodes
Copy link
Contributor Author

RohittCodes commented Nov 24, 2024

@seveibar nah this too doesn't work.

the bun tests have passed but there's some issue with the playwright test for preview-page.

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