wontlost-ltd / vaadin-litelement-ckeditor

Vaadin14+LitElement+CKEditor5
Other
17 stars 13 forks source link

If possible I would suggest adding VaadinCKEditorElement so that the component can be used with TestBench? #50

Open FollowSteph opened 1 year ago

FollowSteph commented 1 year ago

It could just be that I'm not seeing it but if not it would be a great addition to be able to run TestBench with VaadinCKEditor. My understanding is that it needs a VaadinCKEditorElement class to be able to test (at least easily) but I could be wrong. If I'm not wrong then I would suggest adding this as it would be very helpful.

eroself commented 1 year ago

No sure what to be achieved for running TestBench. If you want to test in Element level, you could VaadinCKEditor.getElement(). Cheers

FollowSteph commented 1 year ago

For example when I use testbench my code is:

$(ComboBoxElement.class).id(id).selectByText(value);
// or $(ComboBoxElement.class).first() if there's only one which is almost always the case.

In other words I don't necessarily have an instance of CKEditor. I have been using something like:

ExpectedConditions.presenceOfElementLocated(By.id("ckeditor-wrapper"));

which I assume I could also use to grab the CKEditor (By.id("ckeditor-wrapper")) and go from there but it would be a lot cleaner and more standard to be able to just do $(VaadinCKEditorElement.class). It's definitely more of a suggested nicety to keep things standard since there are other ways to get the editor.