This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
added test-cases for adding comment #83
Open
virtus80
wants to merge
6
commits into
jtalks-org:master
Choose a base branch
from
virtus80:upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c5432d5
added test-cases for adding coment
virtus80 c7aff3c
Revert "added test-cases for adding coment"
virtus80 1451430
added test-cases for adding comment
virtus80 cee9e11
changed intents in test description
virtus80 715692c
Add class name into capabilities for saucelabs
ctapobep 9f836f9
Merge remote-tracking branch 'refs/remotes/jtalks-org/master' into up…
virtus80 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ class ArticleManagementTest extends Specification { | |
def 'article title positive cases'() { | ||
given: 'user is created and logged in' | ||
when: "user creates an article with $caseName" | ||
then: 'article should not get created' | ||
then: 'article should get created' | ||
where: | ||
caseName | articleTitle | messageIfCaseFailed | ||
'Min boundary' | randomAlphabetic(1) | 'Could not create article with min title boundary' | ||
|
@@ -33,7 +33,7 @@ class ArticleManagementTest extends Specification { | |
Users.signIn(); | ||
when: "user creates an article with $caseName" | ||
Article article = Articles.create(new Article(content: articleContent)) | ||
then: 'article should not get created' | ||
then: 'article should get created' | ||
Articles.assertArticleExists(article, messageIfCaseFailed) | ||
where: | ||
caseName | articleContent | messageIfCaseFailed | ||
|
@@ -105,5 +105,30 @@ class ArticleManagementTest extends Specification { | |
'second' | $randomLanguage | 'Could not create second translation of article' | ||
'same language' | 'English' | 'Could not create translation of article on same language' | ||
} | ||
|
||
def 'comment adding positive cases'() { | ||
given: 'user is created and logged in' | ||
and: 'article is created and opened' | ||
when: "user creates a comment with $caseName" | ||
then: 'comment should be added' | ||
where: | ||
caseName | commentLength | messageIfCaseFailed | ||
'Min boundary' | randomAlphabetic(1) | 'Could not create comment with min length boundary' | ||
'Max boundary' | randomAlphabetic(65535) | 'Could not create comment with max length boundary' | ||
'Average length'| randomAlphabetic(3000) | 'Could not create comment of average length' | ||
} | ||
|
||
def 'comment adding negative cases'() { | ||
given: 'user is created and logged in' | ||
and: 'article is created and opened' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here. |
||
when: "user creates a comment with $caseName" | ||
then: 'validation error should be shown' | ||
where: | ||
caseName | commentLength | messageIfCaseFailed | ||
'Empty comment' | '' | 'Empty comment was possible to create while this is not allowed'' | ||
'Too long comment' | randomAlphabetic(65536) | 'It was possible to create a comment with too long length' | ||
'Spaces in comment'| ' ' | 'Comment with only spaces should not be allowed!' | ||
} | ||
|
||
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pay attention to formatting