Closed ykazakov closed 1 year ago
Thanks @ykazakov This also fixes https://github.com/jupyter/nbgrader/issues/1722
It would be great if you could add some tests. I can give some hints if needed.
It would be great if you could add some tests. I can give some hints if needed.
I can give it a try. I found relevant functions to open the menus, e.g:
Any idea how to close the opened tab?
This is the correct function. It may be added to the following test (for assignment list) or a new test can be created. https://github.com/jupyter/nbgrader/blob/05bb458668e3a10136ba0b0df5f432ecab3f9ccb/nbgrader/tests/labextension_ui-tests/tests/test_assignment_list.spec.ts#L155
I think the close icon have the class lm-TabBar-tabCloseIcon
, so maybe we could simulate a click on it (be sure to select the correct one if several tabs are opened or if there is another TabBar).
By the way, I submitted an identical pull request two weeks ago (#1756).
I have now extended the UI tests upon suggestion of @brichet (with a little of refactoring). The tests fail without the patch.
@tuncbkose sorry I did not notice the identical issue #1722. I noticed that the bug is still present in the latest release 0.8.2, so I did not check for old issues. :-/
Thanks @ykazakov
Fixes #1772
I did not add tests to reproduce the issue. This would require a bit more work.