File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,19 @@ void TestQgsRelationReferenceWidget::testChainFilter()
166
166
// "material" == 'iron' AND "diameter" == '120' AND "raccord" = 'collar'
167
167
}
168
168
}
169
+
170
+ // set the filter for "raccord" and then reset filter for "diameter". As
171
+ // chain filter is activated, the filter on "raccord" field should be reset
172
+ cbs[2 ]->setCurrentIndex ( cbs[2 ]->findText ( " brides" ) );
173
+ cbs[1 ]->setCurrentIndex ( cbs[1 ]->findText ( " diameter" ) );
174
+
175
+ // combobox should propose NULL, 10 and 11 because the filter is now:
176
+ // "material" == 'iron'
177
+ QCOMPARE ( w.mComboBox ->count (), 3 );
178
+
179
+ // if there's no filter at all, all features' id should be proposed
180
+ cbs[0 ]->setCurrentIndex ( cbs[0 ]->findText ( " material" ) );
181
+ QCOMPARE ( w.mComboBox ->count (), 4 );
169
182
}
170
183
171
184
QGSTEST_MAIN ( TestQgsRelationReferenceWidget )
You can’t perform that action at this time.
0 commit comments