Biweekly Report-3
After the completion first week, I had a meeting with my mentors and discussed and reorganized my coming week's task. I got many helpful reviews and tried to implement those in my weekly tasks. The following tasks were carried
- I learned a great way to use selectors in the Page Object Model. We can use selectors by using the Tree Model or by using a combination of find and get methods of cypress. But both methods pose a problem of slow accessibility of elements and there might be a chance of renaming the parent element from the frontend side which will fail our test and needs to undergo many changes to fix it. Thereby, it is preferred to use get method and a data attribute which makes it more selective to access the elements.
- Initially, I created custom commands to check the visibility and appearance of the preview. Later on, I added those custom functions as methods in Page Objects. This increases the code understanding and re-useability
- I created a test specific to the expanded layout of Wikipedia preview. It might require the users to click on the Continue Reading button to visit the expanded mode. Thereby, tests were created for those expanded layouts.
- I explore the Cypress Mobile Commands. These commands are helpful in conducting the testing for mobile versions. It has commands for visiting mobile-specific sites, commands for making directional-specific swiping such that users can make multiple directional swiping on the screen. In this way, users can initiate various swiping and we can mock those swiping using the mobile commands. Tests have been created to make those swiping events.
- I explored the method where we can make our offline during the test and note their behavior in offline mode. Here is the link. I implemented those commands in our application to create a test for offline mode.
In this manner, I completed the first week of GSoC. These tests were published in the following PR. I learned a lot about mobile testing and code readability.