Closed (fixed)
Project:
Drupal.org Testing (.phar)
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
19 Jul 2012 at 10:35 UTC
Updated:
4 Jan 2014 at 02:05 UTC
Jump to comment: Most recent
Write feature files for Manage Documentation at http://drupal.org/documentation/manage.
This View is for Docs maintainers / admins to check status of pages.
Comments
Comment #1
kssundar commentedHave written scenarios and committed the same to repo.
I am facing a problem with Scenario Outline and dropdown values. The following scenario fails and not able to figure out why :(
I have similar scenarios for other dropdowns in the same page as well. All are failing.
Only the first value from the dropdown gets passes and the rest fail.
Comment #2
kssundar commentedI found the problem. This is what happens:
"Background:" gets called before every Scenario. In background, I am currently checking whether "Access denied" message is visible or not when user is on "/documentation/manage". For every scenario the following happens:
1. Check for "Access denied" text
2. Click on login / register link
3. user sees login page
4. enters login credentials
5. gets redirected to "/documentation/manage" page
Because the user sessions do not persist on every scenario, the above 5 steps pass out.
But in case of "Scenario Outline", even though each "Example" is executed as a Scenario, user session does not get cleared and it persists. When the user session persists, the check in "Background:" fails and the rest of the steps gets skipped.
Hope I am clear :)
Comment #3
kssundar commentedThis issue is fixed now! This is what i did according to the suggestion by Ryan:
We modified the current login logic to something that was suggested in yesterdays training.
Feature file: docs_management.feature
FeatureContext.php
The above code will first check if the user is already logged in and if not then it will go to Login page and login the user.
As we are going to follow "Log in / Register" link, the link itself contains the 'destination' variable and hence we need not navigate back to the source page.
The updated code is in repo now.
Comment #4
eliza411 commentedSweet. Let's review this for best practices and submit to doobie.
Comment #5
kssundar commentedUpdated with minor modifications.
Comment #6
kssundar commentedUpdated the title to include feature file name.
Feature submitted to Doobie and can be seen here #1699794: Write feature files for Manage Documentation (docs_management.feature).
Marking fixed and we will follow up in Doobie.