-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add integration tests for comments #22511
Conversation
By analyzing the blame information on this pull request, we identified @SergioBertolinSG, @MorrisJobke and @DeepDiver1975 to be potential reviewers |
Given user "user0" exists | ||
And As an "user0" | ||
And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" | ||
And "User0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" |
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.
Indentation 🙊
e22fbfb
to
13253a5
Compare
And the response should contain a property "oc:actorDisplayName" with value "user1" | ||
And the response should contain only "1" comments | ||
Then As "user1" delete the created comment it should return "204" | ||
Then As "user1 load all the comments of the file named "/myFileToComment.txt" it should return "207" |
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.
missing "
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.
Good catch 😄
b9a9956
to
d3636d7
Compare
I think the base of the gherkin syntax is being forgotten lately, 'given' for preconditions, 'when' for the actual test and 'then' for expected postconditions. Here the scenarios doesn't have a when statement. |
d3636d7
to
f33ee86
Compare
@SergioBertolinSG Mind taking another look? THX. |
f33ee86
to
acf81bc
Compare
And the response should contain a property "oc:message" with value "My first comment" | ||
And the response should contain a property "oc:actorDisplayName" with value "user1" | ||
And the response should contain only "1" comments | ||
Then As "user0" edit the last created comment and set text to "My edited comment" it should return "403" |
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.
newline ;)
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.
Done 😄
👍 cool stuff! |
Nice 👍 |
This adds integration tests for the comments. Especially with regard to the permission handling, didn't find any problem in it. Fixes #22367
9bb5b46
to
16be9af
Compare
…ments Add integration tests for comments
Thank you. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This adds integration tests for the comments. Especially with regard to the permission handling, time to add automated security integration tests to our APIs.
It's not the super nicest approach but it works 😉
Fixes #22367
cc @MorrisJobke @DeepDiver1975 Please review.