Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Comment Test #205

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions functional_tests/driver_tests/test_text_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,7 @@ def test_comment_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_empty_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -620,8 +619,7 @@ def test_comment_empty_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_null_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -630,8 +628,7 @@ def test_comment_null_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == 'None'
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_numeric_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -640,8 +637,7 @@ def test_comment_numeric_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == '1234'
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_json_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -650,8 +646,7 @@ def test_comment_json_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == str(commentText)
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_object_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -660,8 +655,7 @@ def test_comment_object_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == str(commentText)
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_rich_text_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -670,8 +664,7 @@ def test_comment_rich_text_on_save_exact(helpers):
comments.comment(commentText, rich_text=True)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == True
assert editedRecord["Comments"] in (None, [])

def test_comment_rich_text_false_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -680,8 +673,7 @@ def test_comment_rich_text_false_on_save_exact(helpers):
comments.comment(commentText, rich_text=False)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == False
assert editedRecord["Comments"] in (None, [])

def test_comment_rich_text_not_bool_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand Down
Loading