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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8372b119f5f7ad79c78207829c4e457abab0fd86b94ea49bb207f3c39797cf35
4
- data.tar.gz: 3bc16388c1bbfa63749dea80ae0a01313f211bb36acbffd26dd65556fd6dd44a
3
+ metadata.gz: 64ed8f65abd6ae12d960fe88cc17c321b7838660d09d206bc79f7b234e984ac3
4
+ data.tar.gz: 0247c7a10d86060d9f869e0659254506de509de49e0d591e086f4a750f7db739
5
5
  SHA512:
6
- metadata.gz: 89dc489710be6e6670a03dd27ebe44893e0d5cade0f8f18c8295f4f6c5e5fc9bce85ab3351933a12cbf5b67c8121412b5de7f86386b5a13a0fa85cf8199dae3c
7
- data.tar.gz: 43a52f9f94543894e3eaac4f5382f11fe9690780528bd42ebb35ea2ae9dd0baacaa2b41dd69baf48e892da9bc5a16369fead81e56baf5d97641578b5d72b5fdd
6
+ metadata.gz: 734d3ea40626c063c7afe6c713f7e43d4934b27554a513898eb072cf9222ac48b3159f546de818c6c436367dbc86fef4f63c2b954892db24c5b5910aab0c1a51
7
+ data.tar.gz: e73667d0999d746a7d5dfb16ab07abb77c2dae0a410c98d0b0b621d16b6d646fcd45c3e8a1a3ccc31f4cf88068b8d3b5cd754204d3ef8921e35ec76f5b552491
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 3.14.5
6
+ - Restore test files in gemspec
7
+
5
8
  ## 3.14.4
6
9
  - Expenses : add PDF export
7
10
 
