aboutsummaryrefslogtreecommitdiffstats
path: root/tests/uiTests/test_invitations_and_throttle_logic.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/uiTests/test_invitations_and_throttle_logic.py')
-rw-r--r--tests/uiTests/test_invitations_and_throttle_logic.py140
1 files changed, 78 insertions, 62 deletions
diff --git a/tests/uiTests/test_invitations_and_throttle_logic.py b/tests/uiTests/test_invitations_and_throttle_logic.py
index f5742fc..2e44ffc 100644
--- a/tests/uiTests/test_invitations_and_throttle_logic.py
+++ b/tests/uiTests/test_invitations_and_throttle_logic.py
@@ -1,53 +1,52 @@
-
-# ============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 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, DB, Frontend
-from tests.uiTests.test_ui_base import TestUiBase
-
-
+# ============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 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, DB, Frontend
+from tests.uiTests.test_ui_base import TestUiBase
+
+
logger = LoggingServiceFactory.get_logger()
@@ -71,14 +70,25 @@ class TestInvitationsLogic(TestUiBase):
Click.id(vf_left_nav_id)
Frontend.Wizard.invite_team_members_modal(user_content[1]['email'])
enguuid = DB.General.select_where(
- "uuid", "ice_engagement", "engagement_manual_id", user_content[0]['engagement_manual_id'], 1)
+ "uuid",
+ "ice_engagement",
+ "engagement_manual_id",
+ user_content[0]['engagement_manual_id'],
+ 1)
invitation_token = DB.User.select_invitation_token(
- "invitation_token", "ice_invitation", "engagement_uuid", enguuid, user_content[1]['email'], 1)
+ "invitation_token",
+ "ice_invitation",
+ "engagement_uuid",
+ enguuid,
+ user_content[1]['email'],
+ 1)
inviterURL = Constants.Default.InviteURL.Login.TEXT + invitation_token
Frontend.General.re_open(inviterURL)
title_id = "title-id-" + engName
Frontend.User.login(
- user_content[1]['email'], Constants.Default.Password.TEXT, title_id)
+ user_content[1]['email'],
+ Constants.Default.Password.TEXT,
+ title_id)
vf_left_nav_id = "clickable-" + engName
Click.id(vf_left_nav_id)
actualVfName = Get.by_id(vf_left_nav_id)
@@ -93,18 +103,22 @@ class TestInvitationsLogic(TestUiBase):
Click.id(vf_left_nav_id)
Click.id(Constants.Dashboard.Overview.TeamMember.ID)
Wait.text_by_css(Constants.Dashboard.Wizard.Title.CSS,
- Constants.Dashboard.Wizard.InviteTeamMembers.Title.TEXT)
+ Constants.Dashboard.Wizard.InviteTeamMembers.
+ Title.TEXT)
Enter.text_by_name("email", user_content[1]['email'])
- Wait.text_by_css(Constants.SubmitButton.CSS,
- Constants.Dashboard.Wizard.InviteTeamMembers.Button.TEXT)
+ Wait.text_by_css(
+ Constants.SubmitButton.CSS,
+ Constants.Dashboard.Wizard.InviteTeamMembers.Button.TEXT)
Click.css(Constants.SubmitButton.CSS)
Wait.id(Constants.Toast.ID)
Helper.internal_assert(
Get.by_id(Constants.Toast.ID), "Invite couldn't be created")
'''
- If there are 5 invitations for a specific email in the last 24 hours for a particular standard user
- and/or email do not send an email. Note: ELs and admins do not have a limit for how many invitations
+ If there are 5 invitations for a specific email in the last 24
+ hours for a particular standard user
+ and/or email do not send an email. Note: ELs and admins do not
+ have a limit for how many invitations
they can get per 24 hours.
'''
@exception()
@@ -126,8 +140,8 @@ class TestInvitationsLogic(TestUiBase):
Frontend.Invite.invite_and_validate_limit(user_content, vf_left_nav_id)
'''
- If there are more than 25 invitations for an invited_by_user_uuid
- corresponding to an normal standard users and read only admins,
+ If there are more than 25 invitations for an invited_by_user_uuid
+ corresponding to an normal standard users and read only admins,
do not send the invite.
'''
@exception()
@@ -155,7 +169,8 @@ class TestInvitationsLogic(TestUiBase):
Click.id(
Constants.Dashboard.Overview.TeamMember.ID, wait_for_page=True)
Wait.text_by_css(Constants.Dashboard.Wizard.Title.CSS,
- Constants.Dashboard.Wizard.InviteTeamMembers.Title.TEXT)
+ Constants.Dashboard.Wizard.InviteTeamMembers.
+ Title.TEXT)
Frontend.Invite.invite_x_users_from_tm(
list_of_invite_emails, countofUser2, countOfem2, 9)
countOfem3 = 2
@@ -163,7 +178,8 @@ class TestInvitationsLogic(TestUiBase):
Click.id(
Constants.Dashboard.Overview.TeamMember.ID, wait_for_page=True)
Wait.text_by_css(Constants.Dashboard.Wizard.Title.CSS,
- Constants.Dashboard.Wizard.InviteTeamMembers.Title.TEXT)
+ Constants.Dashboard.Wizard.InviteTeamMembers.
+ Title.TEXT)
Frontend.Invite.invite_x_users_from_tm(
list_of_invite_emails, countofUser3, countOfem3, 5)
Wait.text_by_id(Constants.Toast.ID,