~~NOCACHE~~
====== Tests: Loki - Semantic Core ======
* //Delete ''lib/plugins/loki/temp/loki/tests/loki-core/'' directory and all files __except start.txt__ in ''data/pages/tests/loki-core/'' directory.//
* Tests are performed manually - you have to create/modify/delete pages manually and then compare if sections "Expected result" and "Actual result" represent the same thing!
* All tests perform the same ASK query described in [[#ask_query_used_in_tests|ASK query used in tests]] section.
===== ASK query used in tests =====
{{#ask: [[category:test]] |
?test_title=Title |
?test_year=Year |
?test_lang |
?test_location |
?test_length |
default=No results!
}}
===== Instructions =====
==== 0. Start ====
**Description:** Before tests, [[tests:loki-core:page1|tests:loki-core:page1]] and [[tests:loki-core:page2|tests:loki-core:page2]] pages and connected knowledge should not exist!
**Expected result:**
No results!
If there is a table with some data, knowledge or pages have not been deleted properly after previous tests!
**Actual result:**
{{#ask: [[category:test]] |
?test_title=Title |
?test_year=Year |
?test_lang |
?test_location |
?test_length |
default=No results!
}}
==== 1. Page creation ====
**Description:** New [[tests:loki-core:page1|tests:loki-core:page1]] and [[tests:loki-core:page2|tests:loki-core:page2]] pages are created. Simply paste code below inside them. Next, ASK query is performed to check whether knowledge was properly added.
**Code:**
[[tests:loki-core:page1|tests:loki-core:page1]]
~~NOCACHE~~
[[category:test| ]]
[[test_title:=Długi tytuł testowy| ]]
Ta strona jest tylko częścią testów wiki. Strona ta została stworzona w roku [[test_year:=2015]] przez [[test_autor:=Krzysztof Kutt|Krzysztofa K]] znanego jako "Trzeci". Ten test zawiera również [[test_other_page::tests:loki-core:page2|odniesienie do innej strony z testem]].
Różne dane:
* Język: [[test_lang:=polish]]
* Długość: [[test_length:=100]]
[[tests:loki-core:page2|tests:loki-core:page2]]
~~NOCACHE~~
[[category:test| ]]
[[test_title:=Drugi test| ]]
Ta strona, tak jak [[test_other_page::tests:loki-core:page1|strona]] oraz [[test_other_page::tests:loki-core:nonexist-page|nieistniejąca strona]] jest częścią testów wiki. Strona ta została stworzona w roku [[test_year:=1900]] przez [[test_autor:=Krzysztof Kutt|Krzysztofa K]].
Różne dane:
* Długość: [[test_length:=140]]
**Expected result:**
^ ^ [[special:attribute:test_title|Title]] ^ [[special:attribute:test_year|Year]] ^ [[special:attribute:test_lang|Test_lang]] ^ [[special:attribute:test_location|Test_location]] ^ [[special:attribute:test_length|Test_length]] ^
| [[.:page1]] | Długi tytuł testowy | 2015 | polish | | 100 |
| [[.:page2]] | Drugi test | 1900 | | | 140 |
**Actual result:**
:!: //refresh page to update results//
{{#ask: [[category:test]] |
?test_title=Title |
?test_year=Year |
?test_lang |
?test_location |
?test_length |
default=No results!
}}
==== 2. Page modification ====
**Description:** Pages are modified (new values added, existing modified or deleted). Next, ASK query is performed to check whether knowledge was properly modified.
**Code:**
Page [[tests:loki-core:page1|tests:loki-core:page1]] change into:
~~NOCACHE~~
[[category:test| ]]
[[test_title:=Pierwszy test| ]]
Ta strona jest tylko częścią testów wiki. Strona ta została stworzona w roku [[test_year:=2015]] przez [[test_autor:=Krzysztof Kutt|Krzysztofa K]] znanego jako "Trzeci". Ten test zawiera również [[test_other_page::tests:loki-core:page2|odniesienie do innej strony z testem]].
Różne dane:
* Długość: [[test_length:=100]]
Page [[tests:loki-core:page2|tests:loki-core:page2]] change into:
~~NOCACHE~~
[[category:test| ]]
[[test_title:=Drugi test| ]]
Ta strona, tak jak [[test_other_page::tests:loki-core:page1|strona]] oraz [[test_other_page::tests:loki-core:nonexist-page|nieistniejąca strona]] jest częścią testów wiki. Strona ta została stworzona w roku [[test_year:=1900]] przez [[test_autor:=Krzysztof Kutt|Krzysztofa K]].
Różne dane:
* Miejsce: [[test_location:=internet]]
* Długość: [[test_length:=140]]
**Expected result:**
^ ^ [[special:attribute:test_title|Title]] ^ [[special:attribute:test_year|Year]] ^ [[special:attribute:test_lang|Test_lang]] ^ [[special:attribute:test_location|Test_location]] ^ [[special:attribute:test_length|Test_length]] ^
| [[.:page1]] | Pierwszy test | 2015 | | | 100 |
| [[.:page2]] | Drugi test | 1900 | | internet | 140 |
**Actual result:**
:!: //refresh page to update results//
{{#ask: [[category:test]] |
?test_title=Title |
?test_year=Year |
?test_lang |
?test_location |
?test_length |
default=No results!
}}
==== 3. Page deletion ====
**Description:** [[tests:loki-core:page1|tests:loki-core:page1]] and [[tests:loki-core:page2|tests:loki-core:page2]] pages are deleted (simply open them to edit, remove all content and save them). ASK query test whether knowledge was properly removed.
**Expected result:**
No results!
Note: knowledge is properly removed since [[downloads:loki-changelog#section20151029|loki-2015-10-29]] release.
**Actual result:**
:!: //refresh page to update results//
{{#ask: [[category:test]] |
?test_title=Title |
?test_year=Year |
?test_lang |
?test_location |
?test_length |
default=No results!
}}