@@ -0,0 +1,17 @@
1
+ @javascript
2
+ Feature: Users
3
+ As a user
4
+ I want to access the application
5
+ In order to use it
6
+
7
+ Scenario: Active user can login
8
+ Given an active user
9
+ When he try to access to the application
10
+ Then a message signal that's the user is logged
11
+
12
+ Scenario: Inactive user cant login
13
+ Given an inactive user
14
+ When he try to access to the application
15
+ Then an error message signal that's account is inactive
16
+
17
+
@@ -0,0 +1,261 @@
1
+ @javascript
2
+ Feature: Invoice Management
3
+ As a user
4
+ I want to create invoices
5
+ In order to get paid!
6
+
7
+ Background:
8
+ Given an authenticated user
9
+ Given billing machine in single vat mode
10
+
11
+ Scenario: Existing invoice displayed in invoices page
12
+ And an existing customer
13
+ And an existing invoice
14
+ When the user goes to the invoices page
15
+ And the invoice line shows the right date
16
+ And the invoice line shows the right traking-id
17
+ And the invoice line shows the right customer's name
18
+ And the invoice line shows the right total excluding taxes value
19
+ And the invoice line shows the right total including taxes value
20
+
21
+ Scenario: Paginate by 50 invoices
22
+ Given 75 existing invoices
23
+ When the user goes to the invoices page
24
+ Then he should see 50 invoices
25
+ When he goes on the next page
26
+ Then he should see 25 invoices
27
+
28
+ Scenario: Copy invoice
29
+ And an existing invoice
30
+ When the user goes to the invoice details
31
+ And wants to copy it
32
+ Then a new invoice is displayed with the informations
33
+
34
+ Scenario: Send invoice by email
35
+ Given an existing customer
36
+ And an existing invoice
37
+ When the user goes to the invoice details
38
+ And he send invoice to customer by email
39
+ Then an invoice is sent to customer
40
+
41
+ Scenario: Empty invoice
42
+ And an existing emtpy invoice
43
+ When the user goes to the invoices page
44
+ Then the invoice is displayed correctly
45
+
46
+ Scenario: Invoice details
47
+ And an existing invoice
48
+ When the user goes to the invoice details
49
+ Then he can see all the informations
50
+
51
+ Scenario: Invoice preview
52
+ When the user goes to the invoices page
53
+ And he creates a new invoice
54
+ And he click on the preview invoice button
55
+ Then he see the invoice preview
56
+ And no invoice is created
57
+
58
+ Scenario: New invoice for existing customer
59
+ And an existing customer
60
+ And an existing payment term
61
+ When the user goes to the invoices page
62
+ And he creates a new invoice
63
+ And he fills the reference, the date, the vat rate and the payment terms
64
+ And he chooses the customer
65
+ And he fills a line with "Bidule", "4", "€", "10"
66
+ Then the new line total is "40,00"
67
+ And the total excluding taxes is "40,00"
68
+ When he adds a new line
69
+ And he fills a line with "Machin truc", "8", "€", "20"
70
+ Then the new line total is "160,00"
71
+ And he fill the commercial discount with "20,00"
72
+ Then the total excluding taxes is "180,00"
73
+ And the VAT due is "36,00"
74
+ And the total including taxes is "216,00"
75
+ When he saves the invoice
76
+ Then a message signals the success of the creation
77
+ Then it's added to the invoice list
78
+
79
+ Scenario: Edit invoice
80
+ And an existing invoice
81
+ When the user goes to the invoice details
82
+ And he goes on the edit page of the invoice
83
+ And changes the label
84
+ When he saves the invoice
85
+ Then a message signals the success of the update
86
+ Then the invoices's label has changed
87
+
88
+ Scenario: New invoice with advance and commercial discount
89
+ When the user goes to the invoices page
90
+ And he creates a new invoice
91
+ And he fills a line with "Bidule", "1", "€", "100"
92
+ Then the total including taxes is "120,00"
93
+ And the advance is "0,00"€
94
+ And the commercial discount is "0,00"€
95
+ And the balance is "120,00"
96
+ When he changes the advance to "30"€
97
+ When he changes the commercial discount to "10"€
98
+ Then the balance is "78,00"
99
+ When he saves the invoice
100
+ Then a message signals the success of the creation
101
+ When he goes to the newly created invoice page
102
+ Then the advance is "30,00"€
103
+ Then the commercial discount is "10,00"€
104
+ Then the balance is "78,00"
105
+
106
+ Scenario: New invoice with default date
107
+ When the user goes to the invoices page
108
+ And he creates a new invoice
109
+ Then the invoice default date is set to today's date.
110
+ Then the invoice default due date is set to today's date.
111
+
112
+ Scenario: New invoice with default VAT rate
113
+ When the user goes to the invoices page
114
+ And he creates a new invoice
115
+ Then the VAT rate is "20,00"
116
+
117
+ Scenario: Existing invoice with non default VAT rate
118
+ And an existing invoice with a "19.6"% VAT rate
119
+ And he goes on the edit page of the invoice
120
+ Then the VAT rate is "19,60"
121
+
122
+ Scenario: New invoice with non default VAT rate
123
+ When the user goes to the invoices page
124
+ And he creates a new invoice
125
+ And he fills a line with "Bidule", "1", "€", "100"
126
+ And he changes the VAT rate to "19.6"
127
+ Then the VAT rate is "19,60"
128
+ And the VAT due is "19,60"
129
+ And the total including taxes is "119,60"
130
+
131
+ Scenario: Change values without saving(test live preview)
132
+ When the user goes to the invoices page
133
+ And he creates a new invoice
134
+ And he fills a line with "Bidule", "2", "€", "50"
135
+ Then the new line total is "100,00"
136
+ And he fills a line with "Bidule", "10", "€", "100"
137
+ Then the new line total is "1 000,00"
138
+ And the total excluding taxes is "1 000,00"
139
+ And he changes the commercial discount to "100"€
140
+ Then the total excluding taxes is "900,00"
141
+ And the VAT due is "180,00"
142
+ And the total including taxes is "1 080,00"
143
+ And he changes the commercial discount to "0"€
144
+ Then the total excluding taxes is "1 000,00"
145
+ And the VAT due is "200,00"
146
+ And the total including taxes is "1 200,00"
147
+ And he changes the VAT rate to "19.6"
148
+ And the VAT due is "196,00"
149
+ And the total including taxes is "1 196,00"
150
+
151
+ Scenario: Export invoices in XLSX
152
+ And an existing invoice
153
+ When the user goes to the invoices page
154
+ When I export to XLSX
155
+ Then I download XLSX file
156
+
157
+ Scenario: Existing unpaid invoice set to paid
158
+ And an existing invoice
159
+ When the user goes to the invoice details
160
+ Then the invoice is marked unpaid
161
+ And he set the invoice as paid
162
+ Then the invoice is marked paid
163
+ And a message signals that the invoice is set to paid
164
+ And the invoice status is set to paid
165
+ And can't set the invoice as paid again
166
+
167
+ Scenario: Existing paid invoice set to unpaid
168
+ And an existing paid invoice
169
+ When the user goes to the invoices page
170
+ Then the invoice is marked paid
171
+ And can't set the invoice as paid again
172
+ And he goes on the edit page of the invoice
173
+ When he marks the invoice as unpaid
174
+ And he saves the invoice
175
+ Then a message signals the success of the update
176
+ And the invoice status is set to unpaid
177
+
178
+ Scenario: Filter by customer
179
+ Given a bunch of existing invoices
180
+ When the user goes to the invoices page
181
+ When he filters by one customer
182
+ Then only the invoices of this customer do appear
183
+
184
+ Scenario: Filter by date
185
+ Given a bunch of existing invoices
186
+ When the user goes to the invoices page
187
+ When he filters by date on today
188
+ Then only the invoices of today do appear
189
+
190
+ Scenario: Filter by custom dates
191
+ Given a bunch of existing invoices
192
+ When the user goes to the invoices page
193
+ Then he do not see the "bm_date_begin" filter
194
+ Then he do not see the "bm_date_end" filter
195
+ When he select custom date filter
196
+ Then he see the "bm_date_begin" filter
197
+ Then he see the "bm_date_end" filter
198
+ When he filters invoices between two date
199
+ Then only the invoices of today do appear
200
+ Then he see the "bm_date_begin" filter
201
+ Then he see the "bm_date_end" filter
202
+ When he reset filters
203
+ Then he do not see the "bm_date_begin" filter
204
+ Then he do not see the "bm_date_end" filter
205
+
206
+ Scenario: Filter by status
207
+ Given a bunch of existing invoices
208
+ When the user goes to the invoices page
209
+ When he filters by status on paid
210
+ Then only the invoices paid do appear
211
+ And the selected filter is "paid"
212
+
213
+ Scenario: Existing invoice displayed in invoices page
214
+ Given an existing invoice
215
+ When the user goes to the invoices page
216
+ Then the invoice line shows the right date
217
+
218
+ Scenario: Paid invoice green in list
219
+ Given an existing paid invoice
220
+ When the user goes to the invoices page
221
+ Then the invoice status should be "paid"
222
+
223
+ Scenario: Unpaid invoice with due date not passed have no color in list
224
+ Given an existing unpaid invoice
225
+ And its due date is not yet passed
226
+ When the user goes to the invoices page
227
+ Then the invoice paid status should not have a color
228
+
229
+ Scenario: Unpaid invoice with due date the same day have no color in list
230
+ Given an existing unpaid invoice
231
+ And its due date is the same day
232
+ When the user goes to the invoices page
233
+ Then the invoice paid status should not have a color
234
+
235
+ Scenario: Unpaid invoice with due date just passed appears orange in list
236
+ Given an existing unpaid invoice
237
+ And its due date is yesterday
238
+ When the user goes to the invoices page
239
+ Then the invoice status should be "late"
240
+
241
+ Scenario: Unpaid invoice with due date passed by 15 days appears orange in list
242
+ Given an existing unpaid invoice
243
+ And its due date is 14 days ago
244
+ When the user goes to the invoices page
245
+ Then the invoice status should be "late"
246
+
247
+ Scenario: Unpaid invoice with due date passed by 16 days appears red in list
248
+ Given an existing unpaid invoice
249
+ And its due date is 15 days ago
250
+ When the user goes to the invoices page
251
+ Then the invoice status should be "on_alert"
252
+
253
+ Scenario: Invoice Pdf with valid name
254
+ Given an existing customer
255
+ Given an existing invoice
256
+ When the user download the pdf
257
+
258
+ Scenario: Invoices data
259
+ Given existing "100" invoices with "123" amount
260
+ When the user goes to the invoices page
261
+ Then data total amount is "12 300"
@@ -0,0 +1,53 @@
1
+ @javascript
2
+ Feature: Invoice Management
3
+ As a user
4
+ I want to create invoices and quotations with multiple vat
5
+ In order to get paid!
6
+
7
+ Background:
8
+ Given an authenticated user
9
+ Given billing machine in multiple vat mode
10
+ And an existing customer
11
+ And an existing payment term
12
+
13
+ Scenario: New invoice for existing customer
14
+ When the user goes to the invoices page
15
+ And he creates a new invoice
16
+ And he fills the reference, the date and the payment terms
17
+ And he chooses the customer
18
+ And he fills a multiple vat line with "Bidule", "4", "€", "20", "10"
19
+ Then the new line total is "40,00"
20
+ And the total excluding taxes is "40,00"
21
+ When he adds a new line
22
+ And he fills a multiple vat line with "Machin truc", "8", "€", "10", "20"
23
+ Then the new line total is "160,00"
24
+ And he fill the commercial discount with "20,00"
25
+ Then the total excluding taxes is "180,00"
26
+ And the VAT due is "21,60"
27
+ And the total including taxes is "201,60"
28
+ When he saves the invoice
29
+ Then a message signals the success of the creation
30
+ Then it's added to the invoice list
31
+
32
+ Scenario: New quotation for existing customer
33
+ And an existing customer
34
+ And an existing payment term
35
+ When the user goes to the quotations page
36
+ And he creates a new quotation
37
+ And he fills the reference and the date
38
+ And he fill the quotation expiry
39
+ And he chooses the customer
40
+ And he fills a multiple vat line with "Bidule", "4", "€", "20", "10"
41
+ Then the new line total is "40,00"
42
+ And the total excluding taxes is "40,00"
43
+ When he adds a new line
44
+ And he fills a multiple vat line with "Machin truc", "8", "€", "10", "20"
45
+ Then the new line total is "160,00"
46
+ And he fill the quotation commercial discount with "20,00"
47
+ And the total excluding taxes is "180,00"
48
+ And the VAT due is "21,60"
49
+ And the total including taxes is "201,60"
50
+ When he saves the quotation
51
+ Then a message signals the success of the quotation creation
52
+ Then I am on the created quotation
53
+ And the quotation informations are visible on the quotation details
@@ -0,0 +1,19 @@
1
+ @javascript
2
+ Feature: PaymentTerm
3
+
4
+ Scenario: New payment_term
5
+ Given an authenticated user
6
+ And the user goes on the new payment_term page
7
+ When he fills the payment_term's information
8
+ And creates a new payment_term
9
+ Then he is redirected on the payment_terms page
10
+ And the payment_term is added to the payment_term list
11
+
12
+ Scenario: Update payment_term
13
+ Given an authenticated user
14
+ And an existing payment_term
15
+ When the user edits the payment_term
16
+ Then the current payment_term's label should be pre-filled
17
+ When he validates the new payment_term
18
+ Then he is redirected on the payment_terms page
19
+ And the payment_term's label is updated
@@ -0,0 +1,193 @@
1
+ @javascript
2
+ Feature: Quotation Management
3
+ As a user
4
+ I want to create quotations
5
+ In order to give them to my future customers
6
+
7
+ Background:
8
+ Given an authenticated user
9
+ Given billing machine in single vat mode
10
+
11
+ Scenario: Existing quotation displayed in quotations page
12
+ And an existing customer
13
+ And an existing quotation
14
+ When the user goes to the quotations page
15
+ And the quotation line shows the right date
16
+ And the quotation line shows the right traking-id
17
+ And the quotation line shows the right customer's name
18
+ And the quotation line shows the right total excluding taxes value
19
+ And the quotation line shows the right total including taxes value
20
+
21
+ Scenario: Paginate by 50 quotations
22
+ Given 75 existing quotations
23
+ When the user goes to the quotations page
24
+ Then he should see 50 quotations
25
+ When he goes on the next page
26
+ Then he should see 25 quotations
27
+
28
+ Scenario: Empty quotation
29
+ And an existing emtpy quotation
30
+ When the user goes to the quotations page
31
+ Then the quotation is displayed correctly
32
+
33
+ Scenario: Quotation details
34
+ And an existing quotation
35
+ When the user goes to the quotation details
36
+ Then he can see all the quotation informations
37
+
38
+ Scenario: Quotation preview
39
+ When the user goes to the quotations page
40
+ And he creates a new quotation
41
+ And he click on the preview quotation button
42
+ Then he see the quotation preview
43
+ And no quotation is created
44
+
45
+ Scenario: Quotation copy
46
+ Given an existing quotation
47
+ When the user goes to the quotation details
48
+ And he copy the quotation
49
+ Then he is on the created quotation edit page
50
+
51
+ Scenario: Send quotation by email
52
+ Given an existing customer
53
+ And an existing quotation
54
+ When the user goes to the quotation details
55
+ And he send quotation to customer by email
56
+ Then an quotation is sent to customer
57
+
58
+ Scenario: Quotation to invoice
59
+ Given an existing quotation
60
+ When the user goes to the quotation details
61
+ And he create an invoice from the quotation
62
+ Then an invoice is created from quotation
63
+
64
+ Scenario: New quotation for existing customer
65
+ And an existing customer
66
+ And an existing payment term
67
+ When the user goes to the quotations page
68
+ And he creates a new quotation
69
+ And he fills the reference and the date
70
+ And he fill the quotation expiry
71
+ And he chooses the customer
72
+ And he fills a line with "Bidule", "4", "€", "10"
73
+ Then the new line total is "40,00"
74
+ And the total excluding taxes is "40,00"
75
+ When he adds a new line
76
+ And he fills a line with "Machin truc", "8", "€", "20"
77
+ Then the new line total is "160,00"
78
+ And he fill the quotation commercial discount with "20,00"
79
+ And the total excluding taxes is "180,00"
80
+ And the VAT due is "36,00"
81
+ And the total including taxes is "216,00"
82
+ When he saves the quotation
83
+ Then a message signals the success of the quotation creation
84
+ Then I am on the created quotation
85
+ And the quotation informations are visible on the quotation details
86
+
87
+ Scenario: Edit quotation
88
+ And an existing quotation
89
+ When the user goes to the quotation details
90
+ And he goes on the edit page of the quotation
91
+ And changes the quotation label
92
+ When he saves the quotation
93
+ Then a message signals the success of the quotation update
94
+ Then the quotation's label has changed
95
+
96
+ Scenario: New quotation with default date
97
+ When the user goes to the quotations page
98
+ And he creates a new quotation
99
+ Then the quotation default date is set to today's date.
100
+
101
+ Scenario: New quotation with default VAT rate
102
+ When the user goes to the quotations page
103
+ And he creates a new quotation
104
+ Then the VAT rate is "20,00"
105
+
106
+ Scenario: Existing quotation with non default VAT rate
107
+ And an existing quotation with a "19.6"% VAT rate
108
+ And he goes on the edit page of the quotation
109
+ Then the VAT rate is "19,60"
110
+
111
+ Scenario: New quotation with non default VAT rate
112
+ When the user goes to the quotations page
113
+ And he creates a new quotation
114
+ And he fills a line with "Bidule", "1", "€", "100"
115
+ And he changes the quotation VAT rate to "19.6"
116
+ Then the VAT rate is "19,60"
117
+ And the VAT due is "19,60"
118
+ And the total including taxes is "119,60"
119
+
120
+ Scenario: Change quotation values without saving(test live preview)
121
+ When the user goes to the quotations page
122
+ And he creates a new quotation
123
+ And he fills a line with "Bidule", "2", "€", "50"
124
+ Then the new line total is "100,00"
125
+ And he fills a line with "Bidule", "10", "€", "100"
126
+ Then the new line total is "1 000,00"
127
+ And the VAT due is "200,00"
128
+ And he fill the commercial discount with "100,00"
129
+ And the total excluding taxes is "900,00"
130
+ And the VAT due is "180,00"
131
+ And the total including taxes is "1 080,00"
132
+ And he fill the commercial discount with "0,00"
133
+ And the total excluding taxes is "1 000,00"
134
+ And the total including taxes is "1 200,00"
135
+ And he changes the quotation VAT rate to "19.6"
136
+ And the VAT due is "196,00"
137
+ And the total including taxes is "1 196,00"
138
+
139
+ Scenario: Existing quotation has is associated documents shown on the show page
140
+ And an existing quotation
141
+ And 2 associated documents to this quotation
142
+ When the user goes to the quotation details
143
+ Then he will see links to the documents
144
+
145
+ Scenario: Delete a document
146
+ And an existing quotation
147
+ And 2 associated documents to this quotation
148
+ When the user goes to the quotation details
149
+ And he delete a document
150
+ And the document is not in the quotation details
151
+
152
+ Scenario: Create a document
153
+ And an existing quotation
154
+ When the user goes to the quotation details
155
+ And he add a new document
156
+ And the document is in the quotation details
157
+
158
+ Scenario: Update a document
159
+ And an existing quotation
160
+ When the user goes to the quotation details
161
+ And he add a new document
162
+ And the document is in the quotation details
163
+ When he update the document
164
+ Then the document is updated
165
+
166
+ Scenario: Filter by customer
167
+ Given a bunch of existing quotations
168
+ When the user goes to the quotations page
169
+ When he filters by one customer
170
+ Then only the quotations of this customer do appear
171
+
172
+ Scenario: Filter by date
173
+ Given a bunch of existing quotations
174
+ When the user goes to the quotations page
175
+ When he filters by date on today
176
+ Then only the quotations of today do appear
177
+
178
+ Scenario: Filter by state
179
+ Given an existing "billing_machine_quotation" having "state" set to "accepted"
180
+ Given an existing "billing_machine_quotation" having "state" set to "canceled"
181
+ When the user goes to the quotations page
182
+ When he filters by "accepted" state
183
+ Then only the "accepted" quotations appear
184
+ When he filters by "canceled" state
185
+ Then only the "canceled" quotations appear
186
+ When he filters by "not_canceled" state
187
+ Then only the "accepted" quotations appear
188
+ And the selected filter is "not_canceled"
189
+
190
+ Scenario: Quotations data
191
+ Given existing "100" quotations with "123" amount
192
+ When the user goes to the quotations page
193
+ Then data total amount is "12 300"