Description: This scenario involves testing various aspects of the directory picker functionality in the application, including its invocation, handling of different directory types and states, interaction with the file system, and the UI's response to user actions.
Priority: 1
Prerequisites: The application must be installed and operational. Ensure that various types of directories and file systems are available for testing, including empty and non-empty directories, directories with varying disk space, and removable media.
Test Cases: List of all the test cases for this scenario
01 - Directory Picker Invocation
02 - Directory Picker Cancelation
03 - Valid Directory Selection
04 - Invalid Directory Selection - Non-empty Directory
05 - Sufficient Free Disk Space Verification
06 - Insufficient Free Disk Space Verification
07 - Display of Free Space
08 - Refresh of Free Space Info on Directory Change
09 - Cancel Button Functionality
10 - File System Permissions
11 - Selection of Removable Media
12 - Reacting to External Changes in Directory
13 - Network Location Selection
14 - Directory Selection After Warning
15 - Test the Warning Shows Each Time a Non-empty Directory Selected
16 - Next Button State Persistence
17 - Directory Selection Persistence
18 - Directory Path Length
19 - Directory with Hidden Files
20 - Reactivity to Disk Space Changes
21 - Choosing a Directory with Symlinks
22 - Directory Selection on Different File Systems
23 - Impact of Disk Space Requirement on System Performance
24 - Multiple Directory Selection Attempts
25 - Error Handling for File System Errors
26 - Language and Encoding Support in Directory Paths
27 - User Interface Responsiveness
28 - Handling of External Drives Being Ejected
Description: Verify if the directory picker dialog opens upon clicking the link.
Steps:
- Launch the application.
- Navigate to the POS setup - first screen - where the directory picker can be invoked.
- Click the link or button to open the directory picker.
Test Data: N/A
Expected Result: The dialog for choosing a directory should open without errors.
Description: Ensure the directory picker dialog can be canceled without any side effects.
Steps:
- Open the directory picker dialog.
- Click the 'Cancel' button or close the dialog.
Test Data: N/A
Expected Result: Canceling the dialog should not select any directory, and previously selected directory (if any) remains unchanged.
Description: Check if a valid directory selection enables the 'Next' button.
Steps:
- Open the directory picker dialog.
- Select a valid, empty directory.
- Observe the state of the 'Next' button.
Test Data: Valid, empty directory.
Expected Result: The 'Next' button becomes active when a valid, empty directory is chosen.
Description: Confirm that selecting a non-empty directory shows a warning.
Steps:
- Open the directory picker dialog.
- Select a directory that is not empty.
- Observe the response of the application.
Test Data: Non-empty directory.
Expected Result: A warning is displayed, and the PoS process does not start if the folder content isn't a valid POS matching the config.
Description: Verify that the 'Next' button is enabled when the directory has more than the required free disk space.
Steps:
- Open the directory picker dialog.
- Select a directory with sufficient free disk space.
- Observe the 'Next' button.
Test Data: Directory with sufficient free disk space.
Expected Result: The 'Next' button is active when there is sufficient free disk space.
Description: Check if the 'Next' button is disabled when there's not enough free disk space.
Steps:
- Open the directory picker dialog.
- Select a directory with insufficient free disk space.
- Observe the 'Next' button and any warning messages.
Test Data: Directory with insufficient free disk space.
Expected Result: The 'Next' button is disabled, and the user is warned about insufficient space.
Description: Verify that the free space in the chosen directory is accurately displayed.
Steps:
- Open the directory picker dialog.
- Select different directories with varying free disk space.
- Observe the displayed free space information.
Test Data: Directories with different amounts of free disk space.
Expected Result: The note shows the correct amount of free disk space.
Description: Ensure that the free space information updates when a different directory is selected.
Steps:
- Open the directory picker dialog.
- Select a directory and observe the displayed free space.
- Select a different directory and observe the updated free space information.
Test Data: Two or more directories with different free disk space.
Expected Result: The displayed free disk space updates to reflect the new directory's free space.
Description: Verify that the 'Cancel' button cancels the PoS directory selection process.
Steps:
- Open the directory picker dialog.
- Click the 'Cancel' button during the selection process.
Test Data: N/A
Expected Result: Clicking 'Cancel' exits the directory selection process without proceeding to the next step.
Description: Verify that the application handles the selection of a directory with restricted permissions correctly.
Steps:
- Attempt to select a directory with restricted file system permissions.
- Observe the application's response.
Test Data: Directory with restricted permissions.
Expected Result: The application should either not allow the selection of such a directory or should display an appropriate warning message.
Description: Confirm that selecting a directory on removable media is handled properly.
Steps:
- Open the directory picker dialog.
- Select a directory located on removable media (e.g., external drive).
- Observe the application's response and behavior.
Test Data: Directory on removable media.
Expected Result: The application should accept such directory and maybe smapp2 should warn about potential issues with removable media.
Description: Verify the application's behavior if the chosen directory is modified outside the app (e.g., files added/removed externally).
Steps:
- Select a directory using the directory picker.
- Modify the contents of the directory outside of the application (add or remove files).
- Observe how the application responds to these changes.
Test Data: Directory modified externally after selection.
Expected Result: To be discussed for smapp2 - maybe there should be a notification or warning about it if possible to detect changes in realtime
Description: Assess the behavior when a network location is selected as the PoS directory.
Steps:
- Open the directory picker dialog.
- Attempt to select a network location as the directory.
- Observe the application's response.
Test Data: Network location.
Expected Result: The application should handle it correctly, and maybe smapp2 should warn about potential issues.
Description: Check if the user can select a new directory after receiving a warning for choosing a non-empty directory.
Steps:
- Select a non-empty directory and receive a warning.
- Attempt to select a new, different directory.
- Observe the application's response.
Test Data: Initially a non-empty directory, followed by a new empty directory selection.
Expected Result: The user should be able to select a new directory, and the application should update accordingly.
Description: Test the warning display after reselection of a non-empty directory multiple times for different directories.
Steps:
- Select a non-empty directory and receive a warning.
- Select a different non-empty directory after the warning.
- Repeat step 2.
- Observe the application's behavior and response.
Test Data: Initially a non-empty directory, followed by a different non-empty directory selection.
Expected Result: The warning should appear each time the user selects a non-empty directory.
Description: Check if the state of the 'Next' button persists correctly when navigating back to the first step after advancing in the setup process.
Steps:
- Select a valid directory and proceed to the next step in the setup.
- Navigate back to the directory selection step.
- Observe the state of the 'Next' button.
Test Data: N/A
Expected Result: The 'Next' button should retain its enabled based on the previous interactions.
Description: Verify that the selected directory is remembered if the user navigates to the next step and then returns back to the directory selection step.
Steps:
- Select a directory and proceed to the next step in the setup.
- Navigate back to the directory selection step.
- Check if the previously selected directory is still selected.
Test Data: N/A
Expected Result: The previously selected directory should still be selected upon returning to the directory selection step.
Description: Ensure the application can handle long directory paths beyond typical filesystem limits.
Steps:
- Attempt to select a directory with an exceptionally long path.
- Observe the application's response and behavior.
Test Data: Directory with a long path.
Expected Result: The application should accept the long path
Description: Confirm that selecting a directory that contains hidden files or system files triggers the non-empty directory warning.
Steps:
- Open the directory picker dialog.
- Select a directory that contains hidden or system files.
- Observe the application's reaction to this selection.
Test Data: Directory containing hidden/system files.
Expected Result: The application should recognize the directory as non-empty and warn the user.
Description: Check if the application updates the free space note and 'Next' button status in real-time as disk space changes.
Steps:
- Open the directory picker and select a directory.
- Change the disk space of the selected directory externally (e.g., by adding/removing files).
- Observe if the free space note and 'Next' button status are updated accordingly.
Test Data: Directory with changing disk space.
Expected Result: The note and the 'Next' button's status should reflect the current state of the disk space without needing to reopen or refresh the application.(for smapp2)
Description: Test the application's behavior when selecting a directory that contains symlinks.
Steps:
- Open the directory picker dialog.
- Select a directory that includes symlinks.
- Observe how the application handles the symlinks.
Test Data: Directory containing symlinks.
Expected Result: The application should correctly handle symlinks within the directory.
Description: Verify that the application can handle directory selection across different filesystems (e.g., NTFS, FAT32, exFAT, ext4).
Steps:
- Open the directory picker dialog.
- Select directories on different filesystems.
- Observe the application's compatibility and response.
Test Data: Directories on various filesystems such as NTFS, FAT32, exFAT, ext4.
Expected Result: The application should support all these filesystems.
Description: Assess the impact on system performance when the minimum required disk space is nearly consumed.
Steps:
- Select a directory that nearly fulfills the minimum disk space requirement.
- Monitor the system performance and application's behavior.
- Observe any warnings or notifications provided by the application.
Test Data: Directory with disk space close to the minimum requirement.
Expected Result: The application should warn the user if the disk space usage might affect system performance or if it's too close to the limit. (for smapp2))
Description: Ensure the application can handle multiple directory selection attempts without crashing or displaying incorrect information.
Steps:
- Repeatedly open and close the directory picker, selecting different directories each time.
- Observe the application's stability and the accuracy of the displayed information.
Test Data: Various directories selected in multiple attempts.
Expected Result: Users should be able to attempt directory selection multiple times with consistent and accurate feedback from the application.
Description: Test how the application handles unexpected file system errors during directory selection (e.g., read/write permissions, disk errors).
Steps:
- Attempt to select a directory where file system errors are likely (e.g., read-only directory, disk with errors).
- Observe the application's error handling and messaging.
Test Data: Directories with potential file system errors.
Expected Result: The application should display an appropriate error message and not allow the user to proceed with an invalid selection.
Description: Verify that the application supports directory paths with non-English characters and various encodings.
Steps:
- Attempt to select directories with paths containing non-English characters and different encodings.
- Observe the application's ability to handle these paths.
Test Data: Directories with non-English characters and various encodings in their paths.
Expected Result: The application should properly handle paths with a variety of characters and encodings without errors.
Description: Test the responsiveness of the user interface when interacting with the directory picker on systems with low resources.
Steps:
- Operate the application on a system with limited resources.
- Use the directory picker and observe its responsiveness.
- Note any lag, freezing, or crashing of the application.
Test Data: System with low resources.
Expected Result: The directory picker should remain responsive and should not cause the application to hang or crash.
Description: Check the application's behavior if the selected directory is on an external drive that gets ejected.
Steps:
- Select a directory on an external drive using the directory picker.
- Eject the external drive while the directory is still selected.
- Observe the application's response and handling of this situation.
Test Data: Directory on an external drive that gets ejected.
Expected Result: The application should handle this gracefully, either by prompting the user to re-select a directory or by displaying a clear warning message.(for smapp2)