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: starting of studio fixed when using example with new file #1651

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

neoandmatrix
Copy link
Contributor

Description

This PR introduces the changes to fix the starting of studio when used with an example while creating a new file.

Approach:-
Upon debugging found that to start studio the extension had also to be passed with file name so that was added to be passed if not passed by default. yaml was passed as it was default extension used by cli when creation of files if no extension is specified.

Related issue(s)
Resolves #1648

Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: de545b5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AayushSaini101
Copy link
Collaborator

@neoandmatrix please add screenshots for the validation thanks

@neoandmatrix
Copy link
Contributor Author

@neoandmatrix please add screenshots for the validation thanks

My apologies forgot to add it beforehand.

Here is the result after changes. Even without extension of file given studio opens it correctly.
image

@AayushSaini101
Copy link
Collaborator

@neoandmatrix please add screenshots for the validation thanks

My apologies forgot to add it beforehand.

Here is the result after changes. Even without extension of file given studio opens it correctly. image

@neoandmatrix can you add some test cases as well ?

@neoandmatrix
Copy link
Contributor Author

@neoandmatrix please add screenshots for the validation thanks

My apologies forgot to add it beforehand.

Here is the result after changes. Even without extension of file given studio opens it correctly. image

@neoandmatrix can you add some test cases as well ?

Sure will do.

@neoandmatrix
Copy link
Contributor Author

@AayushSaini101 I tried to add test for above changes but the problem that i am facing is that the changes in this PR allow opening of studio which if i do through tests open the studio which opens fine but the tests don't continue further and get stuck.
Also previous tests start to fail and i believe this test won't be possible to be run in a CI/CD environment as studio won't open in that.
Looking at the already present tests they also don't include tests related to opening of studio.

Any guidance on to where should i look for this or if doing something wrong, will be helpful.

Thanks.

@AayushSaini101
Copy link
Collaborator

@AayushSaini101 I tried to add test for above changes but the problem that i am facing is that the changes in this PR allow opening of studio which if i do through tests open the studio which opens fine but the tests don't continue further and get stuck. Also previous tests start to fail and i believe this test won't be possible to be run in a CI/CD environment as studio won't open in that. Looking at the already present tests they also don't include tests related to opening of studio.

Any guidance on to where should i look for this or if doing something wrong, will be helpful.

Thanks.

@Souvikns @Shurtu-gal is it possible to test these changes somehow, we don't have any test cases for studio before also ?

@Shurtu-gal
Copy link
Collaborator

Only very specific things can be tested such as file being changed should send websocket events. So these things can be verified. Rest I don't believe can be tested.

No error condition can be checked though.

If we really need to test then would need to look at puppeteer or sth else.

@AayushSaini101
Copy link
Collaborator

Only very specific things can be tested such as file being changed should send websocket events. So these things can be verified. Rest I don't believe can be tested.

No error condition can be checked though.

If we really need to test then would need to look at puppeteer or sth else.

make sense, we add this as well in GSOC project then would need to look at puppeteer or sth else. thanks

AayushSaini101
AayushSaini101 previously approved these changes Feb 14, 2025
@neoandmatrix
Copy link
Contributor Author

Only very specific things can be tested such as file being changed should send websocket events. So these things can be verified. Rest I don't believe can be tested.

No error condition can be checked though.

If we really need to test then would need to look at puppeteer or sth else.

make sense, we add this as well in GSOC project then would need to look at puppeteer or sth else. thanks

Sure will do some research on how to achieve the same.

Thanks for guidance.

@AayushSaini101
Copy link
Collaborator

/rtm

@asyncapi-bot asyncapi-bot merged commit a774ae2 into asyncapi:master Feb 14, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Creating a asyncapi specification file form examples with different name fails to open it in studio.
4 participants