Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_payment
2
Feature: Manage payment accounts
3
 
4
  @javascript
5
  Scenario: Creating and editing payment account
6
    When I log in as "admin"
7
    And I navigate to "Payments > Payment accounts" in site administration
8
    And I follow "Manage payment gateways"
9
    Then "Australian Dollar" "text" should exist in the "PayPal" "table_row"
10
    And I follow "Payment accounts"
11
    And I press "Create payment account"
12
    And I set the field "Account name" to "TestAccount"
13
    And I press "Save changes"
14
    And I should see "PayPal" in the "TestAccount" "table_row"
15
    And I open the action menu in "TestAccount" "table_row"
16
    And I choose "Edit" in the open action menu
17
    And I set the field "Account name" to "NewName"
18
    And I press "Save changes"
19
    And I should not see "TestAccount"
20
    And I should see "PayPal" in the "NewName" "table_row"
21
 
22
  @javascript
23
  Scenario: Configuring gateways on payment accounts
24
    Given the following "core_payment > payment accounts" exist:
25
      | name           |
26
      | Account1       |
27
      | Account2       |
28
    When I log in as "admin"
29
    And I navigate to "Payments > Payment accounts" in site administration
30
    Then I should see "Not available" in the "Account1" "table_row"
31
    And I click on "PayPal" "link" in the "Account1" "table_row"
32
    And I set the field "Brand name" to "Test paypal"
33
    And I set the following fields to these values:
34
      | Brand name | Test paypal |
35
      | Client ID  | Test        |
36
      | Secret     | Test        |
37
      | Enable     | 1           |
38
    And I press "Save changes"
39
    And I should not see "Not available" in the "Account1" "table_row"
40
    And I should see "PayPal" in the "Account1" "table_row"
41
 
42
  @javascript
43
  Scenario: Deleting payment accounts
44
    Given the following "core_payment > payment accounts" exist:
45
      | name           |
46
      | Account1       |
47
      | Account2       |
48
    When I log in as "admin"
49
    And I navigate to "Payments > Payment accounts" in site administration
50
    And I open the action menu in "Account1" "table_row"
51
    And I choose "Delete or archive" in the open action menu
52
    And I click on "Yes" "button" in the "Confirm" "dialogue"
53
    Then I should not see "Account1"
54
    And I should see "Account2"
55
 
56
  @javascript
57
  Scenario: Archiving and restoring accounts
58
    Given the following "users" exist:
59
      | username |
60
      | user1    |
61
    And the following "core_payment > payment accounts" exist:
62
      | name           |
63
      | Account1       |
64
      | Account2       |
65
    And the following "core_payment > payments" exist:
66
      | account  | component | amount | user  |
67
      | Account1 | test      | 10     | user1 |
68
      | Account1 | test      | 15     | user1 |
69
    When I log in as "admin"
70
    And I navigate to "Payments > Payment accounts" in site administration
71
    And I open the action menu in "Account1" "table_row"
72
    And I choose "Delete or archive" in the open action menu
73
    And I click on "Yes" "button" in the "Confirm" "dialogue"
74
    Then I should not see "Account1"
75
    And I should see "Account2"
76
    And I follow "Show archived"
77
    And I should see "Archived" in the "Account1" "table_row"
78
    And I open the action menu in "Account1" "table_row"
79
    And I choose "Restore" in the open action menu
80
    And I should not see "Archived" in the "Account1" "table_row"
81
    And I log out