statistics spreadsheet ! * toggle on and off the statistics spreadsheet and check its presence */
| 3159 | * toggle on and off the statistics spreadsheet and check its presence |
| 3160 | */ |
| 3161 | void SpreadsheetTest::testStatisticsSpreadsheetToggle() { |
| 3162 | Project project; |
| 3163 | auto* sheet = new Spreadsheet(QStringLiteral("test"), false); |
| 3164 | project.addChild(sheet); |
| 3165 | |
| 3166 | // initial |
| 3167 | auto children = sheet->children<StatisticsSpreadsheet>(); |
| 3168 | QCOMPARE(children.size(), 0); |
| 3169 | |
| 3170 | // toggle on |
| 3171 | sheet->toggleStatisticsSpreadsheet(true); |
| 3172 | children = sheet->children<StatisticsSpreadsheet>(); |
| 3173 | QCOMPARE(children.size(), 1); |
| 3174 | |
| 3175 | // toggle off |
| 3176 | sheet->toggleStatisticsSpreadsheet(false); |
| 3177 | children = sheet->children<StatisticsSpreadsheet>(); |
| 3178 | QCOMPARE(children.size(), 0); |
| 3179 | } |
| 3180 | |
| 3181 | /*! |
| 3182 | * change the statistics metrics and check the presense of the corresponding columns |
nothing calls this directly
no test coverage detected