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

Modifying comments tests #27446

Merged
merged 12 commits into from
Mar 29, 2017
Merged

Modifying comments tests #27446

merged 12 commits into from
Mar 29, 2017

Conversation

SergioBertolinSG
Copy link
Contributor

Refactoring and preparation for adding more tests related with comments.

@mention-bot
Copy link

@SergioBertolinSG, thanks for your PR! By analyzing the history of the files in this pull request, we identified @PVince81, @DeepDiver1975 and @davitol to be potential reviewers.

@PVince81
Copy link
Contributor

Had a quick glance, looks good 👍

@mrow4a
Copy link
Contributor

mrow4a commented Mar 22, 2017

Awesome, lets make CommentsApp great again!

@SergioBertolinSG
Copy link
Contributor Author

This step is commented because it is failing:

https://github.com/owncloud/core/pull/27446/files#diff-6692878a78a86bbf0b3daf9e5e6522deR104

Raised here: #27455

@SergioBertolinSG SergioBertolinSG changed the title [WIP] Modifying comments tests Modifying comments tests Mar 22, 2017
@PVince81
Copy link
Contributor

17:58:15 --- FeatureContext has missing steps. Define them with these snippets:
17:58:15 
17:58:15     /**
17:58:15      * @Given As :arg1 sending :arg2 to :arg3 with
17:58:15      */
17:58:15     public function asSendingToWith($arg1, $arg2, $arg3, TableNode $table)
17:58:15     {
17:58:15         throw new PendingException();
17:58:15     }

@SergioBertolinSG
Copy link
Contributor Author

Apparently tags tests depended on a comments function. I have moved it there.
Tags will require the same changes as comments. But not to be done in this PR.

<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:set>
<d:prop>
<oc:message>'. $content .'</oc:message>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be safer to XML-encode this string to avoid injection.
Fortunately this is just test code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean escape? Is htmlspecialchars fine for this?

@PVince81
Copy link
Contributor

Fix the XML encode issue and this is good to go 👍

@SergioBertolinSG
Copy link
Contributor Author

The property {http://owncloud.org/ns}comments-unread is not being included.

Jenkins failure:

Traza

And the single response should contain a property "{http://owncloud.org/ns}comments-unread" with value "0":

Cannot find property "{http://owncloud.org/ns}comments-unread" with "0"

Seems to be a bug introduced in #27339

cc @mrow4a

@mrow4a
Copy link
Contributor

mrow4a commented Mar 28, 2017

@SergioBertolinSG Did you check this scenario "by hand" first? Why this scenario talks about folder if this is a file?

@SergioBertolinSG
Copy link
Contributor Author

I checked it locally and it returned only the other two properties.

@mrow4a
Copy link
Contributor

mrow4a commented Mar 28, 2017

Normal propfind works. Will look at it later, but this might not be working previously also, dont see a point in the code yet.

@mrow4a
Copy link
Contributor

mrow4a commented Mar 28, 2017

@SergioBertolinSG this should be separate PR to this branch, isnt it?

@SergioBertolinSG
Copy link
Contributor Author

@SergioBertolinSG this should be separate PR to this branch, isnt it?

Ok, that failing test the only thing stopping this Pr to be merged now.

@PVince81
Copy link
Contributor

@mrow4a please fix on this branch. CI will tell whether it was actually fixed.
Thanks

@mrow4a
Copy link
Contributor

mrow4a commented Mar 29, 2017

It occured, that when targeting single file with PROPFIND, it was returning null instead of 0, and requirement is to return the property. In web, it does not do propfinds to single files for unread, but this fix was needed anyways.

@PVince81
Copy link
Contributor

👍

@PVince81 PVince81 merged commit 4888a0c into master Mar 29, 2017
@PVince81 PVince81 deleted the modifying-comments-tests branch March 29, 2017 15:08
@lock
Copy link

lock bot commented Aug 3, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants