dorsale 3.14.4 → 3.14.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/features/access.feature +17 -0
  4. data/features/billing_machine_invoices.feature +261 -0
  5. data/features/billing_machine_multiple_vat.feature +53 -0
  6. data/features/billing_machine_payment_terms.feature +19 -0
  7. data/features/billing_machine_quotations.feature +193 -0
  8. data/features/customer_vault_activity_types.feature +19 -0
  9. data/features/customer_vault_corporations.feature +95 -0
  10. data/features/customer_vault_filters.feature +14 -0
  11. data/features/customer_vault_individuals.feature +35 -0
  12. data/features/customer_vault_invoices.feature +10 -0
  13. data/features/customer_vault_links.feature +54 -0
  14. data/features/customer_vault_origins.feature +19 -0
  15. data/features/customer_vault_people.feature +25 -0
  16. data/features/customer_vault_search.feature +22 -0
  17. data/features/customer_vault_tasks.feature +35 -0
  18. data/features/expense_gun_categories.feature +19 -0
  19. data/features/expense_gun_expenses.feature +60 -0
  20. data/features/flyboy_task_comments.feature +21 -0
  21. data/features/flyboy_tasks.feature +122 -0
  22. data/features/flyboy_tasks_summary.feature +22 -0
  23. data/features/step_definitions/access_steps.rb +15 -0
  24. data/features/step_definitions/alexandrie_steps.rb +25 -0
  25. data/features/step_definitions/billing_machine_invoices_steps.rb +377 -0
  26. data/features/step_definitions/billing_machine_multiple_vat.rb +19 -0
  27. data/features/step_definitions/billing_machine_payment_terms_steps.rb +42 -0
  28. data/features/step_definitions/billing_machine_quotations_steps.rb +248 -0
  29. data/features/step_definitions/common_steps.rb +91 -0
  30. data/features/step_definitions/customer_vault_activity_types_steps.rb +42 -0
  31. data/features/step_definitions/customer_vault_corporations_steps.rb +218 -0
  32. data/features/step_definitions/customer_vault_filters_steps.rb +37 -0
  33. data/features/step_definitions/customer_vault_individuals_steps.rb +67 -0
  34. data/features/step_definitions/customer_vault_invoices_steps.rb +7 -0
  35. data/features/step_definitions/customer_vault_links_steps.rb +73 -0
  36. data/features/step_definitions/customer_vault_origins_steps.rb +42 -0
  37. data/features/step_definitions/customer_vault_people_steps.rb +26 -0
  38. data/features/step_definitions/customer_vault_search_steps.rb +48 -0
  39. data/features/step_definitions/customer_vault_tasks_steps.rb +34 -0
  40. data/features/step_definitions/expense_gun_categories_steps.rb +50 -0
  41. data/features/step_definitions/expense_gun_expenses_steps.rb +135 -0
  42. data/features/step_definitions/flyboy_task_comments_steps.rb +10 -0
  43. data/features/step_definitions/flyboy_tasks_steps.rb +196 -0
  44. data/features/step_definitions/tasks_summary_steps.rb +30 -0
  45. data/features/step_definitions/users_management_step.rb +29 -0
  46. data/features/support/env.rb +8 -0
  47. data/features/users_management.feature +18 -0
  48. data/lib/dorsale/version.rb +1 -1
  49. data/spec/controllers/dorsale/alexandrie/attachments_controller_spec.rb +145 -0
  50. data/spec/controllers/dorsale/billing_machine/invoices_controller_spec.rb +153 -0
  51. data/spec/controllers/dorsale/billing_machine/quotations_controller_spec.rb +24 -0
  52. data/spec/controllers/dorsale/comments_controller_spec.rb +50 -0
  53. data/spec/controllers/dorsale/customer_vault/events_controller_spec.rb +42 -0
  54. data/spec/controllers/dorsale/customer_vault/people_controller_spec.rb +129 -0
  55. data/spec/controllers/dorsale/expense_gun/expenses_controller_spec.rb +55 -0
  56. data/spec/controllers/dorsale/flyboy/task_comments_controller_spec.rb +40 -0
  57. data/spec/controllers/dorsale/flyboy/tasks_controller_spec.rb +349 -0
  58. data/spec/factories/alexandrie_attachment_types.rb +5 -0
  59. data/spec/factories/alexandrie_attachments.rb +16 -0
  60. data/spec/factories/billing_machine_invoice_lines.rb +9 -0
  61. data/spec/factories/billing_machine_invoices.rb +9 -0
  62. data/spec/factories/billing_machine_payment_terms.rb +5 -0
  63. data/spec/factories/billing_machine_quotation_lines.rb +9 -0
  64. data/spec/factories/billing_machine_quotations.rb +9 -0
  65. data/spec/factories/customer_vault_activity_types.rb +5 -0
  66. data/spec/factories/customer_vault_corporations.rb +13 -0
  67. data/spec/factories/customer_vault_event.rb +13 -0
  68. data/spec/factories/customer_vault_individuals.rb +17 -0
  69. data/spec/factories/customer_vault_links.rb +7 -0
  70. data/spec/factories/customer_vault_origins.rb +5 -0
  71. data/spec/factories/dorsale_addresses.rb +9 -0
  72. data/spec/factories/dorsale_comments.rb +7 -0
  73. data/spec/factories/expense_gun_categories.rb +7 -0
  74. data/spec/factories/expense_gun_expense_lines.rb +11 -0
  75. data/spec/factories/expense_gun_expenses.rb +13 -0
  76. data/spec/factories/flyboy_task_comments.rb +9 -0
  77. data/spec/factories/flyboy_tasks.rb +8 -0
  78. data/spec/files/avatar.png +0 -0
  79. data/spec/files/pdf.pdf +0 -0
  80. data/spec/mailers/user_mailer_spec.rb +21 -0
  81. data/spec/models/dorsale/address_spec.rb +46 -0
  82. data/spec/models/dorsale/alexandrie/attachment_spec.rb +36 -0
  83. data/spec/models/dorsale/alexandrie/attachment_type_spec.rb +11 -0
  84. data/spec/models/dorsale/billing_machine/invoice_line_spec.rb +52 -0
  85. data/spec/models/dorsale/billing_machine/invoice_spec.rb +258 -0
  86. data/spec/models/dorsale/billing_machine/quotation_line_spec.rb +51 -0
  87. data/spec/models/dorsale/billing_machine/quotation_spec.rb +213 -0
  88. data/spec/models/dorsale/billing_machine_spec.rb +57 -0
  89. data/spec/models/dorsale/comment_spec.rb +24 -0
  90. data/spec/models/dorsale/customer_vault/activity_type_spec.rb +10 -0
  91. data/spec/models/dorsale/customer_vault/corporation_spec.rb +33 -0
  92. data/spec/models/dorsale/customer_vault/event_spec.rb +22 -0
  93. data/spec/models/dorsale/customer_vault/individual_spec.rb +44 -0
  94. data/spec/models/dorsale/customer_vault/link_spec.rb +14 -0
  95. data/spec/models/dorsale/customer_vault/origin_spec.rb +8 -0
  96. data/spec/models/dorsale/customer_vault/person_spec.rb +112 -0
  97. data/spec/models/dorsale/email_spec.rb +39 -0
  98. data/spec/models/dorsale/expense_gun/category_spec.rb +9 -0
  99. data/spec/models/dorsale/expense_gun/expense_line_spec.rb +53 -0
  100. data/spec/models/dorsale/expense_gun/expense_spec.rb +176 -0
  101. data/spec/models/dorsale/flyboy/task_comment_spec.rb +54 -0
  102. data/spec/models/dorsale/flyboy/task_spec.rb +254 -0
  103. data/spec/models/dorsale/i18n_spec.rb +30 -0
  104. data/spec/models/dorsale/users_spec.rb +65 -0
  105. data/spec/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf_spec.rb +42 -0
  106. data/spec/pdfs/dorsale/billing_machine/invoice_single_vat_pdf_spec.rb +42 -0
  107. data/spec/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf_spec.rb +42 -0
  108. data/spec/pdfs/dorsale/billing_machine/quotation_single_vat_pdf_spec.rb +55 -0
  109. data/spec/pdfs/dorsale/expense_gun/expense_pdf_spec.rb +11 -0
  110. data/spec/rails_helper.rb +57 -0
  111. data/spec/routing/dorsale/alexandrie/attachments_routing_spec.rb +32 -0
  112. data/spec/routing/dorsale/billing_machine/invoices_routing_spec.rb +67 -0
  113. data/spec/routing/dorsale/billing_machine/quotations_routing_spec.rb +67 -0
  114. data/spec/routing/dorsale/comments_routing_spec.rb +23 -0
  115. data/spec/routing/dorsale/customer_vault/activity_types_routing_spec.rb +40 -0
  116. data/spec/routing/dorsale/customer_vault/events_routing_spec.rb +12 -0
  117. data/spec/routing/dorsale/customer_vault/origins_routing_spec.rb +40 -0
  118. data/spec/routing/dorsale/customer_vault/people_routing_spec.rb +109 -0
  119. data/spec/routing/dorsale/expense_gun/expenses_routing_spec.rb +62 -0
  120. data/spec/routing/dorsale/flyboy/task_comments_routing_spec.rb +11 -0
  121. data/spec/routing/dorsale/flyboy/tasks_routing_spec.rb +51 -0
  122. data/spec/routing/dorsale/users_routing_spec.rb +38 -0
  123. data/spec/services/dorsale/billing_machine/quotation/copy_spec.rb +55 -0
  124. data/spec/services/dorsale/billing_machine/quotation/statistics.rb +23 -0
  125. data/spec/services/dorsale/billing_machine/quotation/to_invoice_spec.rb +46 -0
  126. data/spec/services/dorsale/expense_gun/expense/copy_spec.rb +83 -0
  127. data/spec/services/dorsale/flyboy/task/copy_spec.rb +24 -0
  128. data/spec/services/dorsale/flyboy/task/snoozer_spec.rb +117 -0
  129. data/spec/spec_helper.rb +86 -0
  130. data/spec/support/devise.rb +3 -0
  131. data/spec/support/message_delivery.rb +5 -0
  132. metadata +258 -2
