Skip to content
Permalink
Browse files

adapt test

  • Loading branch information
3nids committed May 6, 2020
1 parent ab4e179 commit 2b252c8a84d37b69161caaafcd1706db8aeca8a4
Showing with 10 additions and 6 deletions.
  1. +10 −6 tests/src/core/testqgslayouttable.cpp
@@ -1593,8 +1593,10 @@ void TestQgsLayoutTable::testBaseSort()
table->setVectorLayer( mVectorLayer );
table->setDisplayOnlyVisibleFeatures( false );
table->setMaximumNumberOfFeatures( 1 );
table->columns()[2].setSortByRank( 1 );
table->columns()[2].setSortOrder( Qt::DescendingOrder );
QgsLayoutTableColumn col;
col.setAttribute(table->columns()[2].attribute());
col.setSortOrder( Qt::DescendingOrder );
table->sortColumns() = {col};
table->refresh();

QVector<QStringList> expectedRows;
@@ -1615,10 +1617,12 @@ void TestQgsLayoutTable::testExpressionSort()
table->setVectorLayer( mVectorLayer );
table->setDisplayOnlyVisibleFeatures( false );
table->setMaximumNumberOfFeatures( 1 );
table->columns()[0].setAttribute( "Heading * -1" );
table->columns()[0].setHeading( "exp" );
table->columns()[0].setSortByRank( 1 );
table->columns()[0].setSortOrder( Qt::AscendingOrder );
QgsLayoutTableColumn col;
col.setAttribute( "Heading * -1" );
col.setHeading( "exp" );
col.setSortOrder( Qt::AscendingOrder );
table->sortColumns() = {col};
table->columns()[0] = col;
table->refresh();

QVector<QStringList> expectedRows;

0 comments on commit 2b252c8

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