Skip to main content

B. Sidebar Metacards

Tests for metacards of OneBox Sidebar UI.

Revision

DateWhat's changedPerson
28.10.2022Initial version with 5 test casesMateusz Nojek

Automation State

  • [x] B1. Verify basic functionality of History Tree
  • [x] B2. Check if adding to Top Items works properly
  • [x] B3. Verify if session details are correct
  • [x] B4. Verify that Sidebar can be switched off and on
  • [x] B5. Verify that restoring session works

B1. Verify basic functionality of History Tree

Preconditions

  1. OneBox is installed on Chrome
  2. Chrome empty tab is opened
  3. Dev-related search session with "react js" query is started and OneBox is visible

Steps

Step descriptionExpected result
1. Expand OneBox SidebarOneBox Sidebar is expanded with History Tree being visible
2. Go to the first page from Google resultsOneBox reopens and new element in History Tree is added
3. Toggle "History Tree" switch offSee that the component disappeared
4. Toggle "History Tree" switch to bring it backHistory Tree component is visible again with the same pages as before

B2. Check if adding to Top Items works properly

Preconditions

  1. OneBox is installed on Chrome
  2. Chrome empty tab is opened
  3. Dev-related search session with "react js" query is started and OneBox is visible

Steps

Step descriptionExpected result
1. Expand OneBox SidebarOneBox Sidebar is expanded with Top Items component being visible
2. Check if Top Items box is empty with a proper messageDrop box is visible with a proper message
3. Hover over the first element in History Tree and click on the "star" icon- The item with the same title and URL is added under Top Items
- A badge next to Top Items header shows the number of contained elements
4. Go to the first page from Google resultsOneBox reopens and new element in History Tree is added
5. Add new page from History Tree to Top Items (step 3.)- New element with correct data appeared in Top Items
- The badge shows correct number of pages
6. Remove first element from Top Items by clicking the star icon on this top itemSee that the item disappeared
7. Remove the last element from Top Items by clicking on the star icon on the corresponding element from history tree- The element is removed
- Top Items drop box is visible again

B3. Verify if session details are correct

Preconditions

  1. OneBox is installed on Chrome
  2. Chrome empty tab is opened
  3. Dev-related search session with "react js" query is started and OneBox is visible

Steps

Step descriptionExpected result
1. Expand OneBox SidebarOneBox Sidebar is expanded with visible session details
- Session details (query, date, time, number of visited pages) are correct
2. Open 2 more pages in separate tabsCheck if number of visited pages shows 3
3. Switch to the next tab and expand OneBox SidebarVerify if session details are the same
4. Repeat step 3. for the last tabVerify if session details are the same here

B4. Verify that Sidebar can be switched off and on

Remark

It's not currently possible in Playwright to open context menu available after mouse right click, thus we can't bring the Sidebar back and test it.

Preconditions

  1. OneBox is installed on Chrome
  2. Chrome empty tab is opened
  3. Dev-related search session with "react js" query is started and OneBox is visible

Steps

Step descriptionExpected result
1. Expand OneBox SidebarOneBox Sidebar is expanded
2. Toggle the "Sidebar" switch off- See that warning box is displayed
- "Tooltips" and "Sidebar" switches are in "off" state
3. Click "Cancel" button- All default metacards are visible again
- "Tooltips" and "Sidebar" switches are back in "on" state
4. Turn off "Tooltips" switch- "Tooltips" switch is in "off" state
5. Turn off "Sidebar" switch- See that warning box is displayed
- "Tooltips" and "Sidebar" switches are in "off" state
6. Click "Hide Sidebar" buttonOneBox Sidebar is no longer visible

B5. Verify that restoring session works

Preconditions

  1. OneBox is installed on Chrome
  2. Chrome empty tab is opened
  3. Dev-related search session with "react js" query is started and OneBox is visible

Steps

Step descriptionExpected result
1. Go to the 1st page from the resultsWait until the page is fully loaded
2. Close the tab which ends the current sessionAll tabs related to the current session must be closed
3. Open new tab and search for the same query "react js"- New dev-related session is started
- OneBox is started and collapsed
- Session restore modal is visible above the collapsed OneBox
4. Expand OneBoxCheck if the modal for restoring session is still above the OneBox
5. Click on "Restore & Continue" button- See that OneBox refreshes and the old session data is brought back
- Verify that both 2 pages from the previous session are opened
- Modal for restoring session disappeared
- Session name equals the query
- Verify History Tree is the same as it was in the initial session
6. Switch to the 2nd tabSee OneBox is present there too with correct data (see details in the step above)