-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #1171
- Loading branch information
Showing
7 changed files
with
188 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+22 KB
...ument/UC01_view_document/UC01_T08_display_inline_csv_table/_assets/sandbox1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions
32
...d2end/screens/document/UC01_view_document/UC01_T08_display_inline_csv_table/document.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[DOCUMENT] | ||
TITLE: Document 1 | ||
|
||
[REQUIREMENT] | ||
STATEMENT: >>> | ||
.. csv-table:: | ||
|
||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
<<< |
31 changes: 31 additions & 0 deletions
31
...view_document/UC01_T08_display_inline_csv_table/test_UC01_T08_display_inline_csv_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
|
||
from seleniumbase import BaseCase | ||
|
||
from tests.end2end.helpers.screens.project_index.screen_project_index import ( | ||
Screen_ProjectIndex, | ||
) | ||
from tests.end2end.server import SDocTestServer | ||
|
||
path_to_this_test_file_folder = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
|
||
class Test_UC01_T08_DisplayInlineCSVTable(BaseCase): | ||
def test_01(self): | ||
with SDocTestServer( | ||
input_path=path_to_this_test_file_folder | ||
) as test_server: | ||
self.open(test_server.get_host_and_port()) | ||
|
||
screen_document_tree = Screen_ProjectIndex(self) | ||
|
||
screen_document_tree.assert_on_screen() | ||
screen_document_tree.assert_contains_document("Document 1") | ||
|
||
screen_document = screen_document_tree.do_click_on_first_document() | ||
|
||
screen_document.assert_on_screen_document() | ||
screen_document.assert_header_document_title("Document 1") | ||
screen_document.assert_not_empty_document() | ||
|
||
screen_document.assert_no_js_and_404_errors() |
36 changes: 36 additions & 0 deletions
36
...equirement/UC07_T04_editing_statement_with_csv_inline_table/expected_output/document.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[DOCUMENT] | ||
TITLE: Document 1 | ||
|
||
[FREETEXT] | ||
Hello world! | ||
[/FREETEXT] | ||
|
||
[REQUIREMENT] | ||
STATEMENT: >>> | ||
.. csv-table:: | ||
|
||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
<<< |
11 changes: 11 additions & 0 deletions
11
...C07_edit_requirement/UC07_T04_editing_statement_with_csv_inline_table/input/document.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[DOCUMENT] | ||
TITLE: Document 1 | ||
|
||
[FREETEXT] | ||
Hello world! | ||
[/FREETEXT] | ||
|
||
[REQUIREMENT] | ||
STATEMENT: >>> | ||
Requirement statement. | ||
<<< |
77 changes: 77 additions & 0 deletions
77
..._statement_with_csv_inline_table/test_UC07_T04_editing_statement_with_csv_inline_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
from seleniumbase import BaseCase | ||
|
||
from tests.end2end.end2end_test_setup import End2EndTestSetup | ||
from tests.end2end.helpers.screens.document.form_edit_requirement import ( | ||
Form_EditRequirement, | ||
) | ||
from tests.end2end.helpers.screens.project_index.screen_project_index import ( | ||
Screen_ProjectIndex, | ||
) | ||
from tests.end2end.server import SDocTestServer | ||
|
||
|
||
STATEMENT_WITH_INLINE_CSV = """ | ||
.. csv-table:: | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
a,b,c,d | ||
e,f,g,h | ||
e,f,g,h | ||
""" | ||
|
||
|
||
class Test_UC07_T04_EditingStatementWithInlineCSV(BaseCase): | ||
def test_01(self): | ||
test_setup = End2EndTestSetup(path_to_test_file=__file__) | ||
|
||
with SDocTestServer( | ||
input_path=test_setup.path_to_sandbox | ||
) as test_server: | ||
self.open(test_server.get_host_and_port()) | ||
|
||
screen_project_index = Screen_ProjectIndex(self) | ||
|
||
screen_project_index.assert_on_screen() | ||
screen_project_index.assert_contains_document("Document 1") | ||
|
||
screen_document = screen_project_index.do_click_on_first_document() | ||
|
||
screen_document.assert_on_screen_document() | ||
screen_document.assert_header_document_title("Document 1") | ||
screen_document.assert_text("Hello world!") | ||
|
||
requirement = screen_document.get_requirement() | ||
form_edit_requirement: Form_EditRequirement = ( | ||
requirement.do_open_form_edit_requirement() | ||
) | ||
|
||
form_edit_requirement.assert_on_form() | ||
form_edit_requirement.do_fill_in_field_statement( | ||
STATEMENT_WITH_INLINE_CSV | ||
) | ||
|
||
form_edit_requirement.do_form_submit() | ||
|
||
# screen_document.assert_text("Modified statement.") | ||
|
||
assert test_setup.compare_sandbox_and_expected_output() |