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

Bug: KatacodaRunner: "Copy to Editor" appends content to wrong file #238

Open
derochs opened this issue May 7, 2021 · 2 comments
Open
Assignees
Labels
bug Something isn't working katacoda runner low priority long term ideas that can be fixed last

Comments

@derochs
Copy link
Collaborator

derochs commented May 7, 2021

When having two successive createFile() functions, clicking on the first "Copy to Editor" button will correctly create the desired file. However, when clicking on the second "Copy to Editor" button, the content of the new file will simply be appended into the previously created file. The desired behavior would be that a new file is created as specified in the createFile() function.

This issue can be reproduced by working through step 1 in this scenario.

@derochs derochs self-assigned this May 7, 2021
@derochs derochs added bug Something isn't working katacoda runner labels May 7, 2021
@derochs
Copy link
Collaborator Author

derochs commented May 20, 2021

I am not able to reproduce this bug anymore. Creating an asciidoc tutorial with two createFile() functions in one single step does result in a Katacoda tutorial working as expected. Creating a Markdown tutorial in Katacoda Syntax with two <pre> blocks also works as intended.
Was this a bug on Katacoda side?

@derochs
Copy link
Collaborator Author

derochs commented May 20, 2021

For testing I've created an asciidoc file, compiled it and pushed it into my Katacoda Repo. The scenario can be tested on Katacoda over here
The asciidoc tutorial file looks as follows:

= Title
== Subtitle
====
Description
====

[step]
--
createFile("files/a.txt", "files/a.txt")
createFile("files/b.txt", "files/b.txt")
--

====
Conclusion
====

Desired Behavior

The Katacoda user can click on Copy to Editor and the file contents from a.txt will be copied into a new file called a.txt. In the next step, the user can click on Copy to Editor and the b.txt file contents will be copied into another file called b.txt.

Bug

It seems like I cannot reproduce the issue, but the bug before was that when clicking on the second Copy to Editor button, the b.txt file contents would just be appended to a.txt rather than creating a new file.

@EduardKrieger EduardKrieger added the low priority long term ideas that can be fixed last label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working katacoda runner low priority long term ideas that can be fixed last
Projects
None yet
Development

No branches or pull requests

2 participants