Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add test for maximum history in database settings #9176

Conversation

jNullj
Copy link
Contributor

@jNullj jNullj commented Feb 27, 2023

Add a test to the TestGui::testDatabaseSettings function for the history maximum items and maximum size settings.
The test opens the database settings dialog, disables the history items and size settings, saves the changes, reopens the dialog, and then cancels without making any changes to load the default values.
The test ensures that the default values are loaded correctly.

This tests:

  1. That the two settings show and present defaults as expected.
  2. Disable in gui saves the right values
  3. Changing values (while the setting is disabled)
  4. Gui behavior when those settings are disabled

Screenshots

Example for affecting coverage in one of the files
gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp
Before:
image
After:
image

Testing strategy

running all tests, i also added delays and run the script line by line in debug.

Type of change

  • ❎ Bug fix (non-breaking change that fixes an issue)
  • ✅ New feature (change that adds functionality)
  • ❎ Breaking change (causes existing functionality to change)
  • ❎ Refactor (significant modification to existing code)
  • ❎ Documentation (non-code change)

tests/gui/TestGui.cpp Outdated Show resolved Hide resolved
tests/gui/TestGui.cpp Outdated Show resolved Hide resolved
@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from c3aa79e to 6063ff0 Compare February 28, 2023 16:33
@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from 6063ff0 to 894d504 Compare March 5, 2023 21:35
@jNullj
Copy link
Contributor Author

jNullj commented Mar 5, 2023

did a rebase to latest commit at develop

@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from 894d504 to 9eb485b Compare March 10, 2023 15:21
@jNullj
Copy link
Contributor Author

jNullj commented Mar 10, 2023

did a rebase to latest commit at develop

@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from 9eb485b to b4a2425 Compare April 8, 2023 14:29
@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from b4a2425 to 476b533 Compare April 27, 2023 21:56
@jNullj
Copy link
Contributor Author

jNullj commented Apr 27, 2023

Did a rebase to latest commit at develop

@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from 476b533 to 87f45a9 Compare May 19, 2023 19:45
@jNullj
Copy link
Contributor Author

jNullj commented May 19, 2023

Did a rebase to latest commit at develop

@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from 87f45a9 to 2c5ba1c Compare May 29, 2023 20:29
@jNullj
Copy link
Contributor Author

jNullj commented May 29, 2023

Just a rebase to latest commit

This commit adds a test to the TestGui::testDatabaseSettings function for the history maximum items and maximum size settings.
The test opens the database settings dialog, disables the history items and size settings, saves the changes, reopens the dialog, and then cancels without making any changes to load the default values. The test ensures that the default values are loaded correctly.
@jNullj jNullj force-pushed the Add-gui-testing-for-database-settings-max-history branch from 2c5ba1c to a83bf7e Compare June 14, 2023 20:37
@droidmonkey droidmonkey merged commit e755ee8 into keepassxreboot:develop Jul 4, 2023
pull bot pushed a commit to rayou/keepassxc that referenced this pull request Jul 4, 2023
…ot#9176)

This commit adds a test to the TestGui::testDatabaseSettings function for the history maximum items and maximum size settings.
The test opens the database settings dialog, disables the history items and size settings, saves the changes, reopens the dialog, and then cancels without making any changes to load the default values. The test ensures that the default values are loaded correctly.

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
pull bot pushed a commit to tigerwill90/keepassxc that referenced this pull request Jul 4, 2023
…ot#9176)

This commit adds a test to the TestGui::testDatabaseSettings function for the history maximum items and maximum size settings.
The test opens the database settings dialog, disables the history items and size settings, saves the changes, reopens the dialog, and then cancels without making any changes to load the default values. The test ensures that the default values are loaded correctly.

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants