Skip to content

Commit

Permalink
Revert "Updates Comment Test (#205)" (#206)
Browse files Browse the repository at this point in the history
This reverts commit ede3d34.
  • Loading branch information
Vishmishra8 authored Aug 13, 2024
1 parent ede3d34 commit 19c3b11
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions functional_tests/driver_tests/test_text_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ def test_comment_on_save_exact(helpers):
comments.comment(commentText)
theRecord.save()
editedRecord = pytest.app.records.get(id=theRecord.id)
assert editedRecord["Comments"] in (None, [])
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == False

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

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

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

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

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

def test_comment_rich_text_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -664,7 +670,8 @@ 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"] in (None, [])
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == True

def test_comment_rich_text_false_on_save_exact(helpers):
theRecord = pytest.app.records.create(**{"Required Text": "required"})
Expand All @@ -673,7 +680,8 @@ 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"] in (None, [])
assert editedRecord['Comments'][-1].message == commentText
assert editedRecord['Comments'][-1].is_rich_text == False

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

0 comments on commit 19c3b11

Please sign in to comment.