Test:Funding history test: Difference between revisions

Created page with "= Visual Test: The Table = Here is the funding history table. It should look like a standard wikitable and be collapsible. {{Startup/Funding history table | investors = {{Startup/Funding entry | investor = Sequoia Capital | round = Seed }} {{Startup/Funding entry | investor = Andreessen Horowitz | round = Series A }} {{Startup/Funding entry | investor = Khosla Ventures | round = Series B }} }} = Data Test: The Query = If the subobjects are working, the table below shou..."
 
m C moved page Test:Funding Example to Test:Funding history test without leaving a redirect
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Visual Test: The Table =
{{Startup/Funding history}}
Here is the funding history table. It should look like a standard wikitable and be collapsible.
= System Status Test Suite =


{{Startup/Funding history table
This suite verifies that SMW data is housed on the '''Subpage''' (Funding history) but points to this '''Main Page'''.
| investors =
 
{{Startup/Funding entry | investor = Sequoia Capital | round = Seed }}
== 1. Data Existence Check ==
{{Startup/Funding entry | investor = Andreessen Horowitz | round = Series A }}
Does the data exist in the wiki database?
{{Startup/Funding entry | investor = Khosla Ventures | round = Series B }}
* '''Expected:''' 3 rows (Sequoia, Andreessen, Khosla).
}}
* '''Actual:''' {{#ask: [[Is part of startup::{{PAGENAME}}]] | format=count }}
 
== 2. Physical Storage Location Verification ==
Where are the subobjects physically stored? We want them on the subpage to avoid cluttering the main page metadata.
 
{| class="wikitable"
! Check Target !! Expected !! Actual !! Status
|-
| '''Attached to Main Page'''<br>([[{{PAGENAME}}]])
| 0
| {{#ask: [[-Has subobject::{{PAGENAME}}]] | format=count }}
| {{#ifeq:{{#ask: [[-Has subobject::{{PAGENAME}}]] | format=count }}|0| <span style="color:green; font-weight:bold">PASS</span> | <span style="color:red; font-weight:bold">FAIL (Data found on Main Page)</span> }}
|-
| '''Attached to Subpage'''<br>([[{{PAGENAME}}/Funding_history]])
| 3
| {{#ask: [[-Has subobject::{{PAGENAME}}/Funding_history]] | format=count }}
| {{#ifeq:{{#ask: [[-Has subobject::{{PAGENAME}}/Funding_history]] | format=count }}|3| <span style="color:green; font-weight:bold">PASS</span> | <span style="color:red; font-weight:bold">FAIL (Data missing from Subpage)</span> }}
|}
 
== 3. Property Logic Test ==
Even though the data lives on the subpage, does the property `Is part of startup` correctly point to the Main Page?
We verify this by counting how many subobjects on the subpage explicitly point to {{PAGENAME}}.
 
* '''Target Page:''' {{PAGENAME}}
* '''Expected Links:''' 3
* '''Actual Links:''' {{#ask: [[-Has subobject::{{PAGENAME}}/Funding_history]] [[Is part of startup::{{PAGENAME}}]] | format=count }}
* '''Match Status:''' {{#ifeq:{{#ask: [[-Has subobject::{{PAGENAME}}/Funding_history]] [[Is part of startup::{{PAGENAME}}]] | format=count }}|3| <span style="color:green; font-weight:bold">PASS</span> | <span style="color:red; font-weight:bold">FAIL (Property not pointing to Main Page)</span> }}


= Data Test: The Query =
== 4. Example Queries ==
If the subobjects are working, the table below should list the 3 investors and rounds defined above.


=== Simple List ===
<pre>
{{#ask: [[Is part of startup::{{PAGENAME}}]]
{{#ask: [[Is part of startup::{{PAGENAME}}]]
  |?HasInvestor=Investor
  |?HasInvestor
  |?HasFunding Round=Round
  |?HasFunding Round
}}
</pre>
{{#ask: [[Is part of startup::{{PAGENAME}}]]
|?HasInvestor
|?HasFunding Round
  |format=table
  |format=table
|mainlabel=-
}}
}}


= Debugging info =
=== Aggregation (Count by Round) ===
* '''Page Name:''' {{PAGENAME}}
<pre>
* '''Expected "Is part of startup":''' {{#titleparts:{{PAGENAME}}|1}}
{{#ask: [[Is part of startup::{{PAGENAME}}]]
|?HasFunding Round
|format=count
}}
</pre>
'''Total Rounds recorded:''' {{#ask: [[Is part of startup::{{PAGENAME}}]] | format=count }}
 
= Debug Actions =
If tests fail:
# '''Purge Subpage (Required to update SMW table):''' [{{fullurl:{{PAGENAME}}/Funding_history|action=purge}} Click here to Purge Subpage]
# '''Purge Main Page:''' [{{fullurl:{{PAGENAME}}|action=purge}} Click here to Purge Main Page]