@@ -204,7 +204,86 @@ When(~'^I can fill the Conferencia details$') {->
204
204
205
205
// ---------------------------------------------------------------------------------------------------
206
206
207
+ #if ($createanewresearchgroup)
208
+ Given (~' ^I am at the publications menu page$' ) { ->
209
+ to LoginPage
210
+ at LoginPage
211
+ page. add(" admin" ," adminadmin" )
212
+ at PublicationsPage
213
+ }
214
+
215
+ When (~' ^I select the "([^"]*)" option at the publications menu page$' ) { String option ->
216
+ at PublicationsPage
217
+ page. select(option)
218
+ }
219
+
220
+ And (~' ^I select the "New Research Group" option at research group list page$' ) { ->
221
+ at ResearchGroupListPage
222
+ page. select(" create" )
223
+ }
224
+
225
+ Then (~' ^I can fill the field "Nome" with value "([^"]*)"$' ) { String field , String name ->
226
+ at ResearchGroupCreatePage
227
+ page. fillResearchGroupName(name)
228
+ }
229
+
230
+ And (~' I can fill the field "Twitter" with value "([^"]*)"$' ) { String field , String twitter ->
231
+ at ResearchGroupCreatePage
232
+ page. fillResearchGroupTwitter(twitter)
233
+ }
234
+
235
+ And (~' ^I can fill the field "Descrição" with value "([^"]*)"$' ) { String field , String description ->
236
+ at ResearchGroupCreatePage
237
+ page. fillResearchGroupDescription(description)
238
+ }
239
+
240
+ And (~' ^I can fill the field "Sigla" with value "([^"]*)"$' ) { String field , String sigla ->
241
+ at ResearchGroupCreatePage
242
+ page. fillResearchGroupSigla(sigla)
243
+ }
244
+
245
+ And (~' ^I select a member "([^"]*)" at member list' ) { String memberId ->
246
+ at ResearchGroupCreatePage
247
+ page. selectMember(memberId)
248
+ page. clickOnCreate()
249
+ }
250
+
251
+ Then (~' ^I should see the new research group named "([^"]*)" in Research Group list$' ) { String groupName ->
252
+ at ResearchGroupPage
253
+ assert page. findByName(groupName) != null /* Checando se o grupo foi criado */
254
+ }
255
+
256
+ #end
257
+
258
+ // ---------------------------------------------------------------------------------------------------
259
+
260
+ #if ($invalidvalueinfielderrorwhencreatinganewMember)
261
+ // invalid value in field error when creating a new Member
262
+ Given (~' ^I am at the Member list page$' ) { ->
263
+ to MemberListPage
264
+ at MemberListPage
265
+ }
266
+
267
+ When (~' ^I select the "([^"]*)" option$' ) { String option ->
268
+ at MemberListPage
269
+ page. getMenuOption(option)
270
+ }
271
+
272
+ And (~' ^I can fill a field with an invalid value "([^"]*)"' ) { String value ->
273
+ at MemberCreatePage
274
+ page. fillMemberDetails(value)
275
+ }
276
+
277
+ And (~' ^I select "([^"]*)" option' ) { String value ->
278
+ at MemberCreatePage
279
+ page. clickOnCreate()
280
+ }
281
+
282
+ Then (~' ^I should see an error message' ){ ->
283
+ at MemberListPage
284
+ }
207
285
286
+ #end
208
287
209
288
// ---------------------------------------------------------------------------------------------------
210
289
0 commit comments