Skip to content

Commit 9b2320a

Browse files
committed
Add some tests
1 parent 0210d38 commit 9b2320a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/src/gui/testqgsrelationreferencewidget.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,20 @@ void TestQgsRelationReferenceWidget::testChainFilter()
174174

175175
// set the filter for "raccord" and then reset filter for "diameter". As
176176
// chain filter is activated, the filter on "raccord" field should be reset
177+
cbs[0]->setCurrentIndex( 0 );
178+
QCOMPARE( w.mComboBox->currentIndex(), 0 );
179+
180+
cbs[0]->setCurrentIndex( cbs[0]->findText( "iron" ) );
181+
QCOMPARE( w.mComboBox->currentIndex(), 1 );
182+
183+
cbs[1]->setCurrentIndex( cbs[1]->findText( "120" ) );
184+
QCOMPARE( w.mComboBox->currentIndex(), 1 );
185+
177186
cbs[2]->setCurrentIndex( cbs[2]->findText( "brides" ) );
187+
QCOMPARE( w.mComboBox->currentIndex(), 1 );
188+
178189
cbs[1]->setCurrentIndex( cbs[1]->findText( "diameter" ) );
190+
QCOMPARE( w.mComboBox->currentIndex(), 0 );
179191

180192
// combobox should propose NULL, 10 and 11 because the filter is now:
181193
// "material" == 'iron'

0 commit comments

Comments
 (0)