Skip to content

Commit

Permalink
Validation and robot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nie-ed committed Dec 9, 2024
1 parent c0ea991 commit b353d8c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 18 deletions.
10 changes: 5 additions & 5 deletions interactive_console_output.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 7.1.1 (Python 3.10.12 on linux)" generated="2024-12-04T15:08:11.827144" rpa="false" schemaversion="5">
<robot generator="Robot 7.1.1 (Python 3.10.12 on linux)" generated="2024-12-09T16:03:49.727509" rpa="false" schemaversion="5">
<suite id="s1" name="Robot Interactive Console" source="/home/edevnico/.vscode/extensions/robocorp.robotframework-lsp-1.13.0/src/robotframework_ls/vendored/robotframework_interactive/robot_interactive_console.robot">
<test id="s1-t1" name="Default Task/Test" line="5">
<kw name="Interpreter Main Loop" owner="MainLoop">
<status status="PASS" start="2024-12-04T15:08:11.849878" elapsed="2.654375"/>
<status status="PASS" start="2024-12-09T16:03:49.769202" elapsed="2.432001"/>
</kw>
<status status="PASS" start="2024-12-04T15:08:11.849221" elapsed="2.655234"/>
<status status="PASS" start="2024-12-09T16:03:49.767970" elapsed="2.433990"/>
</test>
<status status="PASS" start="2024-12-04T15:08:11.828210" elapsed="2.676921"/>
<status status="PASS" start="2024-12-09T16:03:49.729494" elapsed="2.475071"/>
</suite>
<statistics>
<total>
Expand All @@ -20,6 +20,6 @@
</suite>
</statistics>
<errors>
<msg time="2024-12-04T15:08:11.824184" level="WARN">Error in file '/home/edevnico/.vscode/extensions/robocorp.robotframework-lsp-1.13.0/src/robotframework_ls/vendored/robotframework_interactive/robot_interactive_console.robot' on line 4: Singular section headers like '*** Test Case ***' are deprecated. Use plural format like '*** Test Cases ***' instead.</msg>
<msg time="2024-12-09T16:03:49.722298" level="WARN">Error in file '/home/edevnico/.vscode/extensions/robocorp.robotframework-lsp-1.13.0/src/robotframework_ls/vendored/robotframework_interactive/robot_interactive_console.robot' on line 4: Singular section headers like '*** Test Case ***' are deprecated. Use plural format like '*** Test Cases ***' instead.</msg>
</errors>
</robot>
5 changes: 4 additions & 1 deletion src/story_tests/delete_reference.robot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ Test Setup Reset Database
Deleting a Reference Should Remove It From The List
Create Article Reference
Go To References List Page
Click Button delete
Page Should Contain Article_Kirjoittaja
${normal}= Run Keyword And Return Status Element Should Be Visible id=view_normal_format
Run Keyword If ${normal} Click Normal Button If Shown
Click Button Delete
Go To References List Page
Page Should Not Contain Article_Kirjoittaja

Expand Down
1 change: 0 additions & 1 deletion src/story_tests/reference_article_listing.robot
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Created Reference Should Show As Human Readable Text
Page Should Contain Kirjoitus
Page Should Contain Sanomalehti
Page Should Contain 1999
Page Should Not Contain Referenssi1

Created Reference Should Show As BibTex
Create Article Reference
Expand Down
1 change: 0 additions & 1 deletion src/story_tests/reference_book_listing.robot
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Created Reference Should Show As Human Readable Text
Page Should Contain Kirjoitus
Page Should Contain Publisher
Page Should Contain 1999
Page Should Not Contain Referenssi1



