-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor entry tests #1408
Editor entry tests #1408
Conversation
473dcf8
to
cac9cbe
Compare
cac9cbe
to
0702f4e
Compare
Can't use the LexUploadCommands methods after all, as they expect PHP's special $_FILES array to exist, and user code can't touch that array. So we copy the guts of those methods into TestControl.php instead.
Usage: add_writing_system_to_project('testlangproj', 'th-Zxxx-x-audio')
We'll use a shared folder instead of trying to handle uploads in PHP
Got the path slightly wrong earlier
The project model was being updated with the user, but the user model wasn't being updated with the project, resulting in the share dialog not finding the user as a project member. Fixed now.
0702f4e
to
746caa1
Compare
The protractor tests test navigation from one entry to another implicitly. Playwright directly jumps to an entry to test it. Therefore, an explicite test for navigating from one entry to another using the side bar on the left was added.
I just wanted to mention that the execution of this test file is very slow due to the number of reloads. The only way I could manage to ensure that a page was fully loaded was by including a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an EPIC PR! Great job @JeanneSon and @rmunn !
Description
Summary
These tests test
Details
The following tests have been converted to playwright
Lexicon E2E Editor List and Entry
✓ setup: login, click on test project
✓ browse page has correct word count
✓ search function works correctly
✓ click on first word
✓ edit page has correct word count
✓ word 1: edit page has correct definition, part of speech
✓ add citation form as visible field
✓ citation form field overrides lexeme form in dictionary citation view
✓ one picture and caption is present
✓ file upload drop box is displayed when Add Picture is clicked
✓ audio Input System is present, playable and has "more" control (manager)
✓ word 2: audio Input System is not playable but has "upload" button (manager)
✓ audio Input System is present, playable and has "more" control (member)
✓ word 2: audio Input System is not playable but has "upload" button (member)
✓ audio Input System is playable but does not have "more" control (observer)
✓ word 2: audio Input System is not playable and does not have "upload" button (observer)
✓ can delete audio Input System
✓ word 2: edit page has correct definition, part of speech
✓ dictionary citation reflects example sentences and translations
✓ word with multiple definitions: edit page has correct definitions, parts of speech
✓ word with multiple meanings: edit page has correct example sentences, translations
✓ while Show Hidden Fields has not been clicked, hidden fields are hidden if they are empty
✓ word with multiple meanings: edit page has correct general notes, sources
✓ senses can be reordered and deleted
✓ check that Semantic Domain field is visible (for view settings test later)
For details/remarks regarding converting the above tests, refer to the spreadsheet; https://docs.google.com/spreadsheets/d/1w9wjfm-02QHLhv0ObPAKKlqnDWeag379GIXwOcRU4W0/edit#gid=0
Added
✓ Navigate to other entries with left entry bar
Duplicate / not needed in Playwright and hence dropped
✓ refresh returns to list view
✓ refresh returns to entry view
✓ click on second word (found by definition)
✓ login as member, click on first word
✓ click on second word (found by definition)
✓ login as observer, click on first word
✓ click on second word (found by definition)
✓ login as manager, click on first word
✓ file upload drop box is displayed when Upload is clicked
✓ file upload drop box is not displayed when Cancel Uploading Audio is clicked
✓ click on second word (found by definition)
✓ setup: click on word with multiple definitions (found by lexeme)
These tests were merged with other tests
✓ dictionary citation reflects lexeme form -> Citation form field overrides lexeme form in dictionary citation view
✓ file upload drop box is not displayed when Cancel Adding Picture is clicked -> File upload drop box is displayed when Add Picture is clicked and can be cancelled
✓ change config to show Pictures and hide captions -> Can change config to show pictures and hide empty captions & can change config to show empty captions
✓ caption is hidden when empty if "Hidden if empty" is set in config -> Can change config to show pictures and hide empty captions & can change config to show empty captions
✓ change config to show Pictures and show captions -> Can change config to show pictures and hide empty captions & can change config to show empty captions
✓ when caption is empty, it is visible if "Hidden if empty" is cleared in config -> Can change config to show pictures and hide empty captions & can change config to show empty captions
✓ picture is removed when Delete is clicked -> Picture is removed when Delete is clicked & can change config to hide pictures and hide captions
✓ change config to hide Pictures and hide captions -> Picture is removed when Delete is clicked & can change config to hide pictures and hide captions
✓ while Show Hidden Fields has not been clicked, Pictures field is hidden -> Picture is removed when Delete is clicked & can change config to hide pictures and hide captions
✓ file upload drop box is displayed when Upload is clicked -> File upload drop box is displayed when Upload is clicked & not displayed if upload cancelled
✓ file upload drop box is not displayed when Cancel Uploading Audio is clicked -> File upload drop box is displayed when Upload is clicked & not displayed if upload cancelled
Mock file upload
✓ can't upload a non-audio file -> Can't upload a non-audio file & can upload audio file
✓ can upload an audio file -> Can't upload a non-audio file & can upload audio file
✓ back to browse page, create new word -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ check that word count is still correct -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ modify new word -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ autosaves changes -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ new word is visible in edit page -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
Configuration check
✓ Word has only "th", "tipa" and "taud" visible -> Can change configuration to make a writing system visible or invisible
✓ make "en" input system visible for "Word" field -> Can change configuration to make a writing system visible or invisible
✓ Word has "th", "tipa", "taud" and "en" visible -> Can change configuration to make a writing system visible or invisible
✓ make "en" input system invisible for "Word" field -> Can change configuration to make a writing system visible or invisible
✓ Word has only "th", "tipa" and "taud" visible again -> Can change configuration to make a writing system visible or invisible
✓ make "taud" input system invisible for "Word" field and "tipa" invisible for manager role -> Make "taud" input system invisible for "Word" field and "tipa" invisible for manager role, then ensure it worked and change it back
✓ Word has only "th" visible -> Make "taud" input system invisible for "Word" field and "tipa" invisible for manager role, then ensure it worked and change it back
✓ restore visibility of "taud" for "Word" field -> Make "taud" input system invisible for "Word" field and "tipa" invisible for manager role, then ensure it worked and change it back
✓ Word has only "th" and "taud" visible for manager role -> Make "taud" input system invisible for "Word" field and "tipa" invisible for manager role, then ensure it worked and change it back
✓ restore visibility of "tipa" input system for manager role -> Make "taud" input system invisible for "Word" field and "tipa" invisible for manager role, then ensure it worked and change it back
✓ Word has "th", "tipa" and "taud" visible again for manager role -> Make "taud" input system invisible for "Word" field and "tipa" invisible for manager role, then ensure it worked and change it back
✓ new word is visible in browse page -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ check that word count is still correct in browse page -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ remove new word to restore original word count -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
✓ previous entry is selected after delete -> Back to browse page, create new word, check word count, modify new word, autosaves changes, new word visible in editor and list
Type of Change
Screenshots
Checklist