tables
tables copied to clipboard
Add Espresso Tests for MainActivity Menu and Toolbar Functionality
PR Summary for issue #484
This PR adds a series of Espresso tests to verify the functionality of menu options and toolbar visibility in MainActivity
.
Changes Made
-
Added Test Case:
testMenuImport_whenClickedShouldLaunchImportActivity
- Description: Clicks on the Import menu item and verifies that the
ImportCSVActivity
is launched.
- Description: Clicks on the Import menu item and verifies that the
-
Added Test Case:
testMenuImport_whenClickedShouldLaunchExportActivity
- Description: Clicks on the Export menu item and verifies that the
ExportCSVActivity
is launched.
- Description: Clicks on the Export menu item and verifies that the
-
Added Test Case:
testToolBarVisibility
- Description: Verifies that the toolbar in MainActivity is displayed.
-
Added Test Case:
testMenuItems
- Description: Verifies that specific menu items are displayed when the overflow menu is opened.
-
Added Test Case:
testOpenTableManager
- Description: Clicks on the Sync menu item and verifies that the appropriate intent is launched..
-
Added Test Case:
testStartSync
- Description:Clicks on the Sync menu item and verifies that the Sync dialog is displayed.
-
Added Test Case:
testOnOptionsItemSelected
- Description: Mocks a menu item selection and verifies that the appropriate action is taken.
Rationale
These tests ensure that the menu options and toolbar in MainActivity function correctly. Verifying that the correct activities are launched and the appropriate UI elements are displayed.