Home page redesign tests refactor and bugs fixing of logs, comments, reports creation.#26
Merged
freskoulix merged 27 commits intomasterfrom Apr 14, 2016
Merged
Conversation
Contributor
Konstantinacc
commented
Apr 14, 2016
- Modified create_sketch and delete_project functions as well as the related tests due to homepage redesign.
- Modified test_walkthrough.py to avoid random failures when testing page 4.
- Updated functions that test upload functionality as well as the related tests due to homepage redesign.
- Fixed issue: Disqus comment in the last example of each library not logged in logfile.
- Fixed issue: Disqus comment is not created when library has no examples.
- Fixed Firefox issue when running test_library_fetch.py test.
- Added functions that change project properties such as privacy, name and short description during test creation and when on editor.
- Updated test that checks editor's functionality.
Deletion process has changed in homepage redesign, so delete_project function was modified. delete_projects locates a project by its name, clicks on Delete button, checks that deletion was successful and closes the delete sketch modal. If any of the above actions fails, test continues and a warning message is displayed on terminal.
Sketch creation process has changed in homepage redesign, so create_sketch function was modified. create_sketch first clicks on Create Project button located in homepage. Create Sketch modal opens and function clicks on Create button. Waits for the loading screen to appear and disappear, finds the created project name and renames it.
This function tests that new file can be added to project using create-new-file field.
…ge 4. When on page 4 test waits for the boards list to be loaded before selecting a board.
This function uploads, compiles and deletes all sketches included in test_data/cb_compile_tester folder using demo_user on staging site.
Due to changes in homepage, functions that test upload ino file and upload zip file had to be updated.
…ile. When compiling examples, the comment in the last example was not logged in the logfile during selenium tests execution. This commit fixes this bug.
…mments. When a library has no examples, we generate a comment saying that "This library was tested on TEST_DATE with common Arduino boards".
Added control whether a library has examples or not in order for Disqus to generate the correct comment.
When a library has no examples, selenium tests fail to create a comment. Added function comment_compile_libraries_examples that creates a comment in libraries with no examples or compiles and comments libraries and examples in libraries with examples.
Modified test_target_libraries.py in order to collect all libraries (with and without examples) and examples urls of target libraries.
Modified test_libraries.py in order to test that all library examples compile successfully and that Disqus comments are created on library url pages and on examples.
When run locally test_library_fetch.py on Firefox didn't work as expected. There was no control that the library or the example url was opened and test continued normally. Fixed this behavior and now we check that each url was correctly opened.
codebender_testing/disqus.py
Outdated
| new_message = self.messages['library'].replace('TEST_DATE', current_date) | ||
| if examples==False: | ||
| new_message = self.messages['library_no_examples'].replace('TEST_DATE', current_date) | ||
| else: |
Contributor
There was a problem hiding this comment.
This change has exactly the same functionality with the previous code.
The previous way is recommended rather than adding an extra else condition.
Contributor
Author
There was a problem hiding this comment.
Removed redundant else condition.
added 5 commits
April 14, 2016 12:16
Sometimes editor-loading-screen disappeared very quickly and we couldn't locate the element. This had as result that test failed. Now we wait only for editor-loading-screen to be invisible.
Added functions change_privacy, change_name and chane_short_description, that change properties during sketch creation. Added functions change_name_editor and change_short_description_editor, that change sketch properties when on editor.
When a project is created we now check that we can change the privacy property, the name and the short description. Also added tests to check that we can change name and short description when on editor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.