Things to be tested for Training section of the Marketplace:

- /training page exists +
- sidebar navigation works
- links on top of the page "Events section" and "Global Training Days" work +
- "Marketplace guidelines" link works +
- anonymous users can't see "Add your listing link" and authenticated users can +
- when user creates/edits organization page - if he clicks "Request listing in the Training section" and saves:

  • new issue is automatically created in webmasters queue
  • user should see "Regarding training listing communicate with webmasters using this issue" on top of the organization node (only node authors and admins can see that message)
  • clicking "this issue" should open webmasters issue with title "Add [companyname] to Training section"

Comments

pradeeprkara’s picture

Assigned: Unassigned » sachin2dhoni
Issue tags: +sprint 10

assigning and tagging

@important
"Add your listing" is linked to http://drupal.org/node/add/organization instead of http://git6site.devdrupal.org/node/add/organization.

sachin2dhoni’s picture

Version: » 6.x-1.x-dev
Status: Active » Needs review
Issue tags: +sprint 11

Uploaded to dev branch.

Please check the commit log: be5f79f

eliza411’s picture

Component: Feature/Scenarios » Broken site
Status: Needs review » Reviewed & tested by the community

This looks good. I'm assigning to tvn to open an issue in the appropriate development queue for the known failure where an anonymous user sees the "Add your listing" link, which is not visible to anonymous on production and leads to an Access denied page:

@known_git6failure @anon
  Scenario: View right sidebar navigation                       # features/drupalorg/marketplace_training.feature:16
    Given I am on the homepage                                  # FeatureContext::thatIAmOnTheHomepage()
    When I visit "/training"                                    # FeatureContext::iVisit()
    Then I should see "Browse by country"                       # FeatureContext::assertPageContainsText()
    And I should see at least "10" links in the "right sidebar" # FeatureContext::iShouldSeeAtLeastLinksInThe()
    And I should not see the link "Add your listing"            # FeatureContext::iShouldNotSeeTheLink()
      The link Add your listing was present on http://git6site.devdrupal.org/training and was not supposed to be.
eliza411’s picture

This has also been cherry-picked into the 7.x branch.

eliza411’s picture

Assigned: sachin2dhoni » tvn

and ... actually assigning to tvn

tvn’s picture

"Add your listing" link for anonymous was fixed on d.o last week #1791128: Hide "Add your listing" button from anonymous users.

eliza411’s picture

Great, thanks! Adding a tag to retest after the next build so we can remove the known_git6failure tag.

kssundar’s picture

Component: Broken site » Feature/Scenarios
Assigned: tvn » sachin2dhoni
Status: Reviewed & tested by the community » Needs work

Ran this test on d.o and below is the report:

kssundar@DIN31003044 /D/setups/behat/working/doobie-dev (6.x-1.x-dev)
$ bin/behat features/drupalorg/marketplace_training.feature --tags=anon
Feature: Market place drupal training services
  In order to advertise the training sessions of my organization
  As an authenticated user
  I should be able to create the organization

  @anon
  Scenario: View training page                      # features\drupalorg\marketplace_training.feature:7
    Given I am on the homepage                      # FeatureContext::thatIAmOnTheHomepage()
    When I follow "Marketplace"                     # FeatureContext::clickLink()
    And I follow "Training"                         # FeatureContext::clickLink()
    Then I should see "Drupal training services"    # FeatureContext::assertPageContainsText()
    And I should see "For upcoming Trainings check" # FeatureContext::assertPageContainsText()

  @known_git6failure @anon
  Scenario: View right sidebar navigation                       # features\drupalorg\marketplace_training.
feature:15
    Given I am on the homepage                                  # FeatureContext::thatIAmOnTheHomepage()
    When I visit "/training"                                    # FeatureContext::iVisit()
    Then I should see "Browse by country"                       # FeatureContext::assertPageContainsText()

    And I should see at least "10" links in the "right sidebar" # FeatureContext::iShouldSeeAtLeastLinksIn
The()
      The page has less than '10' links in the region 'right sidebar'
    And I should not see the link "Add your listing"            # FeatureContext::iShouldNotSeeTheLink()

  @anon
  Scenario: View events section                                 # features\drupalorg\marketplace_training.
feature:23
    Given I am on "/training"                                   # FeatureContext::visit()
    When I follow "Events section"                              # FeatureContext::clickLink()
    Then I should see the heading "Upcoming events"             # FeatureContext::iShouldSeeTheHeading()
    And I should see the heading "Drupal Events Activity"       # FeatureContext::iShouldSeeTheHeading()
    And I should see the following <texts>                      # FeatureContext::iShouldSeeTheFollowingTe
xts()
      | texts                         |
      | User group meeting            |
      | Drupalcon                     |
      | Drupalcamp or Regional Summit |
      | Training (free or commercial) |
      The text 'Drupalcon' was not found

  @anon
  Scenario: Global training days that are currently running on the site # features\drupalorg\marketplace_t
