Skip to content

Commit

Permalink
#5613: One additional test case
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 21, 2021
1 parent 857e0d3 commit aaca0b1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/EntityInspector.cpp
Expand Up @@ -503,6 +503,27 @@ TEST_F(EntityInspectorTest, SelectEntitiesPlusWorldspawnPrimitive)
expectNonUnique(keyValueStore, "origin");
}

// As result of a drag-selection
TEST_F(EntityInspectorTest, SelectMultipleEntitiesAndWorldspawnPrimitive)
{
KeyValueStore keyValueStore;
GlobalCommandSystem().executeCommand("OpenMap", cmd::Argument("maps/entityinspector.map"));

// Selection contains 2 lights, 2 speakers and one worldspawn brush
auto worldspawn = GlobalMapModule().findOrInsertWorldspawn();
auto brush = algorithm::findFirstBrushWithMaterial(worldspawn, "textures/numbers/1");
Node_setSelected(brush, true);
auto light1 = selectEntity("light_torchflame_1");
auto light3 = selectEntity("light_torchflame_3");
auto speaker1 = selectEntity("speaker_1");
auto speaker2 = selectEntity("speaker_2");
keyValueStore.rescanSelection();

// These are shown with non-unique values
expectNonUnique(keyValueStore, "classname");
EXPECT_EQ(keyValueStore.store.size(), 1) << "Too many keys showing up";
}

TEST_F(EntityInspectorTest, UndoRedoKeyValueChange)
{
KeyValueStore keyValueStore;
Expand Down

0 comments on commit aaca0b1

Please sign in to comment.