Skip to content

Commit

Permalink
Item1242: EditTablePlugin cannot move rows correctly when we have foo…
Browse files Browse the repository at this point in the history
…terrows

This is not a fix but updates to the test cases so you see the issue when doing the extra steps
This checkin also extends the same test cases so the new rows get correct CALC so we get extra test coverage here too


git-svn-id: http://svn.foswiki.org/branches/Release01x00@2965 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Mar 11, 2009
1 parent 4b3b2e5 commit fcf16e7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
3 changes: 2 additions & 1 deletion core/data/TestCases/TestCaseTableAndEditTable.txt
Expand Up @@ -14,8 +14,9 @@ Description: Manual test of the combinations of TABLE, EDITTABLE, and CALC macro
* Edit the table again and add a row
* Check that the new row is added just before the footer row and not below it.
* Fill in some text and numbers like the rows above
* Save the table and check that the new row also contains the CALCs like the other rows
* Save the table and check that the new row also contains the CALCs like the other rows
* Check we still have a valid footer row
* Check that the EDITTABLE still contains Macros and not just static values.

---++ Defining Table

Expand Down
13 changes: 9 additions & 4 deletions core/data/TestCases/TestCaseTablesMacrosInMacros.txt
Expand Up @@ -13,13 +13,18 @@ Description: Manual test of the combinations of TABLE and EDITTABLE macros with
* The 3rd column in edit mode is a 3 character wide text field
* When editing one table the 3 others look like normal viewing.
* In all 4 tables edit and add a row. The row must be added BEFORE the footer row
* Put some text in the fields. Use some Macros like WIKINAKE and RED/ENDCOLOR
* Save and check that the new row appears OK with calculations
* Check in raw view that the Macros are saved as macros and that the CALC in the 13th column is the same as the previous columns
* Edit the table again and move the row above the footer up a few positions
* Save and check that the row ended up at the right position and that the footer is still at the bottom

The purpose of ENCODE is to use a Macro with full {} syntax but without actually changing the text inside it.

---++ TABLE before EDITTABLE - two lines

%TABLE{columnwidths="%ENCODE{"80"}%,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
%EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project X | Factory | A | PC2 | Fact Test | 1 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand All @@ -29,7 +34,7 @@ The purpose of ENCODE is to use a Macro with full {} syntax but without actually

---++ EDITTABLE before TABLE - two lines

%EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
%TABLE{columnwidths="%ENCODE{"80"}%,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand All @@ -40,7 +45,7 @@ The purpose of ENCODE is to use a Macro with full {} syntax but without actually

---++ TABLE before EDITTABLE - one line

%TABLE{columnwidths="%ENCODE{"80"}%,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}% %EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%TABLE{columnwidths="%ENCODE{"80"}%,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}% %EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project X | Factory | A | PC2 | Fact Test | 1 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand All @@ -51,7 +56,7 @@ The purpose of ENCODE is to use a Macro with full {} syntax but without actually

---++ EDITTABLE before TABLE - one line

%EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%EDITTABLE{format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
%TABLE{columnwidths="%ENCODE{"80"}%,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand Down
7 changes: 6 additions & 1 deletion core/data/TestCases/TestCaseTablesMacrosInSettings.txt
Expand Up @@ -5,7 +5,7 @@ _combined with macros_
Description: Manual test of the combinations of TABLE and EDITTABLE macros with advanced tables and with the option strings defined as macros which again contain other macros

* Set TABLESETTING = columnwidths="%ENCODE{"80"}% ,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"
* Set EDITTABLESETTING = format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|"
* Set EDITTABLESETTING = format="|text,10|text,10|text,%ENCODE{"3"}%|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|"

---++ Check manually

Expand All @@ -17,6 +17,11 @@ Description: Manual test of the combinations of TABLE and EDITTABLE macros with
* The 3rd column in edit mode is a 3 character wide text field
* When editing one table the 3 others look like normal viewing.
* In all 4 tables edit and add a row. The row must be added BEFORE the footer row
* Put some text in the fields. Use some Macros like WIKINAKE and RED/ENDCOLOR
* Save and check that the new row appears OK with calculations
* Check in raw view that the Macros are saved as macros and that the CALC in the 13th column is the same as the previous columns
* Edit the table again and move the row above the footer up a few positions
* Save and check that the row ended up at the right position and that the footer is still at the bottom

The purpose of ENCODE is to use a Macro with full {} syntax but without actually changing the text inside it.

Expand Down
14 changes: 9 additions & 5 deletions core/data/TestCases/TestCaseTablesMixedTagOrder.txt
Expand Up @@ -10,12 +10,16 @@ This test contains 4 identical tables all with both TABLE and EDITTABLE tags. Th
* Verify that the 4 tables are identical with content and columnwidths
* Edit each of the 4 tables using the edit table feature. Verify that they all 4 behave the same way
* In all 4 tables edit and add a row. The row must be added BEFORE the footer row

* Put some text in the fields. Use some Macros like WIKINAKE and RED/ENDCOLOR
* Save and check that the new row appears OK with calculations
* Check in raw view that the Macros are saved as macros and that the CALC in the 13th column is the same as the previous columns
* Edit the table again and move the row above the footer up a few positions
* Save and check that the row ended up at the right position and that the footer is still at the bottom

---++ TABLE before EDITTABLE - two lines

%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project X | Factory | A | PC2 | Fact Test | 1 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand All @@ -25,7 +29,7 @@ This test contains 4 identical tables all with both TABLE and EDITTABLE tags. Th

---++ EDITTABLE before TABLE - two lines

%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand All @@ -36,7 +40,7 @@ This test contains 4 identical tables all with both TABLE and EDITTABLE tags. Th

---++ TABLE before EDITTABLE - one line

%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}% %EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}% %EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project X | Factory | A | PC2 | Fact Test | 1 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand All @@ -47,7 +51,7 @@ This test contains 4 identical tables all with both TABLE and EDITTABLE tags. Th

---++ EDITTABLE before TABLE - one line

%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|" }%
%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 | | 2 | 2 | | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
Expand Down
7 changes: 6 additions & 1 deletion core/data/TestCases/TestCaseTablesWithMacroWithSettings.txt
Expand Up @@ -5,7 +5,7 @@ _combined with macros_
Description: Manual test of the combinations of TABLE and EDITTABLE macros with advanced tables and with the option strings defined as macros

* Set TABLESETTING = columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"
* Set EDITTABLESETTING = format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|"
* Set EDITTABLESETTING = format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0,$percntCALC{$quot$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))$quot}$percnt|text,5|"

---++ Test Steps

Expand All @@ -17,6 +17,11 @@ Description: Manual test of the combinations of TABLE and EDITTABLE macros with
* The 3rd column in edit mode is a 3 character wide text field
* When editing one table the 3 others look like normal viewing.
* In all 4 tables edit and add a row. The row must be added BEFORE the footer row
* Put some text in the fields. Use some Macros like WIKINAKE and RED/ENDCOLOR
* Save and check that the new row appears OK with calculations
* Check in raw view that the Macros are saved as macros and that the CALC in the 13th column is the same as the previous columns
* Edit the table again and move the row above the footer up a few positions
* Save and check that the row ended up at the right position and that the footer is still at the bottom

---++ TABLE before EDITTABLE - two lines

Expand Down

0 comments on commit fcf16e7

Please sign in to comment.