Skip to content

Commit

Permalink
#3 #6 test DumpColsCell,
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Siemienik committed Apr 19, 2020
1 parent a40fcee commit a3a878c
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ for more example I invite to tests data: [click here and check `Renderer` folder
| Navigation | [EndRowCell](./src/cell/EndRowCell.ts) | 2 | `#! END_ROW` | Go to the beginning of next row | |
| Worksheet<br/>Navigation<br/>Loop | [FinishCell](./src/cell/FinishCell.ts) | 7 | `#! FINISH conditionPath` | Finish rendering for current worksheet and: <br/> 1) go to next worksheet if `conditionPath===true`<br/> 2) repeat this template worksheet again (`conditionPath === false`) - looping through worksheets <br/> 3) finished whole rendering when this worksheet is the last one. | **Examples:**<br/> `#! FINISHED ` or `#! FINISHED itemFromLoop.__iterated` |
| Worksheet | [WsNameCell](./src/cell/WsNameCell.ts) | 13 | `#! WS_NAME pathToVariable` | Set worksheet's name. | **Examples:** <br/> `#! WS_NAME worksheetName` <br/> `#! WS_NAME item.title` <br/> `#! WS_NAME translatedNames.0` |
| Loop | **TODO: describe it!** [DumpColsCell](./src/cell/DumpColsCell.ts) | | | | |
| Loop | [DumpColsCell](./src/cell/DumpColsCell.ts) | 10 | `#! DUMP_COLS pathToArray` | Useful for writing through multiple columns. It put each value of array to next column. | [Example](./tests/integration/data/Renderer011-DumpCols/) |
| Loop | **TODO: tests done: simple, stripped; tests todo: nested, with formula, special fields, through worksheets,** [ForEachCell](./src/cell/ForEachCell.ts) | 6 | #! FOR_EACH item items | Begin the loop named `item`, set the first element of `items` into `item` and go to the beginning of next line.| Connected to: `ContinueCell`, `EndLoopCell`, `DeleteCell`, `FinishedCell`, `SumCell`, `AverageCell`. |
| Loop | [ContinueCell](./src/cell/ContinueCell.ts) | 9 | `#! CONTINUE item` | Iterate to next element of loop named `item` (check `ForEachCell` for more information) and navigate to the beginning of new line. | |
| Loop | [EndLoopCell](./src/cell/EndLoopCell.ts) | 8 | `#! END_LOOP item` | Mark cell when the loop `item` finished. | |
| Aggregation| [SumCell](./src/cell/SumCell.ts) | 11 | `#! SUM item` | Write sum formulae for current column and the `item`'s rows. | [Example](./tests/integration/data/Renderer007-ForEach-Sum/) |
| Aggregation | [AverageCell](./src/cell/AverageCell.ts) | 12 | `#! AVERAGE item` | Write average formulae for current column and the `item`'s rows. | [Example](./tests/integration/data/Renderer009-ForEach-Average/) |
| View Model | **TODO: test - nested loop** [DeleteCell](./src/cell/DeleteCell.ts) | 14 | `#! DELETE pathToVariable` | Delete variable, useful for nested loops.| [Example](./tests/integration/data/Renderer009-ForEach-Average/) |
| View Model | [DeleteCell](./src/cell/DeleteCell.ts) | 14 | `#! DELETE pathToVariable` | Delete variable, useful for nested loops.| [Example](./tests/integration/data/Renderer009-ForEach-Average/) |


## Commands [PREVIOUS VERSION]:
Expand Down
Binary file not shown.
Binary file not shown.
103 changes: 103 additions & 0 deletions tests/integration/data/Renderer011-DumpCols/viewModel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"days": [
"01/04/2020",
"02/04/2020",
"03/04/2020",
"04/04/2020",
"05/04/2020",
"06/04/2020",
"07/04/2020"
],
"stats": [
{
"name": "p3r.io",
"views": [
128,
256,
512,
1024,
2048,
4096,
8182
],
"unique": [
16,
32,
64,
128,
256,
512,
1024
],
"actions": [
2,
4,
8,
16,
32,
64,
128
]
},
{
"name": "siemienik.pl",
"views": [
28,
56,
112,
124,
148,
196,
182
],
"unique": [
6,
2,
4,
28,
56,
12,
24
],
"actions": [
1,
2,
2,
6,
2,
4,
28
]
},
{
"name": "github.com/siemienik",
"views": [
1128,
1256,
1512,
11024,
12048,
14096,
18182
],
"unique": [
116,
132,
164,
1128,
1256,
1512,
11024
],
"actions": [
12,
14,
18,
116,
132,
164,
1128
]
}
]
}

0 comments on commit a3a878c

Please sign in to comment.