aboutsummaryrefslogtreecommitdiffstats
path: root/tests/uiTests/test_login_with_new_user.py
blob: d7d1bdad7681f070619a970efd38acc37a8d11b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ===================================================================
#
# Unless otherwise specified, all software contained herein is licensed
# under the Apache License, Version 2.0 (the “License”);
# you may not use this software except in compliance with the License.
# You may obtain a copy of the License at
#
#             http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
#
# Unless otherwise specified, all documentation contained herein is licensed
# under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
# you may not use this documentation except in compliance with the License.
# You may obtain a copy of the License at
#
#             https://creativecommons.org/licenses/by/4.0/
#
# Unless required by applicable law or agreed to in writing, documentation
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ============LICENSE_END============================================
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
from wheel.signatures import assertTrue
from iceci.decorator.exception_decor import exception
from services.constants import Constants
from services.frontend.base_actions.click import Click
from services.frontend.base_actions.enter import Enter
from services.frontend.base_actions.get import Get
from services.frontend.base_actions.wait import Wait
from services.helper import Helper
from services.logging_service import LoggingServiceFactory
from services.types import API, Frontend, DB
from tests.uiTests.test_ui_base import TestUiBase

logger = LoggingServiceFactory.get_logger()


class TestLoginPageWithNewUser(TestUiBase):

    @exception()
    def test_login_positive(self):
        ''' Create new user login. '''
        user_content = API.User.create_new_user()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT, Constants.Toast.ID)
        logger.debug("Resend Activation Email Page Opened ")
        Wait.text_by_id(
            Constants.Toast.ID, Constants.ActivateAccount.Toast.TEXT)

    @exception()
    def test_login_negative(self):
        ''' Negative: Type wrong password in login page. '''
        user_content = API.User.create_new_user(activate=True)
        Frontend.User.login(
            user_content['email'], Helper.rand_string("randomString"), Constants.Toast.ID)
        Wait.text_by_id(Constants.Toast.ID, Constants.Login.Toast.TEXT)
        logger.debug(
            "Message Error(APIUser or Password does not match) Displayed")

    @exception()
    def test_login_negative_email_valid(self):
        ''' Negative: Type wrong password in login page. '''
        user_content = API.User.create_new_user(activate=True)
        Frontend.User.login(
            user_content['email'] + "s", Constants.Default.Password.TEXT, Constants.Toast.ID)
        Wait.text_by_id(Constants.Toast.ID, Constants.Login.Toast.TEXT)
        logger.debug(
            "Message Error(APIUser or Password does not match) Displayed")

    @exception()
    def test_login_negative_required_password(self):
        ''' Check that password is a required field on login page. '''
        user_content = API.User.create_new_user()
        logger.debug("Verifying and Insert Login page elements:")
        Enter.text_by_name(Constants.Login.Email.NAME, user_content['email'])
        Enter.text_by_name(Constants.Login.Password.NAME, "1")
        Enter.text_by_name(Constants.Login.Password.NAME, "")
        Wait.text_by_css(
            Constants.Login.Password.Error.CSS, Constants.Login.Password.Error.TEXT)

    @exception()
    def test_login_page_dont_have_accaunt_button(self):
        ''' Go to login page, click_on on "Don't have an account", verify user is redirected to signup page. '''
        Click.id(Constants.Login.DontHaveAccount.ID)
        Wait.text_by_css(
            Constants.Signup.Title.CSS, Constants.Signup.Title.TEXT)

    @exception()
    def test_login_page_home_button(self):
        ''' Open login page, verify home button works correctly. '''
        Click.id(Constants.Home.Logo.ID)
        Wait.text_by_id(Constants.Home.Title.ID, Constants.Home.Title.TEXT)

    @exception()
    def test_create_and_activate_user(self):
        ''' Create user and activate by log-in. '''
        user_content = API.User.create_new_user()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT, Constants.Toast.ID)
        '''  Resend Activation Email Page Opened '''
        Wait.text_by_id(
            Constants.Toast.ID, Constants.ActivateAccount.Toast.TEXT)
        activationUrl = DB.User.get_activation_url(user_content['email'])
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)

    @exception()
    def test_invite_existing_user(self):
        ''' Create user and VF, login, invite existing user, login with second user and verify user has joined to engagement '''
        user_content = API.VirtualFunction.create_engagement(
            wait_for_gitlab=False)
        second_user_content = API.VirtualFunction.create_engagement(
            wait_for_gitlab=False)
        activationUrl = DB.User.get_activation_url(user_content['email'])
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        vfFullName = user_content[
            'engagement_manual_id'] + ": " + user_content['vfName']
        actualVfNameid = "clickable-" + vfFullName
        Click.id(actualVfNameid, wait_for_page=True)
        Wait.id(Constants.Dashboard.Overview.TeamMember.ID)
        Frontend.Wizard.invite_team_members_modal(second_user_content['email'])
        enguuid = DB.General.select_where("uuid", "ice_engagement", "engagement_manual_id", user_content[
                                          'engagement_manual_id'], 1)  # Fetch one is_service_provider_contact user ID.
        invitation_token = DB.User.select_invitation_token("invitation_token", "ice_invitation", "engagement_uuid",
                                                           enguuid, second_user_content['email'], 1)
        inviterURL = Constants.Default.InviteURL.Login.TEXT + invitation_token
        Frontend.General.re_open(inviterURL)
        actualVfNameid = "clickable-" + vfFullName
        Frontend.User.login(
            second_user_content['email'], Constants.Default.Password.TEXT, actualVfNameid)
        Wait.modal_to_dissappear()
        Frontend.Overview.click_on_vf(user_content)
        Wait.text_by_id(Constants.Dashboard.Overview.Title.ID, vfFullName)

    @exception()
    def test_invite_new_user_of_service_provider_internal(self):
        '''
        TC Name: test_invite_new_user_aservice_provider_internal
        Steps:
        Create new NOT-MainServiceProvider APIUser via SignUp request-->Login with This One--> build "activationUrl"-->
        Validation of successful activate-->
        close Wizard --> Logout from Dashboard -->login-->Open Wizard--> fill all fields in all Tab's(4)-->
        validate second Tab is a "add_service_provider_internal"-->
        build inviteURL from email--> reopen browser with inviteURL-->
        Validate Login Form opened -->
        Login--> Validate Dashboard Form opened
        '''
        user_content = API.User.create_new_user(company="Amdocs")
        uuid = DB.General.select_where_email(
            "uuid", "ice_user_profile", user_content['email'])
        activationUrl = DB.User.get_activation_url(user_content['email'])
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)  # new
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)
        Click.id(Constants.Dashboard.Wizard.CloseButton.ID)
        Wait.modal_to_dissappear()
        Frontend.User.logout()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_css(
            Constants.Dashboard.LeftPanel.Title.CSS, Constants.Dashboard.LeftPanel.Title.TEXT)
        Wait.id(Constants.Dashboard.Statuses.Title.ID)
        Click.id(Constants.Dashboard.LeftPanel.AddEngagement.ID)
        # Wizard
        vfName = Frontend.Wizard.add_vf()
        service_provider_internal = Frontend.Wizard.add_service_provider_internal()
        inviteEmail = Helper.rand_invite_email()
        Frontend.Wizard.invite_team_members(inviteEmail)
        Frontend.Wizard.add_ssh_key()
        enguuid = DB.General.select_where("uuid", "ice_vf", "name", vfName, 1)
        invitation_token = DB.User.select_invitation_token("invitation_token", "ice_invitation", "engagement_uuid",
                                                           enguuid, inviteEmail, 1)
        inviterURL = Constants.Default.InviteURL.Signup.TEXT + \
            invitation_token + "&email=" + inviteEmail

        Frontend.General.re_open(inviterURL)
        actualInvitedEmail = Get.value_by_name(Constants.Signup.Email.NAME)
        Helper.internal_assert(inviteEmail, actualInvitedEmail)
        signUpURLforContact = DB.User.get_contact_signup_url(invitation_token, uuid, service_provider_internal["email"],
                                                             service_provider_internal["full_name"], service_provider_internal["phone"], service_provider_internal["company"])
        Frontend.General.re_open(signUpURLforContact)
        actualInvitedEmail = Get.value_by_name(Constants.Signup.Email.NAME)
        Helper.internal_assert(
            service_provider_internal["email"], actualInvitedEmail)
        Helper.internal_assert(
            "+" + service_provider_internal["phone"], Get.value_by_name(Constants.Signup.Phone.NAME))
        Helper.internal_assert(
            service_provider_internal["full_name"], Get.value_by_name(Constants.Signup.FullName.NAME))
        signupCompany = Get.value_by_name(Constants.Signup.Company.NAME, True)
        Helper.internal_assert(
            service_provider_internal["company"], signupCompany)

    @exception()
    def test_create_2_new_users(self):
        '''
        Login and activate new user, than reopen browser and loging with new other user -
        check wizard appears for both Frontend.User.
        '''
        # First APIUser
        user_content = API.User.create_new_user()
        logger.debug(user_content['email'])
        activationUrl = DB.User.get_activation_url(user_content['email'])
        logger.debug(activationUrl)
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)
        Click.id(Constants.Dashboard.Wizard.CloseButton.ID)
        Wait.modal_to_dissappear()
        Frontend.User.logout()
        # Second APIUser
        user_content = API.User.create_new_user()
        logger.debug(user_content['email'])
        activationUrl2 = DB.User.get_activation_url(user_content['email'])
        logger.debug(activationUrl2)
        Frontend.General.re_open_not_clean_cache(activationUrl2)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)  # new
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)
        Click.id(Constants.Dashboard.Wizard.CloseButton.ID)
        Wait.modal_to_dissappear()
        Click.id(Constants.Dashboard.Avatar.ID)

    @exception()
    def test_validate_account_form(self):
        '''Go to Account page and validate details.'''
        user_content = API.VirtualFunction.create_engagement(
            wait_for_gitlab=False)
        ssh_key = API.User.set_ssh(user_content)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Frontend.User.go_to_account()
        Frontend.User.validate_account_details(
            user_content['full_name'], user_content['phone_number'], ssh_key)

    @exception()
    def test_add_vendor_contact(self):
        '''
        TC Name: test_add_vendor_contact
        Steps:
        Invite vendor contact and activate the invited user. Validate the invited user has the right VF.
        '''
        user_content = API.User.create_new_user()
        # Fetch one user ID.
        uuid = DB.General.select_where_email(
            "uuid", "ice_user_profile", user_content['email'])
        activationUrl = DB.User.get_activation_url(user_content['email'])
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)  # new
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)
        Click.id(Constants.Dashboard.Wizard.CloseButton.ID)
        Wait.modal_to_dissappear()
        Frontend.User.logout()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_css(
            Constants.Dashboard.LeftPanel.Title.CSS, Constants.Dashboard.LeftPanel.Title.TEXT)
        Wait.id(Constants.Dashboard.Statuses.Title.ID)
        logger.debug("click_on on + Dashboard")
        Click.id(Constants.Dashboard.LeftPanel.AddEngagement.ID)
        # Wizard
        vfName = Frontend.Wizard.add_vf()
        vendor_contact = Frontend.Wizard.add_vendor_contact()
        inviteEmail = "automationqatt" + \
            Helper.rand_string("randomString") + "@gmail.com"
        Frontend.Wizard.invite_team_members(inviteEmail)
        Frontend.Wizard.add_ssh_key()
        engagement_id = DB.General.select_where(
            "engagement_id", "ice_vf", "name", vfName, 1)
        engLeadEmail = DB.User.select_el_email(vfName)
        engagement_manual_id = DB.General.select_where(
            "engagement_manual_id", "ice_engagement", "uuid", engagement_id, 1)
        invitation_token = DB.User.select_invitation_token("invitation_token", "ice_invitation", "engagement_uuid",
                                                           engagement_id, vendor_contact["email"], 1)
        signUpURLforContact = DB.User.get_contact_signup_url(invitation_token, uuid, vendor_contact["email"],
                                                             vendor_contact["full_name"], vendor_contact["phone"], vendor_contact["company"])
        Frontend.General.re_open(signUpURLforContact)
        actualInvitedEmail = Get.value_by_name(Constants.Signup.Email.NAME)
        Helper.internal_assert(vendor_contact["email"], actualInvitedEmail)
        Helper.internal_assert(
            "+" + vendor_contact["phone"], Get.value_by_name(Constants.Signup.Phone.NAME))
        Helper.internal_assert(
            vendor_contact["full_name"], Get.value_by_name(Constants.Signup.FullName.NAME))
        Helper.internal_assert(
            vendor_contact["company"], Get.value_by_name(Constants.Signup.Company.NAME))
        # SignUp for VendorContact
        user_content['engagement_uuid'] = engagement_id
        user_content['engagement_manual_id'] = engagement_manual_id
        user_content['vfName'] = vfName
        user_content['el_email'] = engLeadEmail
        API.User.signup_invited_user(vendor_contact["company"], vendor_contact["email"], invitation_token,
                                     signUpURLforContact, user_content, True)
        activationUrl2 = DB.User.get_activation_url(vendor_contact["email"])
        # Activate for VendorContact
        myVfName = engagement_manual_id + ": " + vfName
        actualVfNameid = "clickable-" + myVfName
        Frontend.General.re_open(activationUrl2)
        Frontend.User.login(
            vendor_contact["email"], Constants.Default.Password.TEXT, actualVfNameid)
        # Validate opened right VF for VendorContact
        actualVfName = Get.by_id(actualVfNameid)
        Helper.internal_assert(myVfName, actualVfName)

    @exception()
    def test_add_service_provider_internal(self):
        '''
        TC Name: test_add_service_provider_internal
        Steps:
        Invite is_service_provider_contact Sponsor and activate the invited user. Validate sponsor has the right VF.
        '''
        user_content = API.User.create_new_user(company="Amdocs")
        uuid = DB.General.select_where_email(
            "uuid", "ice_user_profile", user_content['email'])
        activationUrl = DB.User.get_activation_url(user_content['email'])
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)  # new
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)
        Click.id(Constants.Dashboard.Wizard.CloseButton.ID)
        Wait.modal_to_dissappear()
        Frontend.User.logout()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_css(
            Constants.Dashboard.LeftPanel.Title.CSS, Constants.Dashboard.LeftPanel.Title.TEXT)
        Wait.id(Constants.Dashboard.Statuses.Title.ID)
        logger.debug("click_on on + Dashboard")
        Click.id(Constants.Dashboard.LeftPanel.AddEngagement.ID)
        # Wizard
        vfName = Frontend.Wizard.add_vf()
        service_provider_internal = Frontend.Wizard.add_service_provider_internal()
        inviteEmail = "automationqatt" + \
            Helper.rand_string("randomString") + "@gmail.com"
        Frontend.Wizard.invite_team_members(inviteEmail)
        Frontend.Wizard.add_ssh_key()
        enguuid = DB.General.select_where("uuid", "ice_vf", "name", vfName, 1)
        invitation_token = DB.User.select_invitation_token("invitation_token", "ice_invitation", "engagement_uuid",
                                                           enguuid, inviteEmail, 1)
        inviterURL = Constants.Default.InviteURL.Signup.TEXT + \
            invitation_token + "&email=" + inviteEmail
        Frontend.General.re_open(inviterURL)
        actualInvitedEmail = Get.value_by_name("email")
        Helper.internal_assert(inviteEmail, actualInvitedEmail)
        signUpURLforContact = DB.User.get_contact_signup_url(invitation_token, uuid, service_provider_internal["email"],
                                                             service_provider_internal["full_name"], service_provider_internal["phone"], service_provider_internal["company"])
        Frontend.General.re_open(signUpURLforContact)
        actualInvitedEmail = Get.value_by_name(Constants.Signup.Email.NAME)
        Helper.internal_assert(
            str("+" + service_provider_internal["phone"]), Get.value_by_name(Constants.Signup.Phone.NAME))
        Helper.internal_assert(
            service_provider_internal["full_name"], Get.value_by_name(Constants.Signup.FullName.NAME))
        Helper.internal_assert(
            service_provider_internal["company"], Get.value_by_name(Constants.Signup.Company.NAME))
        # Fetch one is_service_provider_contact user ID.
        engagement_id = DB.General.select_where(
            "engagement_id", "ice_vf", "name", vfName, 1)
        # SignUp for MainServiceProviderSponsorContact
        engagement_manual_id = DB.General.select_where(
            "engagement_manual_id", "ice_engagement", "uuid", engagement_id, 1)

        invitation_token = DB.User.select_invitation_token("invitation_token", "ice_invitation", "engagement_uuid",
                                                           engagement_id, service_provider_internal["email"], 1)
        engLeadEmail = DB.User.select_el_email(vfName)
        user_content['engagement_uuid'] = engagement_id
        user_content['engagement_manual_id'] = engagement_manual_id
        user_content['vfName'] = vfName
        user_content['el_email'] = engLeadEmail

        API.User.signup_invited_user(service_provider_internal["company"], service_provider_internal["email"], invitation_token,
                                     signUpURLforContact, user_content, True)
        activationUrl2 = DB.User.get_activation_url(
            service_provider_internal["email"])
        # Activate for VendorContact




        engagement_manual_id = DB.General.select_where(
            "engagement_manual_id", "ice_engagement", "uuid", engagement_id, 1)
        # Validate opened right VF for VendorContact
        myVfName = engagement_manual_id + ": " + vfName
        actualVfNameid = "clickable-" + myVfName
        Frontend.General.re_open(activationUrl2)
        Frontend.User.login(
            service_provider_internal["email"], Constants.Default.Password.TEXT, actualVfNameid)
        actualVfName = Get.by_id(actualVfNameid, wait_for_page=True)
        Helper.internal_assert(myVfName, actualVfName)

    @exception()
    def test_Validate_SSHkeyNS(self):
        ''' Insert a valid ssh key in wizard, validate "add ssh key" next step marked as completed. '''
        user_content = API.User.create_new_user()
        activationUrl = DB.User.get_activation_url(user_content['email'])
        Frontend.General.re_open(activationUrl)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_id(
            Constants.Toast.ID, Constants.Dashboard.ActivateMsg.Success.TEXT)
        Click.id(Constants.Dashboard.Wizard.CloseButton.ID)
        Wait.modal_to_dissappear()
        Frontend.User.logout()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Wait.text_by_css(
            Constants.Dashboard.LeftPanel.Title.CSS, Constants.Dashboard.LeftPanel.Title.TEXT)
        logger.debug("click_on on + Dashboard")
        Click.id(Constants.Dashboard.LeftPanel.AddEngagement.ID)
        #    Wizard
        vfName = Frontend.Wizard.add_vf()
        Frontend.Wizard.add_vendor_contact()
        inviteEmail = Helper.rand_invite_email()
        Frontend.Wizard.invite_team_members(inviteEmail)
        sshKey = Frontend.Wizard.add_ssh_key()
        Frontend.User.go_to_account()
        Wait.id(user_content['email'])
        actualFullName = Get.value_by_name(
            Constants.Dashboard.Avatar.Account.FullName.NAME)
        Helper.internal_assert(user_content['full_name'], actualFullName)
        actualSSHkey = Get.value_by_name(
            Constants.Dashboard.Avatar.Account.SSHKey.NAME)
        Helper.internal_assert(sshKey, actualSSHkey)
        Click.id(Constants.Dashboard.Statuses.ID)
        #    VALIDATION FOR CONFIRMED BY ENG. LEAD
        engLeadEmail = DB.User.select_el_email(vfName)
        engagement_id = DB.General.select_where(
            "engagement_id", "ice_vf", "name", vfName, 1)
        engagement_manual_id = DB.General.select_where(
            "engagement_manual_id", "ice_engagement", "uuid", engagement_id, 1)
        myVfName = engagement_manual_id + ": " + vfName
        actualVfNameid = "clickable-" + myVfName
        Click.id(actualVfNameid)
        Click.id("overview-" + myVfName)
        Click.css("span.engagement_detail_menu_name")
        Click.xpath("//span[2]/multiselect/div/button")
        Click.link_text("Completed")
        elFullName = DB.General.select_where(
            "full_name", "ice_user_profile", "email", engLeadEmail, 1)
        idNs = elFullName + "_Completed"
        actualConfirmBy = str(Get.by_id(idNs))
        expectedConfirmBy = "System Next Step  Completed: "
        Helper.internal_assert(expectedConfirmBy, actualConfirmBy)

    @exception()
    def test_current_status(self):
        user_content = API.VirtualFunction.create_engagement(
            wait_for_gitlab=False)
        vfName = user_content['vfName']
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)  # new
        Frontend.Overview.click_on_vf(user_content)
        Frontend.User.go_to_account()
        Wait.id(user_content['email'])
        actualFullName = Get.value_by_name("fullname")
        Helper.internal_assert(user_content['full_name'], actualFullName)
        Click.id(Constants.Dashboard.Statuses.ID)
        Frontend.Overview.click_on_vf(user_content)
        Helper.internal_assert(
            "Current Status", Get.by_css(Constants.Dashboard.Overview.Status.Header.ID))
        Wait.text_by_id(Constants.Dashboard.Overview.Status.Description.ID,
                        "No status update has been provided yet.")
        Click.id(Constants.Dashboard.Avatar.ID)
        Click.link_text("Logout")
        engLeadEmail = DB.User.select_el_email(vfName)
        Frontend.User.relogin(engLeadEmail, Constants.Default.Password.TEXT)
        Frontend.Overview.click_on_vf(user_content)
        Click.css(Constants.Dashboard.Overview.Status.Add.CSS)
        Helper.internal_assert(
            "Add Status", Get.by_css("h3.modal-title.ng-binding"))
        Helper.internal_assert(
            "Use the form below to add the current status of the engagement.", Get.by_css("span.ng-binding"))
        Click.css("textarea[name=\"description\"]")
        Enter.text_by_css(
            "textarea[name=\"description\"]", "Add new Status", wait_for_page=True)
        Helper.internal_assert(
            "Add status", Get.by_id(Constants.Dashboard.DetailedView.VFC.Save_button.ID))
        Click.id(
            Constants.Dashboard.DetailedView.VFC.Save_button.ID, wait_for_page=True)
        Helper.assertTrue("Last updated" in Get.by_id("status-update-details"))
        Wait.text_by_id(
            Constants.Dashboard.Overview.Status.Description.ID, "Add new Status")
        Wait.css(Constants.Dashboard.Overview.Status.Edit.CSS)
        Wait.modal_to_dissappear()
        Click.css(Constants.Dashboard.Overview.Status.Edit.CSS)
        Helper.internal_assert(
            "Current Status", Get.by_css("h3.modal-title.ng-binding"))
        Click.css("textarea[name=\"description\"]")
        Enter.text_by_css("textarea[name=\"description\"]", "Update Status")
        Click.id(Constants.Dashboard.DetailedView.VFC.Save_button.ID)
        Wait.modal_to_dissappear()
        Wait.text_by_id(
            Constants.Dashboard.Overview.Status.Description.ID, "Update Status")
        Frontend.User.logout()
        Frontend.User.relogin(
            user_content['email'], Constants.Default.Password.TEXT)  # new
        Frontend.Overview.click_on_vf(user_content)
        Helper.internal_assert(
            "Current Status", Get.by_css(Constants.Dashboard.Overview.Status.Header.ID))
        Wait.text_by_id(
            Constants.Dashboard.Overview.Status.Description.ID, "Update Status")

    @exception()
    def test_XSS_script(self):
        user_content = API.VirtualFunction.create_engagement(
            wait_for_gitlab=False)
        validate = API.User.update_account_injec_script(user_content)
        assertTrue(validate)
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Frontend.User.open_account_form()
        script = "<script>;</script>"
        Enter.text_by_name("fullname", script, wait_for_page=True)
        Wait.text_by_css(Constants.SubmitButton.CSS, "Update")
        Click.css(Constants.SubmitButton.CSS, wait_for_page=True)
        Wait.text_by_css(
            Constants.Toast.CSS, "Account was updated successfully!")

    @exception()
    def test_add_vf(self):
        user_content = API.User.create_new_user_content_login_with_api()
        Frontend.User.login(
            user_content['email'], Constants.Default.Password.TEXT)
        Frontend.Overview.click_on_vf(user_content)
        # Wizard
        Frontend.Overview.create_and_verify_VF_with_VFversion()