Skip to content

Commit 44e13ef

Browse files
committed
Fix the test case.
1 parent f31a57d commit 44e13ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/api/pivot_tables_controller_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@
154154

155155
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
156156
@instance.upload_file(uploadrequest)
157-
filter = AsposeCellsCloud::PivotFilter.new(:FieldIndex=>0 ,:FilterType=>'Count' );
157+
top10Filter = AsposeCellsCloud::Top10Filter.new(:ItemCount=>1 ,:IsPercent=>true ,:FieldIndex=>0 );
158+
filterColumn = AsposeCellsCloud::FilterColumn.new(:FilterType=>'Top10Filter', :Top10Filter=>top10Filter );
159+
autoFilter = AsposeCellsCloud::AutoFilter.new(:FilterColumns=>[filterColumn] );
160+
filter = AsposeCellsCloud::PivotFilter.new(:FieldIndex=>0 ,:FilterType=>'Count' , :AutoFilter=>autoFilter );
158161
request = AsposeCellsCloud::PutWorksheetPivotTableFilterRequest.new(:name=>remote_name,:sheetName=>'Sheet4',:pivotTableIndex=>0,:filter=>filter,:needReCalculate=>true,:folder=>remote_folder,:storageName=>'');
159162
@instance.put_worksheet_pivot_table_filter(request);
160163
end

0 commit comments

Comments
 (0)