raining.feature:36
    Given I am on "/training"                                           # FeatureContext::visit()
    When I follow "Global Training Days 2012"                           # FeatureContext::clickLink()
    Then I should see the heading "Learn Drupal: Global Training Days"  # FeatureContext::iShouldSeeTheHea
ding()
    And I should see "Global Training dates"                            # FeatureContext::assertPageContai
nsText()
    And I should see "We had another great Global Training Day"         # FeatureContext::assertPageContai
nsText()
      The text "We had another great Global Training Day" was not found anywhere in the text of the curren
t page.

  @anon
  Scenario: Marketplace guidelines list                                 # features\drupalorg\marketplace_t
raining.feature:44
    Given I am on "/training"                                           # FeatureContext::visit()
    When I follow "Marketplace guidelines"                              # FeatureContext::clickLink()
      Link with id|title|alt|text "Marketplace guidelines" not found.
    Then I should see the heading "Marketplace guidelines"              # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Drupal Services"                      # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Featured providers"                   # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Training"                             # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Hosting"                              # FeatureContext::iShouldSeeTheHea
ding()

5 scenarios (1 passed, 4 failed)
27 steps (17 passed, 6 skipped, 4 failed)
0m11.451s

Ran this on git6 as well:


kssundar@DIN31003044 /D/setups/behat/working/doobie-dev (6.x-1.x-dev)
$ bin/behat features/drupalorg/marketplace_training.feature --tags=anon
Feature: Market place drupal training services
  In order to advertise the training sessions of my organization
  As an authenticated user
  I should be able to create the organization

  @anon
  Scenario: View training page                      # features\drupalorg\marketplace_training.feature:7
    Given I am on the homepage                      # FeatureContext::thatIAmOnTheHomepage()
    When I follow "Marketplace"                     # FeatureContext::clickLink()
    And I follow "Training"                         # FeatureContext::clickLink()
    Then I should see "Drupal training services"    # FeatureContext::assertPageContainsText()
    And I should see "For upcoming Trainings check" # FeatureContext::assertPageContainsText()

  @known_git6failure @anon
  Scenario: View right sidebar navigation                       # features\drupalorg\marketplace_training.
feature:15
    Given I am on the homepage                                  # FeatureContext::thatIAmOnTheHomepage()
    When I visit "/training"                                    # FeatureContext::iVisit()
    Then I should see "Browse by country"                       # FeatureContext::assertPageContainsText()

    And I should see at least "10" links in the "right sidebar" # FeatureContext::iShouldSeeAtLeastLinksIn
The()
      The page has less than '10' links in the region 'right sidebar'
    And I should not see the link "Add your listing"            # FeatureContext::iShouldNotSeeTheLink()

  @anon
  Scenario: View events section                                 # features\drupalorg\marketplace_training.
feature:23
    Given I am on "/training"                                   # FeatureContext::visit()
    When I follow "Events section"                              # FeatureContext::clickLink()
    Then I should see the heading "Upcoming events"             # FeatureContext::iShouldSeeTheHeading()
    And I should see the heading "Drupal Events Activity"       # FeatureContext::iShouldSeeTheHeading()
    And I should see the following <texts>                      # FeatureContext::iShouldSeeTheFollowingTe
xts()
      | texts                         |
      | User group meeting            |
      | Drupalcon                     |
      | Drupalcamp or Regional Summit |
      | Training (free or commercial) |
      The text 'Drupalcon' was not found

  @anon
  Scenario: Global training days that are currently running on the site # features\drupalorg\marketplace_t
raining.feature:36
    Given I am on "/training"                                           # FeatureContext::visit()
    When I follow "Global Training Days 2012"                           # FeatureContext::clickLink()
    Then I should see the heading "Learn Drupal: Global Training Days"  # FeatureContext::iShouldSeeTheHea
ding()
    And I should see "Global Training dates"                            # FeatureContext::assertPageContai
nsText()
    And I should see "We had another great Global Training Day"         # FeatureContext::assertPageContai
nsText()
      The text "We had another great Global Training Day" was not found anywhere in the text of the curren
t page.

  @anon
  Scenario: Marketplace guidelines list                                 # features\drupalorg\marketplace_t
raining.feature:44
    Given I am on "/training"                                           # FeatureContext::visit()
    When I follow "Marketplace guidelines"                              # FeatureContext::clickLink()
      Link with id|title|alt|text "Marketplace guidelines" not found.
    Then I should see the heading "Marketplace guidelines"              # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Drupal Services"                      # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Featured providers"                   # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Training"                             # FeatureContext::iShouldSeeTheHea
ding()
    And I should see the heading "Hosting"                              # FeatureContext::iShouldSeeTheHea
ding()

