Since there are two different roles, these will end up as separate feature files:

- Logged in as an ordinary d.o user: create a new Forum post node. Verify there is not a file attachment field present [note that in D7 it might look different!!]. Logged in as a user with content admin permissions, verify that there is a file attachment field present.

Comments

eliza411’s picture

Project: Drupal.org Testing (.phar) » Drupal.org BDD
Component: Code » Feature/Scenarios

Moving to main project

pradeeprkara’s picture

Assigned: Unassigned » pradeeprkara
Issue tags: +sprint 5

tagging for sprint 5

pradeeprkara’s picture

Status: Active » Needs review

Created two feature files for users: site user and admin test

Please review the commit at: b404b8b

eliza411’s picture

Looks good except the the feature description in forum_file_uploads_siteuser.feature seems a bit off:

1 Feature:
2   In order to restrict unauthorized users from uploading files while creating a Forum Topic
3   As a site user
4   I need to be able to check file upload is not permitted

I'd be inclined to say what we're really testing is

Feature:
   In order to restrict unauthorized users from uploading files while creating a Forum Topic
   As a site admin
   I need to know that file upload is not permitted for auth users without elevated permission.
eliza411’s picture

Status: Needs review » Needs work

Setting to needs work.

pradeeprkara’s picture

Status: Needs work » Needs review

Updated feature description.

Please review at 3ef74af

pradeeprkara’s picture

Title: Forum file uploads » Forum file uploads (forum_file_uploads_siteuser.feature, forum_file_uploads_admin.feature)
eliza411’s picture

Component: Feature/Scenarios » Step definitions
Status: Needs review » Needs work

What's here looks good to me; since the actor is now a site admin, I take back what I said about two files, let's put them in one.

Add a scenario logged in as 'admin test' to ensure files can be uploaded and change the last line of the feature to match this:

I need to know that file upload is only permitted to users with Administer content.

(Unless you think two files is better)

pradeeprkara’s picture

Status: Needs work » Needs review
Issue tags: +sprint 6

I think merging the files would be good as we are running the same steps.

Modified and committed, Please review it at: http://drupalcode.org/project/doobie.git/blob/df093be:/features/project/forum_file_uploads_admin.feature

jhedstrom’s picture

Component: Step definitions » Feature/Scenarios

I didn't see any step-definition code to review, so changing the component to feature/scenarios.

eliza411’s picture

Status: Needs review » Reviewed & tested by the community

Setting to rtbc, then, so sdboyer can wrap this into the test suite.

eliza411’s picture

Status: Reviewed & tested by the community » Fixed

merged to master

alexpulido’s picture

Title: Forum file uploads (forum_file_uploads_siteuser.feature, forum_file_uploads_admin.feature) » Forum file uploads - forum_file_uploads.feature
Version: » 6.x-1.x-dev

Updated title
File was moved to drupalorg folder in commit http://drupalcode.org/project/doobie.git/commit/88a1251

alexpulido’s picture

Tagged all forums tests with @forums so they can be run as a feature set. http://drupalcode.org/project/doobie.git/commit/79c4450

tvn’s picture

Issue tags: +forums

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pradeeprkara’s picture