@@ -0,0 +1,19 @@
1
+ @javascript
2
+ Feature: People Activity types
3
+
4
+ Scenario: New activity type
5
+ Given an authenticated user
6
+ And the user goes on the new activity type page
7
+ When he fills the activity type's information
8
+ And creates a new activity type
9
+ Then he is redirected on the activity types page
10
+ And the activity type is added to the activity types list
11
+
12
+ Scenario: Update activity type
13
+ Given an authenticated user
14
+ And an existing activity type
15
+ When I edit the activity type
16
+ Then the current activity type's name should be pre-filled
17
+ When he validates the new activity type
18
+ Then he is redirected on the activity types page
19
+ And the activity type's label is updated
@@ -0,0 +1,95 @@
1
+ @javascript
2
+ Feature: Manage corporations
3
+ As a user
4
+ I want to edit corporations
5
+ In order to track oppotunities of business
6
+
7
+ Background:
8
+ Given an authenticated user
9
+
10
+ Scenario: New corporation
11
+ When I create an new corporation
12
+ And I add the corporation's informations
13
+ And I fill the corporation's address
14
+ And I fill the corporation capital, immatriculation, legal form
15
+ And I validate the new corporation
16
+ Then the corporation is created
17
+ And I am on the corporation page
18
+
19
+ Scenario: Delete a corporation
20
+ Given an existing corporation
21
+ When I go on this corporation
22
+ And I delete this corporation
23
+ Then the corporation is deleted
24
+ And I am on the people page
25
+
26
+ Scenario: Add tags
27
+ Given an existing corporation
28
+ When I edit this corporation
29
+ And I add tags to this corporation
30
+ And I submit this corporation
31
+ Then tags are added
32
+
33
+ Scenario: Remove tags
34
+ Given an existing corporation with tags
35
+ When I edit this corporation
36
+ And I remove tags to this corporation
37
+ And I submit this corporation
38
+ Then tags are removed
39
+
40
+ Scenario: Pagination corporation by 25
41
+ Given 40 existing corporations
42
+ When I go on the corporate index
43
+ Then he can see 25 corporate
44
+ When he goes on the next page
45
+ Then he can see 15 corporate
46
+
47
+ Scenario: New person without name
48
+ When I create an new corporation
49
+ And I fill the corporation's address
50
+ And I validate the new corporation
51
+ Then i see an error message for the missing name
52
+
53
+ Scenario: Add a comment to a corporation
54
+ Given an existing corporation
55
+ When I go on this corporation
56
+ And I add a comment on the person
57
+ Then I am on the corporation page
58
+ And I see my new comment on the person
59
+
60
+ Scenario: Update comment on a corporation
61
+ Given an existing corporation
62
+ And an existing comment on this corporation
63
+ When I go on this corporation
64
+ And I update the comment on the person
65
+ Then I am on the corporation page
66
+ And I see my updated comment on the person
67
+
68
+ Scenario: Delete comment on a corporation
69
+ Given an existing corporation
70
+ And an existing comment on this corporation
71
+ When I go on this corporation
72
+ And I delete the comment on the person
73
+ Then I am on the corporation page
74
+ And I see do not see my comment on the person
75
+
76
+ Scenario: People activity
77
+ Given an existing individual with recent comments
78
+ Given an existing corporation with recent comments
79
+ When I go on the people activity
80
+ Then I see all these comments
81
+
82
+ Scenario: People activity pagination
83
+ Given an existing corporation with 150 comments
84
+ When I go on the people activity
85
+ Then I see these comments paginated
86
+
87
+ Scenario: Context
88
+ Given an existing corporation
89
+ And an open task to this corporation
90
+ And a closed task to this corporation
91
+ And an existing individual
92
+ And a link between this individual and this corporation
93
+ When I go on this corporation
94
+ Then I see only the open task in the context
95
+ And I see the link in the context
@@ -0,0 +1,14 @@
1
+ @javascript
2
+ Feature: Filter people
3
+ Background:
4
+ Given an authenticated user
5
+
6
+ Scenario: Filter by tags
7
+ Given an existing corporation with tags hello and world
8
+ And an other existing corporation with tags hello and goodbye
9
+ And an other existing corporation with tag yeah
10
+ When I go the to people list
11
+ And I filter with tag hello
12
+ Then only first and second corporation appear
13
+ When I add the second tag world
14
+ Then only the first corporation appear
@@ -0,0 +1,35 @@
1
+ @javascript
2
+ Feature: Manage individuals
3
+ As a user
4
+ I want to edit individuals
5
+ In order to follow up on the relationship
6
+
7
+ Background:
8
+ Given an authenticated user
9
+
10
+ Scenario: New individual
11
+ When I create an new individual
12
+ And I add his first_name, last_name and email
13
+ And I fill the address
14
+ And I validate the new individual
15
+ Then the individual is created
16
+
17
+ Scenario: New individual without individual
18
+ When I create an new individual
19
+ And I fill the address
20
+ And I validate the new individual
21
+ Then i see an error message for the missing names
22
+
23
+ Scenario: Add tags
24
+ Given an existing individual
25
+ When I edit this individual
26
+ And I add tags to this individual
27
+ And I submit this individual
28
+ Then tags are added
29
+
30
+ Scenario: Remove tags
31
+ Given an existing individual with tags
32
+ When I edit this individual
33
+ And I remove tags to this individual
34
+ And I submit this individual
35
+ Then tags are removed
@@ -0,0 +1,10 @@
1
+ @javascript
2
+ Feature: People invoices
3
+ Background:
4
+ Given an authenticated user
5
+
6
+ Scenario: List person invoices
7
+ Given an existing corporation
8
+ And this corporation has an invoice
9
+ When he go on he corporation invoices page
10
+ Then he should see 1 invoices
@@ -0,0 +1,54 @@
1
+ @javascript
2
+ Feature: Manage links
3
+ As a user
4
+ I want to edit links
5
+ In order to identify the people responsible for corporations
6
+
7
+ Background:
8
+ Given an authenticated user
9
+
10
+ Scenario: Add a new link on individual
11
+ Given an existing corporation
12
+ And an existing individual
13
+ When I navigate to the link section of the indidual details
14
+ And I add a new link to the individual
15
+ And I provide the link and the target corporation
16
+ And I validate the link
17
+ Then the new link is displayed
18
+
19
+ Scenario: Edit a link on individual
20
+ Given an existing link
21
+ When I navigate to the link section of the indidual details
22
+ And I edit the link
23
+ And I change the title
24
+ And I validate the link
25
+ Then the edited link is displayed
26
+
27
+ Scenario: Delete a link on individual
28
+ Given an existing link
29
+ When I navigate to the link section of the indidual details
30
+ And I delete the link
31
+ Then the targeted link is removed
32
+
33
+ Scenario: Add a new link on corporation
34
+ Given an existing corporation
35
+ And an existing individual
36
+ When I navigate to the link section of the corporation details
37
+ And I add a new link to the corporation
38
+ And I provide the link and the target individual
39
+ And I validate the link
40
+ Then the new link is displayed
41
+
42
+ Scenario: Edit a link on corporation
43
+ Given an existing link
44
+ When I navigate to the link section of the corporation details
45
+ And I edit the link
46
+ And I change the title
47
+ And I validate the link
48
+ Then the edited link is displayed
49
+
50
+ Scenario: Delete a link on corporation
51
+ Given an existing link
52
+ When I navigate to the link section of the corporation details
53
+ And I delete the link
54
+ Then the targeted link is removed
@@ -0,0 +1,19 @@
1
+ @javascript
2
+ Feature: People Origins
3
+
4
+ Scenario: New origin
5
+ Given an authenticated user
6
+ And the user goes on the new origin page
7
+ When he fills the origin's information
8
+ And creates a new origin
9
+ Then he is redirected on the origins page
10
+ And the origin is added to the origin list
11
+
12
+ Scenario: Update origin
13
+ Given an authenticated user
14
+ And an existing origin
15
+ When I edit the origin
16
+ Then the current origin's name should be pre-filled
17
+ When he validates the new origin
18
+ Then he is redirected on the origins page
19
+ And the origin's label is updated
@@ -0,0 +1,25 @@
1
+ @javascript
2
+ Feature: People
3
+ Background:
4
+ Given an authenticated user
5
+
6
+ Scenario: Export people
7
+ Given an existing individual
8
+ Given an existing corporation
9
+ When I go the to people list
10
+ And I export people list
11
+ Then the file is downloaded
12
+
13
+ Scenario: Activity truncated comment
14
+ Given an existing individual
15
+ And a very long comment on this person
16
+ When I go on the people activity
17
+ Then I see the truncated comment
18
+ When I click on show more
19
+ Then I see the full comment
20
+
21
+ Scenario: Activity not truncated comment
22
+ Given an existing individual
23
+ And a short comment on this person
24
+ When I go on the people activity
25
+ Then I see the full comment
@@ -0,0 +1,22 @@
1
+ @javascript
2
+ Feature: People search
3
+ Background:
4
+ Given an authenticated user
5
+ Given existing individuals
6
+ And existing corporations
7
+ When he go to the people list
8
+
9
+ Scenario: Search individual by first name
10
+ When he search an individual by first name
11
+ Then this individual appear in search results
12
+ And other individuals do not appear in search results
13
+
14
+ Scenario: Search individual by last name
15
+ When he search an individual by last name
16
+ Then this individual appear in search results
17
+ And other individuals do not appear in search results
18
+
19
+ Scenario: Search corporation by name
20
+ When he search a corporation by name
21
+ Then this corporation appear in search results
22
+ And other corporations do not appear in search results
@@ -0,0 +1,35 @@
1
+ @javascript
2
+ Feature: Create tasks on people
3
+ Background:
4
+ Given an authenticated user
5
+
6
+ Scenario: Add a task to a corporation
7
+ Given an existing corporation
8
+ When I go on this corporation
9
+ And I go on the tasks section
10
+ And I create a task on this person
11
+ Then the person task is created
12
+ When I go on this corporation
13
+ And I go on the tasks section
14
+ Then the task appear
15
+ When I go on the general tasks page
16
+ Then the task appear
17
+
18
+ Scenario: Add a task to an individual
19
+ Given an existing individual
20
+ When I go on this individual
21
+ And I go on the tasks section
22
+ And I create a task on this person
23
+ Then the person task is created
24
+ When I go on this individual
25
+ And I go on the tasks section
26
+ Then the task appear
27
+ When I go on the general tasks page
28
+ Then the task appear
29
+
30
+ Scenario: Filter tasks on an individual
31
+ Given an existing individual
32
+ When I go on this individual
33
+ And I go on the tasks section
34
+ And I filter tasks
35
+ Then I an redirected on the tasks tab
@@ -0,0 +1,19 @@
1
+ @javascript
2
+ Feature: Expense Categories
3
+
4
+ Scenario: New expense category
5
+ Given an authenticated user
6
+ And the user goes on the new expense category page
7
+ When he fills the category's information
8
+ And creates a new expense category
9
+ Then he is redirected on the expense categories page
10
+ And the category is added to the category list
11
+
12
+ Scenario: Update expense category
13
+ Given an authenticated user
14
+ And an existing expense category
15
+ When I edit the expense category
16
+ Then the current expense category's label should be pre-filled
17
+ When he validates the new expense category
18
+ Then he is redirected on the expense categories page
19
+ And the expense category's label is updated
@@ -0,0 +1,60 @@
1
+ @javascript
2
+ Feature: Expenses
3
+ Background:
4
+ Given an authenticated user
5
+ And an existing expense category
6
+
7
+ Scenario: Create expense
8
+ When I go on the expenses page
9
+ Then I see 0 expense
10
+ When I create a new expense
11
+ Then the expense is created
12
+ And I am redirected on the expense page
13
+ And I see 2 expense lines
14
+ When I go on the expenses page
15
+ Then I see 1 expense
16
+
17
+ Scenario: Update expense
18
+ Given an existing expense
19
+ When I go on the expenses page
20
+ Then I see 1 expense
21
+ When I update the expense
22
+ Then the expense is update
23
+ And I am redirected on the expense page
24
+
25
+ Scenario: Copy expense
26
+ Given an existing expense
27
+ When I go on the expense page
28
+ When I copy the expense
29
+ Then an expense copy is created
30
+ And I am redirected on the expense page
31
+
32
+ Scenario: Submit expense
33
+ Given an existing expense
34
+ When I go on the expense page
35
+ And I submit the expense
36
+ Then I am redirect to the expenses page
37
+ And the expense state is "submitted"
38
+
39
+ Scenario: Cancel expense
40
+ Given an existing expense
41
+ When I go on the expense page
42
+ And I cancel the expense
43
+ Then I am redirect to the expenses page
44
+ And the expense state is "canceled"
45
+
46
+ Scenario: Accept expense
47
+ Given an existing expense
48
+ And the expense is submitted
49
+ When I go on the expense page
50
+ And I accept the expense
51
+ Then I am redirect to the expense page
52
+ And the expense state is "accepted"
53
+
54
+ Scenario: Refuse expense
55
+ Given an existing expense
56
+ And the expense is submitted
57
+ When I go on the expense page
58
+ And I refuse the expense
59
+ Then I am redirect to the expenses page
60
+ And the expense state is "refused"
@@ -0,0 +1,21 @@
1
+ @javascript
2
+ Feature: Manage task comments
3
+ Background:
4
+ Given an authenticated user
5
+
6
+ Scenario: Create a comment
7
+ Given an existing task
8
+ When I go to the tasks section
9
+ When I consult this task
10
+ And I create a new task comment
11
+ Then I am on this task
12
+ And the task comment is created
13
+
14
+ Scenario: Increment task comment progress JS
15
+ Given an existing task
16
+ When I go to the tasks section
17
+ And I consult this task
18
+ And I fill "task_comment_progress" with "0"
19
+ Then "task_comment_progress" has value "0"
20
+ When I click on "+5"
21
+ Then "task_comment_progress" has value "5"