This is a complicated area ... I've attached a patch that gets the test into the Gherkin format and adjusts the business value in the feature. I know you're not done here, and if the patch doesn't apply cleanly, just ignore it and mark this issue as needs review when you're ready.

Next Steps

The patch in comment #9 needs to be tested & committed, then this issue needs to be "postponed (maintainer needs more info) until comment #6 is resolved.

Comments

eliza411’s picture

Issue tags: +sprint 1

tagging for sprint 1 - there's a lot involved and this may split into multiple files

Let's ensure what's here follows best practices. It may need to move into sprint 2 for actual completion.

pradeeprkara’s picture

Out of the sub tabs of user dashboard, the scenarios for Your Posts and Your Commits have already been written, another issue is already there for Your Issues. If wanted we can integrate some scenarios from that issue.

Now the pending items are:
Dashboard main tab (working on this)
Your Projects (Create Project is already done, listing remaining)
Profile

feature files will have the name : user_dashboard_{tab name}.feature

if the file for dashboard becomes too bulky, we can further split it based on the region.

Please update if you have any different view.

eliza411’s picture

Project: Drupal.org Testing (.phar) » Drupal.org BDD
Component: Code » Tests

At this time, I don't have a better plan. I am opening more issues today from jhodgdon that I think also touch on the dashboard but may not have time to link them in ... maybe you can keep an eye out for them and make this the Meta issue with links to any related issues you've found?

I am going to move this into the main project and that will put all our work in a single place.

pradeeprkara’s picture

Issue tags: -sprint 1 +sprint 2

I have identified the below cases for dashboard tab only.

1. Add a block to Dashboard
2. Check the count of records in a block
3. Check the position of a block on dashboard
Eg: I should see the box "Your Post" in the "first" column "1" in position "2"
4. Check column is empty
5. Check column is not empty
6. Change the number of items to display from settings link (the settings icon)
7. Close the box
8. Check a list of boxes in a column
9. Dragging the box to a different column and verify the new position(not sure this is possible, need to explore)
10. Check the existence of other links like Make this your Homepage, Your Posts etc.

As the steps seem to be complex, not sure we can cover all of them in sprint 2, if not completed we can consider it with sprint 3

Please let me know if any comments.

pradeeprkara’s picture

Tried Drag n Drop for dashboard but it is not working as expected. I tried with dragTo() method as below:

Case 1:
$page = $this->getSession()->getPage();
//draggable div
$drag = $page->find('css', '#homebox-block-aggregator_category-2');
// container to drop
$drop = $page->find('css','#homebox-column-3');
$drag->dragTo($drop);

Here $drop is an object of the container to which I am dropping.

Case 2:
// the div onto which trying to drag:
$drop = $page->find('homebox-block-drupalorg_news_drupal-news');
$drag->dragTo($drop);

Here $drop is an object of the container to which I am dropping.

I tried with both Selenium and Sahi but no luck.

Any pointers?

pradeeprkara’s picture

Title: Feature: User Dashboard (user_dashboard.feature) » Feature: User Dashboard (user_dashboard_main.feature, user_dashboard_add_block.feature, user_dashboard_drag.feature)
Status: Active » Needs review
StatusFileSize
new21.65 KB

As we don't have any clue on the Drag n Drop issue, completed the other cases on User dashboard tab and created a patch.

ps: user_dashboard_drag.feature is the one related to drag n drop

pradeeprkara’s picture

Separate issues exist for User dashboard sub-tabs:

Your Project: http://drupal.org/node/1712286
Your Commits: http://drupal.org/node/1706768
Your Profile http://drupal.org/node/1706782
Your Posts http://drupal.org/node/1570016
Your Issues http://drupal.org/node/1705566

pradeeprkara’s picture

The patch in comment #6 has a duplicate function, instead, the attached patch can be used.

pradeeprkara’s picture

Updated with Given that I am on the homepage step.

senpai’s picture

Issue tags: +sprint 3

Bumping forward into Sprint 3.

pradeeprkara’s picture

Senpai,

As different issues have been created for Your Dashboard subtabs, we have included some of them in sprint 3:
They are :
http://drupal.org/node/1712286 - Your Projects
http://drupal.org/node/1706768 - Your Commits
http://drupal.org/node/1706782 - Profile
http://drupal.org/node/1705566 - Your Issues (already submitted a patch)

What is pending in user dashboard tab is the Drag N Drop feature and as we didn't get any solution for that we don't need this issue to be included in sprint 3.

eliza411’s picture

I concur. Testing drag and drop should wait until next sprint.

senpai’s picture

Patch in comment #9 needs to be tested & committed, then this issue needs to be "postponed (maintainer needs more info) until #5 is resolved.

pradeeprkara’s picture

Issue tags: -sprint 3

excluding from sprint 3

eliza411’s picture

Assigned: pradeeprkara » eliza411

This is the third issue that hasn't applied cleanly because of:

Checking patch features/bootstrap/FeatureContext.php...
error: while searching for:
  }else
    throw new Exception("No options/texts specified");
  }
}

There's plenty to clarify on this, and additionally by the time I have, then we'll probably have this issue fixed too. Assigning to me to sort out.

eliza411’s picture

Status: Needs review » Needs work

Setting to "Needs work"

pradeeprkara’s picture

Issue tags: +sprint 4

tagging for sprint 4

pradeeprkara’s picture

Status: Needs work » Needs review
StatusFileSize
new23.82 KB

Updated the feature files,

As drag n drop doesn't work , tagged it as @wip.

Probably the error in #15 may be due to the later updates in the branch.

Recreated the patch and attached here.

pradeeprkara’s picture

Component: Tests » Environment setup
Issue tags: +sprint 6

copied the step definitions from patch to dev after code clean up

