Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Nov 11, 2023
1 parent 639e5cf commit 7076b5f
Showing 1 changed file with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,25 +169,15 @@ TEST_F(ASettingsController, SuceedsInitialisingPropertyMaps)
auto pageSpacing = utility::getNameForEnumValue(SettingKeys::PageSpacing);
auto pageSpacingValue = QVariant::fromValue(25);

auto cursorMode = utility::getNameForEnumValue(SettingKeys::CursorMode);
auto cursorModeValue = QVariant::fromValue(QString("Hidden"));

auto openBooksAfterCreation =
utility::getNameForEnumValue(SettingKeys::OpenBooksAfterCreation);
auto openBooksAfterCreationValue = QVariant::fromValue(true);

auto upKey = utility::getNameForEnumValue(SettingKeys::MoveUp);
auto upKeyValue = QVariant::fromValue(QString("ALT+4"));

// App settings sent to initalize the QQmlPropertymaps with
ApplicationSettings settings {
{
{ pageSpacing, pageSpacingValue },
{ cursorMode, cursorModeValue },
},
{
{ openBooksAfterCreation, openBooksAfterCreationValue },
},
{},
{
{ upKey, upKeyValue },
},
Expand All @@ -202,11 +192,6 @@ TEST_F(ASettingsController, SuceedsInitialisingPropertyMaps)
// Assert
auto appearanceMap = settingsController->getAppearanceSettings();
EXPECT_EQ(pageSpacingValue, appearanceMap->value("PageSpacing").toInt());
EXPECT_EQ(cursorModeValue, appearanceMap->value("CursorMode").toString());

auto generalMap = settingsController->getGeneralSettings();
EXPECT_EQ(openBooksAfterCreationValue,
generalMap->value("OpenBooksAfterCreation").toBool());

auto shortcutsMap = settingsController->getShortcuts();
EXPECT_EQ(upKeyValue, shortcutsMap->value("MoveUp").toString());
Expand Down Expand Up @@ -278,4 +263,4 @@ TEST_F(ASettingsController, FailsCheckingIfAShortcutIsAlreadyInUseIfItIsntUsed)
EXPECT_EQ(expectedResult, result);
}

} // namespace tests::adapters
} // namespace tests::adapters

0 comments on commit 7076b5f

Please sign in to comment.