Expand Down
1 change: 0 additions & 1 deletion src/story_tests/reference_edit.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Created Reference Should Editable After Creation
${normal}= Run Keyword And Return Status Element Should Be Visible id=view_normal_format
Run Keyword If ${normal} Click Normal Button If Shown
Page Should Contain Article_Kirjoittaja
Page Should Not Contain Referenssi1
Click Link edit_reference
Clear Element Text author
Set Author Uusi_kirjoittaja
Expand Down
7 changes: 3 additions & 4 deletions src/story_tests/reference_misc_listing.robot
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ Created Reference Should Show As Human Readable Text
Go To References List Page
${normal}= Run Keyword And Return Status Element Should Be Visible id=view_normal_format
Run Keyword If ${normal} Click Normal Button If Shown
Page Should Contain Misc_Kirjoittaja
Page Should Contain Misc Kirjoittaja
Page Should Contain Kirjoitus
Page Should Contain Sanomalehti
Page Should Contain 1999
Page Should Not Contain Referenssi1


Created Reference Should Show As BibTex
Expand All @@ -26,7 +25,7 @@ Created Reference Should Show As BibTex
${bibtex}= Run Keyword And Return Status Element Should Be Visible id=view_bibtex_format
Run Keyword If ${bibtex} Click BibTex Button If Shown
Page Should Contain Referenssi1
Page Should Contain Misc_Kirjoittaja
Page Should Contain Misc Kirjoittaja
Page Should Contain Kirjoitus
Page Should Contain Sanomalehti
Page Should Contain 1999
Expand Down Expand Up @@ -74,7 +73,7 @@ Click Misc Submit

Set Misc Information
Set Name Referenssi1
Set Author Misc_Kirjoittaja
Set Author Misc Kirjoittaja
Set Title Kirjoitus
Set Howpublished Sanomalehti
Set Year 1999
8 changes: 4 additions & 4 deletions src/templates/new_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,19 @@ <h2>Creating misc type reference</h2>
<br>
<label for="author" class="col-sm-2 col-form-label col-form-label-sm">Author:</label>
<div class="col-sm-10">
<input type="text" name="author" minlength="2" maxlength="100" value="{{ request.form.get('author', '') }}" required>
<input type="text" pattern="^[a-zA-Z.,\s]*$" title="allowed: letters, spaces, '.' and ','" name="author" minlength="2" maxlength="1000" value="{{ request.form.get('author', '') }}" required>
</div>
<br>
<br>
<label for="title" class="col-sm-2 col-form-label col-form-label-sm">Title:</label>
<div class="col-sm-10">
<input type="text" name="title" minlength="2" maxlength="70" value="{{ request.form.get('title', '') }}" required>
<input type="text" name="title" minlength="2" maxlength="1000" value="{{ request.form.get('title', '') }}" required>
</div>
<br>
<br>
<label for="howpublished" class="col-sm-2 col-form-label col-form-label-sm">Howpublished:</label>
<div class="col-sm-10">
<input type="text" name="howpublished" minlength="2" maxlength="30" value="{{ request.form.get('howpublished', '') }}">
<input type="text" name="howpublished" minlength="2" maxlength="1000" value="{{ request.form.get('howpublished', '') }}">
</div>
<br>
<br>
Expand All @@ -279,7 +279,7 @@ <h2>Creating misc type reference</h2>
<br>
<label for="year" class="col-sm-2 col-form-label col-form-label-sm">Year:</label>
<div class="col-sm-10">
<input type="number" name="year" max="9999" required value="{{ request.form.get('year', '') }}">
<input type="number" name="year" min="1000", max="2024" required value="{{ request.form.get('year', '') }}">
</div>
<br>
<br>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/reference_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2>References</h2>
<script>console.log("{{ selected_references[0] }}", "selected")</script>
{% endif %}

<a type="button" class="btn btn-primary" href="/edit_reference/{{ reference[0] }}" name="new_reference" style="float: right;">
<a type="button" class="btn btn-primary" href="/edit_reference/{{ reference[0] }}" name="edit_reference" style="float: right;">
Edit
</a>
<form action="/delete_reference/{{ reference[0] }}" method="post" style="float: right; margin-right: 10px;">
Expand Down

0 comments on commit b353d8c

Please sign in to comment.