CollaboraOnline / collabora-drupal

Collabora Online Drupal module
Mozilla Public License 2.0
1 stars 1 forks source link

Add tests to distinguish editor vs viewer #57

Open donquixote opened 2 days ago

donquixote commented 2 days ago

Hello @hfiguiere I would like to add more tests that verify that the embedded editor works. To do this, I need to distinguish readonly vs edit, using selenium javascript.

You can see examples of this here, https://github.com/CollaboraOnline/collabora-drupal/blob/main/tests/src/ExistingSiteJavascript/CollaboraIntegrationTest.php#L38

What I found so far when opening in a regular browser:

However, for some reason, in a test, the 'readonly' class won't go away when I open in edit mode, even though the "notebookbar-active" class does appear.

Is there a more reliable way to make this distinction? Ideally a way that appears immediately on page load, without too much waiting.

donquixote commented 21 hours ago

@hfiguiere Any thoughts on this one?