Issue fork cloud-3226097

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yutong.li created an issue. See original summary.

yutong.li’s picture

Status: Active » Needs work
yutong.li’s picture

Issue summary: View changes

yutong.li credited yas.

yutong.li’s picture

yutong.li’s picture

Status: Needs work » Active

yutong.li’s picture

Status: Active » Needs review
yas’s picture

Status: Needs review » Needs work

@yutong.li

Thank you for adding the test scenarios. I posted my comment above. Please check the ones. Thanks!

kumikoono’s picture

@Yutong, it looks good to me. Thanks for your work!

yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Needs work

@yutong.li

Thank you for updating the test case scenarios. I found the test case includes a validation of some specific string Cloud Orchestrator, which is defined in the admin's configuration on Drupal Core. So Drupal Core shows that string, not from cloud module.

yas’s picture

@yutong.li

I learned that Behat has Scenario Outlines. So I updated my above comment. To handle the testing environment specific strings, I think we can add placeholder(s) <...> and the section Examples:. For example:

  Scenario Outline: Log in with the "Anonymous user" role
    Given I am not logged in
    When I go to "/"
    Then I should get a 200 HTTP response
    And I should see the heading <site name>
    And I should see the link "Log in"

  Examples:
    | site name |
    | {{site name}} |

I think we can preprocess our own magic string such as {{...}}, so that{{site name}} can be replaced to Cloud Orchestrator on runtime (by using a sed command or some other tool. Or, if we can directly place an environment variable of a shell into Examples: section like BEHAT_PARAMS towards behat.yml, that would be better.

yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Reviewed & tested by the community

@youtong.li

Thank you for the update. It looks perfect now. I'll merge the patch to 4.x branch and close this issue as Fixed.

yas’s picture

Status: Reviewed & tested by the community » Needs work

@yutong.li

Since we merged the patch at #3224987: Set up behat to cloud module for BDD, could you please rebase your patch? Thanks!

yutong.li’s picture

Status: Needs work » Needs review
yutong.li’s picture

Status: Needs review » Needs work
yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Needs work

@yutong.li

Thank you for the update. I think the filename start with a capital letter, so it can be: LoginLogout.feature in this case. Thanks!

yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

Title: Write a BDD test suite for login/logout » Add a BDD test suite for login/logout
Status: Needs review » Reviewed & tested by the community

@yutong.li

Thank you for the update. It looks good to me now. I'll merge the patch to 4.x and close this issue as Fixed.

  • yas committed 17fbeaa on 4.x authored by yutong.li
    Issue #3226097 by yutong.li, yas, kumikoono: Add a BDD test suite for...

yas’s picture

Status: Fixed » Closed (fixed)

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