eliza411’s picture

I don't immediately see what commit this references. Can you point me in the right direction?

eliza411’s picture

Component: Environment setup » Step definitions
Assigned: eliza411 » Unassigned
Status: Needs review » Needs work

Updating meta data.

eliza411’s picture

Component: Step definitions » Feature/Scenarios

and again ... setting to feature/scenarios so I'll see it when I know where to look.

pradeeprkara’s picture

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

Cleaned up some of the step definitions.
Combined some step definitions by removing extra/duplicate functions.

Modified background steps.

Please review the commit: d9a79b7

eliza411’s picture

Status: Needs review » Needs work

merged to master, but I think this has scenarios that need to be tagged dependent on preceding scenarios.

eliza411’s picture

features/project/user_dashboard_main.feature has one consistently failing scenario ... it appears that "Your posts" is not on the page when the scenario begins and so it cannot be closed.

  Scenario: Check Close icon of the block # features/project/user_dashboard_main.feature:67
    When I close the block "Your Posts"   # FeatureContext::iCloseTheBlockFromDashboard()
      The block "Your Posts" cannot be found.
    Then I should not see the block       # FeatureContext::iShouldNotSeeTheBlock()
pradeeprkara’s picture

Version: » 6.x-1.x-dev
Assigned: Unassigned » pradeeprkara

This must be an issue related to #1796150: All tests of feeds fails on first cold run and succeeds after as it passes for me.

Marked the scenario as @flaky for now : ba348e0

pradeeprkara’s picture

Title: Feature: User Dashboard (user_dashboard_main.feature, user_dashboard_add_block.feature, user_dashboard_drag.feature) » Feature: User Dashboard - user_dashboard_main.feature, user_dashboard_add_block.feature
Status: Needs work » Needs review
Issue tags: +sprint 11

Added And I wait till the page is loaded to resolve intermittent timeout failures.Please review and report if any issues.
d73bb3c, 0661c21

eliza411’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

I updated the language to use the more formal "until" instead of 'till', updated the feature to better reflect business value and removed the @wip and @flaky tags. I also added I should not see 'Access denied' to the known failure since it better reflects the bug being encountered there.

Can you open a bug report that includes the specific steps to reproduce the problem in this queue and assign it to Senpai so he can move it to the right development queue? (Does this problem exist on production?)

I've marked this with the best status we have to indicate that this needs porting to the D7 branch, which I tried, but wasn't able to sort out at the moment.

pradeeprkara’s picture

I tried to manually replicate the error but it works fine now; same with production. But I am sure that I got the same error on production once. I''ll try once again and update here.

pradeeprkara’s picture

Status: Patch (to be ported) » Needs review
Issue tags: +sprint 14

The changes have been ported to D7 branch.

eliza411’s picture

Status: Needs review » Needs work

I'm getting failures on D6 and D7 and it looks like, on D6 anyway, it's a problem with the test. Can you look into it?

:   Scenario: View the block: Your Posts                                                            # features/drupalorg/user_dashboard_main.feature:59
    Then I should see the block "Your Posts" in column "2"                                        # FeatureContext::iShouldSeeTheBlockInColumn()
    And I should see at least "3" items in block "Your Posts"                                     # FeatureContext::iShouldSeeAtLeastItemsInBlock()
      The block: Your Posts has only less than 3 items
    And I should see the following <icons> on the block "Your Posts"                              # FeatureContext::iShouldSeeTheFollowingOnTheBlock()
      | icons    |
      | Settings |
      | Close    |

  Scenario: Change number of items to show in a block                                               # features/drupalorg/user_dashboard_main.feature:67
    When I change the setting "Number of posts to show:" to "3" for the block "Your Posts" and save # FeatureContext::iChangeTheSettingToForTheBlockAndSave()
    Then I should see at least "3" items in block "Your Posts"                                      # FeatureContext::iShouldSeeAtLeastItemsInBlock()
      The block: Your Posts has only less than 3 items

  Scenario: Close the block                                                                         # features/drupalorg/user_dashboard_main.feature:71
    When I close the block "Your Posts"                                                             # FeatureContext::iCloseTheBlockFromDashboard()
    Then I should not see the block                                                                 # FeatureContext::iShouldNotSeeTheBlock()

7 scenarios (5 passed, 2 failed)
65 steps (62 passed, 1 skipped, 2 failed)
pradeeprkara’s picture

Status: Needs work » Needs review

Yes, Your post block was empty.

Added an extra scenario to create test issues for test_releases test project.

As "/node/add/project-issue/test_releases" is not loading at git7site, added an extra step And I should not see "Access denied" specifically for git7 and marked git7 failing scenarios as @known_git7failure

Please review the commits:
6e8b544, 24e6505

eliza411’s picture

Status: Needs review » Postponed

Looks like a great improvement! It would read better if we could create "x" issues, but we can pick that up when we work on the 7.x branch. I'm postponing this until the code base catches up and removing wip from the 6.x since these appear reliable.

http://drupal.org/node/1545884/commits

pradeeprkara’s picture

Status: Postponed » Needs review
Issue tags: +sprint 18

Create issue page at git7site is broken and the corresponding scenario has been marked as @known_git7failure

This is ported to git7.

Follow up #1846588: Update dashboard feature files for some more updates

http://drupalcode.org/project/doobie.git/commit/7b6954d
http://drupalcode.org/project/doobie.git/commit/5a67215
http://drupalcode.org/project/doobie.git/commit/3882a52

eliza411’s picture

Status: Needs review » Reviewed & tested by the community

I think these are as far as they can go until D7 Drupal.org is ready for feedback.

eliza411’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Failing in appropriate places based on functionality

eliza411’s picture

Issue summary: View changes

Adding a Next Steps section