To finish moving off Travis and into GitHub Actions in https://github.com/publiclab/plots2/pull/8795/, I turned off all 4 tests in /test/system/editor_test.rb
Here's the commit:
https://github.com/publiclab/plots2/pull/8795/commits/8bbbaf8baa061428b0ae7d221ae5831cff06cd76
We just need to turn them back on and figure out why they aren't passing; here are the errors:
[Screenshot]: tmp/screenshots/failures_test_check_markdown_editor_features_are_functional.png
ERROR["test_check_markdown_editor_features_are_functional", #<Minitest::Reporters::Suite:0x00007f34518414d0 @name="EditorTest">, 90.52515762799999]
test_check_markdown_editor_features_are_functional#EditorTest (90.53s)
Minitest::UnexpectedError: Capybara::ElementNotFound: Unable to find css "a[data-original-title='Edit this wiki page.']"
test/system/editor_test.rb:66:in `block in <class:EditorTest>'
[Screenshot]: tmp/screenshots/failures_test_check_rich_editor_features_are_functional.png
ERROR["test_check_rich_editor_features_are_functional", #<Minitest::Reporters::Suite:0x00007f345b370b40 @name="EditorTest">, 153.1470894050001]
test_check_rich_editor_features_are_functional#EditorTest (153.15s)
Minitest::UnexpectedError: Capybara::ElementNotFound: Unable to find css "a[data-original-title='Try the beta inline Rich Wiki editor.'"
test/system/editor_test.rb:42:in `block in <class:EditorTest>'
[Screenshot]: tmp/screenshots/failures_test_check_that_markdown_wiki_editor_functions_correctly.png
ERROR["test_check_that_markdown_wiki_editor_functions_correctly", #<Minitest::Reporters::Suite:0x00007f345ad811a8 @name="EditorTest">, 215.64896502800002]
test_check_that_markdown_wiki_editor_functions_correctly#EditorTest (215.65s)
Minitest::UnexpectedError: Capybara::ElementNotFound: Unable to find css "a[data-original-title='Edit this wiki page.'"
test/system/editor_test.rb:32:in `block in <class:EditorTest>'
=[Screenshot]: tmp/screenshots/failures_test_check_that_rich_wiki_editor_functions_correctly.png
ERROR["test_check_that_rich_wiki_editor_functions_correctly", #<Minitest::Reporters::Suite:0x00007f345b28f118 @name="EditorTest">, 278.21773055100016]
test_check_that_rich_wiki_editor_functions_correctly#EditorTest (278.22s)
Minitest::UnexpectedError: Capybara::ElementNotFound: Unable to find css "a[data-original-title='Try the beta inline Rich Wiki editor.'"
test/system/editor_test.rb:18:in `block in <class:EditorTest>'
Hi @Uzay-G - i hope you're well - i've turned off these tests as i couldn't get them to work in Github Actions... do you have any ideas or suggestions as to why we aren't seeing them working? I remember you added them originally. I've moved the file to:
Thank you!
It looks like the views at wiki#show and wiki#edit have changed a lot since this test was written. Here's the screenshot from the test:
The pencil's selector is now #edit-btn
, not a[data-original-title='Edit this wiki page.']
.
As I mentioned, I was checking into these and found that this text
https://github.com/publiclab/plots2/blob/f82a11c17404bae7b4307313b6890ca3169e8c90/test/system/editor_test.rb#L17
is no longer rendered on that page...causing a couple of these to fail...also a lot of names, divs and ids have changed as @noi5e mentioned above
Also a couple of these scenarios are tested here https://github.com/publiclab/plots2/blame/main/test/system/post_test.rb so we could remove the tests already covered inline with what Will was talking about
This may or may not be related, but I was asking in the meeting today... Is it even possible to access the legacy editor through /wiki/edit
or /wiki/new
(or even anywhere else on the site?)
All of these appear to be using the rich-text editor (I think?). I can't find a link or other way to access the legacy editor in these pages... @jywarren Do you see the same things when you visit these pages? We were talking in the meeting about maybe admins or senior user accounts might still have access to the legacy editor.
This does affect Comment Editor work at #8775, because scripts like editor.js
and dragdrop.js
are required in some pages that use the legacy editor... But if we're going to clean up controllers and views, maybe I don't have to worry about these contexts.
I also acknowledge that I may not actually know what the phrase "_legacy editor_" refers to... Like, maybe I've never even seen one live!
/features/new
seems to still be live here, and it's using a pretty bare-bones editor (which still has rich-text buttons and things):
Does this count as a legacy editor?
@cesswairimu i see so maybe what happened is that the tests being in a nonstandard location meant that they weren't running at all before and slowly drifted out of being in sync with the actual pages. Then once we moved them back they activated but were no longer appropriate for the latest page markup?
Agreed though let's remove what's redundant and trim the rest, if possible!
Wonderful! that totally explains it Jeff
the one bit i'm sure of is that /features/new
is fine as is. it's just a special editor where site admins can write html and stuff for special places.
Thanks for investigating this one Cess! Great job!
@noi5e did Cess's comments in the chatroom clarify things? I think sharing screenshots of both states will help disambiguate, if not.
What do you think of leaving these tests off? Or, of how they might be redundant with tests you're writing?
@jywarren I have greater clarity about legacy vs rich text editor now!
I don't think system tests for the rich-text editor will affect my work much. It seems like the rich-text editor is using separate JavaScripts? I'm more trying to catch instances of the legacy editor that still require dragdrop.js
.
Regarding this issue: yes, we can leave the tests off, if it makes sense. I agree, it seems like these tests just became inaccurate after being unused, and now just need to be rewritten with different selectors (doesn't seem like a lot of work TBH)
OK. Let's close this and if there are opportunities to rebuild those tests that's fine as well. Thanks, all!
Thanks Jeff, should I create an issue to add a link to the beta editor or we are good for now?
Most helpful comment
the one bit i'm sure of is that
/features/new
is fine as is. it's just a special editor where site admins can write html and stuff for special places.