Skip to content

Modifying comments tests - #27446

Merged
PVince81 merged 12 commits into
masterfrom
modifying-comments-tests
Mar 29, 2017
Merged

Modifying comments tests#27446
PVince81 merged 12 commits into
masterfrom
modifying-comments-tests

Conversation

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

Refactoring and preparation for adding more tests related with comments.

@mention-bot

Copy link
Copy Markdown

@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
Copy Markdown
Contributor

Had a quick glance, looks good 👍

@mrow4a

mrow4a commented Mar 22, 2017

Copy link
Copy Markdown
Contributor

Awesome, lets make CommentsApp great again!

@SergioBertolinSG

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@SergioBertolinSG
SergioBertolinSG force-pushed the modifying-comments-tests branch from 9e6e493 to 62f6d25 Compare March 28, 2017 09:17
@SergioBertolinSG

Copy link
Copy Markdown
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

mrow4a commented Mar 28, 2017

Copy link
Copy Markdown
Contributor

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

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

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

@mrow4a

mrow4a commented Mar 28, 2017

Copy link
Copy Markdown
Contributor

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

mrow4a commented Mar 28, 2017

Copy link
Copy Markdown
Contributor

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

@SergioBertolinSG

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@mrow4a

mrow4a commented Mar 29, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

lock Bot commented Aug 3, 2019

Copy link
Copy Markdown

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