Request for a feature
Hey Janata, I just wanted to give a request for a feature such that we can also see the expected outcome / output for the cases within the plugin . Just a little window beneath the testcases would do.
Hello! Nice idea. In my opinion, this should be implemented as another button (next to "run" and "edit"):
[ test 0 ] [ edit ] [ run ] [ expected ] [ time: 69ms ]
and expected toggles between this:
[ test 0 ] [ edit ] [ run ] [ expected ] [ time: 69ms ]
test input
test output
[ decline ]
and this:
[ test 0 ] [ edit ] [ run ] [ expected ] [ time: 69ms ]
test input
test output
[ expected output: ]
expected output
[ decline ]
Also:
-
expected outputastime: Xmsortest Xis not clickable -
expectedbutton (clickable of course) and the whole structure only appears if the target result of that case is saved
Hi!
I think it is an interesting idea to add the expected output feature.
However, the test bar already contains test number, edit, run, and time, so adding the expected button there would be too much.
An alternative to a button could be a key binding, a menu option, or something else.
So, I am open to suggestions about the best way to integrate this feature.
Hi Nikita and Janata!
Considering nikita its a good feature to have a button for the same I think it should be like that only because sometimes output can stretch in cases of displaying arrays / strings etc and you always wont want to see a stretched window . But also I think Janata has a fully valid point here.
In my opinion a button besides the accept/decline button can do the job.
Also I would be very happy to have better ideas for the same
I added an expected output button after decline and I think it looks and works well. But I can't figure out how actions work. (Also, why is there a list of expected results for each test case?)
Jatana, could you, please, implement toggling the expected result when this button is clicked (href: click-expected)?
When there is no expected result:

When there is an expected result:

This looks neat. I guess once Janata give a green flag to this implementation and also fixes the issues that you are getting it would great one to have.
Hey Nikita and Janata ! Are there any updates for the same ?
Hello! The problem is that you can actually store multiple correct answers for a single test. Then the only option is to print the expected output only if there is only one such possible output. Currently, I have not figured out what to do if there are several of them...
I think printing one of the correct answers could be a solution because in most cases there is only one correct answer to a test.
I agree with the point of Janata .. almost of the sample cases that are provided at a site are provided with a single test case answer but however pertaining to the point of Nikita I think just showing the first correct answer can be a viable option .
Ok, thank you. I will try to implement this in the nearest future.
Oh thats great, I would be looking forward to hear from you soon .
Hello! @Jatana, I still can't figure out how to insert text into an existing layout (i.e. just a page). Please help with this :)
PS: If it will be a bit helpful, I added a boolean expected_output_toggledvariable and a function get_correct_answer for the Test class
Hi @npanuhin @Jatana ! I appreciate the efforts being put into my request and really thank you for it. Just wanted a little update that how are things going
Hi Guys ! Any further updates ?
Sorry, I've been extremely busy this and previous month. I'll try to find some time in the upcoming days to implement the feature.
I appreciate your efforts man thank you
Hi @Jatana @npanuhin ! Just wanted to ask if there are any plans for this feature to be encorporated in the further updates ?