Skip to content
Permalink
Browse files

Add some tests

  • Loading branch information
pblottiere committed Dec 15, 2017
1 parent 0210d38 commit 9b2320acf777d9d0dcba561a5525b16d4620690f
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/src/gui/testqgsrelationreferencewidget.cpp
@@ -174,8 +174,20 @@ void TestQgsRelationReferenceWidget::testChainFilter()

// set the filter for "raccord" and then reset filter for "diameter". As
// chain filter is activated, the filter on "raccord" field should be reset
cbs[0]->setCurrentIndex( 0 );
QCOMPARE( w.mComboBox->currentIndex(), 0 );

cbs[0]->setCurrentIndex( cbs[0]->findText( "iron" ) );
QCOMPARE( w.mComboBox->currentIndex(), 1 );

cbs[1]->setCurrentIndex( cbs[1]->findText( "120" ) );
QCOMPARE( w.mComboBox->currentIndex(), 1 );

cbs[2]->setCurrentIndex( cbs[2]->findText( "brides" ) );
QCOMPARE( w.mComboBox->currentIndex(), 1 );

cbs[1]->setCurrentIndex( cbs[1]->findText( "diameter" ) );
QCOMPARE( w.mComboBox->currentIndex(), 0 );

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

0 comments on commit 9b2320a

Please sign in to comment.
You can’t perform that action at this time.