5 scenarios (1 passed, 4 failed)
27 steps (17 passed, 6 skipped, 4 failed)
0m24.447s
sachin2dhoni’s picture

Status: Needs work » Needs review

As per comment #8,we can see the failed cases because there are text changes after rebuilt/refresh of git6.

Updated to dev branch with the consistent data.

Please check the commit log:6f5f04d

tvn’s picture

Status: Needs review » Needs work

The page has less than '10' links in the region 'right sidebar'

Last week we did some changes to Marketplace and emptied "Locations" field for everyone, it will take some time for companies to update their pages. In the future I'm sure we'll have over 10 links there.

The text 'Drupalcon' was not found

It was changed to DrupalCon yesterday.

The text "We had another great Global Training Day" was not found anywhere in the text of the current page.

The text above the map is changing all the time, it's more safe to test for the text right below the map (e.g. Drupal Global Training Days is an initiative by the Drupal Association to introduce new and beginning users to Drupal.). This one might change too someday, but shouldn't anytime soon.

Link with id|title|alt|text "Marketplace guidelines" not found.

Only authenticated users can now see "Add your listing" button and guidelines link on /training page.

tvn’s picture

Status: Needs work » Needs review

cross post :)

sachin2dhoni’s picture

Made some minor modifications in the feature(marketplace_training.feature) file for reusability.

Also added @retest-after-next-build tag as the user login are not working in git 6 currently

Updated to dev branch.

Please check the commit log:8d946f1

eliza411’s picture

Assigned: sachin2dhoni » tvn

Removed retest tags from files. Retest after next build should be tagged on the issue.
I think this looks done. tvn might want to review more closely.

http://drupalcode.org/project/doobie.git/commit/57d268f

sachin2dhoni’s picture

Title: Marketplace tests: Training section » Marketplace tests: Training section(marketplace_training.feature)

Updating the title with file name.

tvn’s picture

Assigned: tvn » Unassigned
Status: Needs review » Needs work
Issue tags: +marketplace

I moved tests related to page creation to marketplace_organization.feature and did some small changes to the file.
http://drupalcode.org/project/doobie.git/commit/5c878ec

This file needs:
1. Check that organizations actually shown on the page.
Similar to services scenario (http://drupalcode.org/project/doobie.git/blob/5c878ec:/features/drupalor...) - "Then I should see at least 10 records".

2. Scenario similar to this one (http://drupalcode.org/project/doobie.git/blob/5c878ec:/features/drupalor...) to open org page and check it has training provider message on top

3. If possible test somehow that sidebar navigation actually works, as in list changes when you choose specific country.

sachin2dhoni’s picture

Assigned: Unassigned » sachin2dhoni
Status: Needs work » Needs review
Issue tags: +sprint 16

Updated to 6.x branch and implemented new scenarios as per comment 15.

Please check the commit log:
http://drupalcode.org/project/doobie.git/commit/90f43f9

tvn’s picture

"Scenario: See a paged list of training providers"
"+ When I click on page "2"" should be changed to page "last", because we are adding more and more companies to the Training section, so page 2 will not be the last one for too long.

I am sorry, my point 2. in comment #15 was not clear. I was linking to scenario starting on line 87

87 Scenario: View service provider from Featured section
88 Given I am on "/drupal-services"
89 And I follow "Featured providers"
90 When I follow Featured providers title post
91 Then I should see "This organization is a Featured services provider."

So similar scenario only with last line "This organization is a Drupal training provider." is needed instead of

+  Scenario Outline: Visit marketplace training links and view corresponding headings
+    Given I am on "/training"
+    When I follow "<link>"
+    Then I should be on "<url>"
+    And I should see the heading "<heading>"
+
+    Examples:
+    | link           | url                        | heading        |
+    | Acquia         | /marketplace/acquia        | Acquia         |
+    | BuildAModule   | /node/1765802              | BuildAModule   |
+    | Chapter Three  | /marketplace/chapter-three | Chapter Three  |
+    | Commerce Guys  | /marketplace/commerce-guys | Commerce Guys  |
+    | Druler         | /node/1791714              | Druler         |

Last scenario in the file looks good.

tvn’s picture

Status: Needs review » Needs work
sachin2dhoni’s picture

Status: Needs work » Needs review

Updated to 6x branch with the changes.

Please check the commit log:
http://drupalcode.org/project/doobie.git/commit/2358bdf

tvn’s picture

Looks good. I only modified scenario description and changed number of required records for the last page, as it can be less than 5.
http://drupalcode.org/project/doobie.git/commit/7f94272

sachin2dhoni’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue tags: +sprint 17
eliza411’s picture

Status: Needs review » Reviewed & tested by the community

Ready as this can be until D7 Drupal.org is ready for feedback.

eliza411’s picture

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

Updated css selectors to D7

eliza411’s picture

Issue summary: View changes

.