In the Git tests, we see that a project creator can init, push and pull to repos. We need to see that the Write to VCS permission grants the right permissions to a non-owner.
We need to add tests for the other pemission to this issue
Feature: Add additional maintainers with appropriate permissions
In order to get help maintaining my project
As a project owner
I need to be able to add people to my project with appropriate permissions
Check the owner can
Add and delete maintainers
Assign Write to VCX, Edit project, Administer maintainers, Maintain issues
Feature: Co-maintain a project
In order to help maintain a project
As a non-owner
I need to be able to participate in accordance with the permissions I've been granted
Test the above for each permission set.
Comments
Comment #1
kssundar commentedThe project considered to test this feature will be mentioned as the "post title" parameter in yml file.
Taking this one.
Comment #2
kssundar commentedCould not find any step definitions to test "Write to VCS" functionality. I guess it includes git "add", "commit" and "push".
Currently I will skip this permission and continue with other permissions.
Comment #3
eliza411 commentedThere is no step definition specifically testing Write to VCS. It will require adding and committing locally, and the test will be a successful push.
Comment #4
eliza411 commentedUnassigning from me.
Comment #5
kssundar commentedCommitted to repo - http://drupalcode.org/project/doobie.git/commit/c8fbdcd
Only two features are committed.
project_maintainers_tab.feature - checks for contents and functionality on the page
project_maintainers_tab_edit.feature - assigns edit permission to maintainer and confirms the same
Please review the above two. After it is ok, then I will commit the features containing other permission checks.
Comment #6
kssundar commentedAdded the remaining features:
project_maintainers_tab_vcs.feature - assigns Write to VCS permission to maintainer and confirms the same (Worked for me only on VMware! )
project_maintainers_tab_issues.feature - assigns Administer issues permission to maintainer and confirms the same
project_maintainers_tab_releases.feature - assigns Administer releases to maintainer and confirms the same
project_maintainers_tab_maintainers.feature - assigns Administer maintainers to maintainer and confirms the same
Committed here - http://drupalcode.org/project/doobie.git/commit/9581b89
Comment #7
eliza411 commentedproject_maintainers_tab_edit.feature and project_maintainers_tab_vcs.feature are right, but all the other files are not using Unix-compatible line endings and need to be revised so they do.
The actual content of the files it looking great, although project_maintainers_tab_vcs.feature needs to clean up after itself so that the repository it creates is removed at the end of the scenario.
Comment #8
kssundar commentedtagging
Comment #9
kssundar commentedconverted to unix format and committed - http://drupalcode.org/project/doobie.git/commit/e6f8b59
The repository folder created locally will be removed by
@afterscenario@gitrepoComment #10
kssundar commentedAdded @gitrepo - http://drupalcode.org/project/doobie.git/commit/9778020
Comment #11
eliza411 commentedThis looks great for now and I'm moving along to code review, but I think that's going to need work because if the scenarios are run out of order, I see:
I'll be re-visiting the test data issue with sdboyer, but in the meantime, I doing a check that the value is present and throwing a pretty exception if it is not is in order.
I've tagged this issue with dependent scenarios and tagged each dependent scenario with @dependent.
Comment #12
kssundar commentedUpdated feature, step definitions and added exception messages where ever necessary and committed here - http://drupalcode.org/project/doobie.git/commit/e66f1b7
Comment #13
eliza411 commentedI'm getting prompted for the gituser password:
Comment #14
kssundar commentedYes, it is the same behaviour here as well. The step "I clone the repo" directly executes the repository url. We have to update it by breaking it and using gitwrapper somehow.
Comment #15
kssundar commentedThe git user password will not be prompted and the code fix is committed here - http://drupalcode.org/project/doobie.git/commit/80e72ef
Comment #16
eliza411 commentedLooks like good progress!
I fixed the spelling error in the exception and pushed it in 518efd6cc8732
If the repo doesn't initialize, we get some less-than-helpful text in the subsequent failures. Can you look into that?
Comment #17
kssundar commentedThe above output belongs to the issue #1706782: Profile (/user) and this still needs review! :)
I will update the featurecontext as suggested above.
Comment #18
kssundar commentedUpdated featurecontext with additional exception handling and committed here - http://drupalcode.org/project/doobie.git/commit/84fc619
Comment #19
eliza411 commentedI read comment number #15 and reviewed the commit it linked to: features/project/user_profile_projects_section.feature instead of features/project/project_maintainers_tab_vcs.feature ... now I know how I went astray.
So, regarding project_maintainers_tab_vcs.feature
The exceptions are much more helpful, and I'm seeing one of them in the third scenario.
It's consistently failing on the "I clone the repo" step as is #1706800: Edit profile tab(git_access_check.feature):
Additionally, there are some given/when/then issues.
In the first scenario, instead of:
which are both changing the state of the system, I would expect to see:
Likewise for the third scenario. Instead of:
I would expect to see something more like:
~
~
Comment #20
eliza411 commentedUnassigning - FYI, I automatically review anything that is set to needs review with a component of Feature/Scenario.
Comment #21
kssundar commentedUpdated feature according to the suggestions.
Regarding
a variable in gitwrapper got changed from "$pass" to "$argv". Changed this and committed as well.
http://drupalcode.org/project/doobie.git/commit/3cd80d8
Comment #22
kssundar commentedUpdated code to work with tag @clean_data.
http://drupalcode.org/project/doobie.git/commit/4c2b8a1
Comment #23
eliza411 commentedLooks ready for code review.
Comment #24
eliza411 commentedmerged to master
Comment #25
eliza411 commentedmarking fixed
Comment #27
kssundar commentedproject_maintainers_tab_vcs.feature needs 7.x update
Comment #28
kssundar commentedUpdated in 7.x branch - http://drupalcode.org/project/doobie.git/commit/5f92bb4
Comment #29
eliza411 commentedRemoved the @wip and failure tags - these are as ready as they can be until the D7 Drupal.org is ready for feedback.
Comment #30
eliza411 commentedComment #30.0
eliza411 commented.