Skip to content

Commit 210ce72

Browse files
authored
fix: remove enterprise cloud ToS code for login page (#407)
We wait for some time every time when we login, but that ToS is not there. This should speed up the test execution especially in the case of not persisting browser.
1 parent 1068575 commit 210ce72

File tree

1 file changed

+0
-17
lines changed
  • pytest_splunk_addon_ui_smartx/components

1 file changed

+0
-17
lines changed

pytest_splunk_addon_ui_smartx/components/login.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
17-
import time
18-
1916
from selenium.common.exceptions import TimeoutException
2017
from selenium.webdriver.common.by import By
2118

@@ -41,8 +38,6 @@ def __init__(self, browser, container=Selector(select="form.loginForm")):
4138
"username": Selector(by=By.ID, select="username"),
4239
"password": Selector(by=By.ID, select="password"),
4340
"homepage": Selector(select='a[data-action="home"]'),
44-
"accept_checkbox": Selector(by=By.ID, select="accept"),
45-
"accept_button": Selector(select=" .accept-tos-button.btn.btn-primary"),
4641
}
4742

4843
def login(self, username, password):
@@ -51,19 +46,7 @@ def login(self, username, password):
5146
:param username: Str the username for the splunk instance we want to access
5247
:param password: Str the password for the splunk instance we want to access
5348
"""
54-
55-
global ENTERPRISE_CLOUD_ToS
56-
5749
self.username.send_keys(username)
5850
self.password.send_keys(password)
5951
self.password.send_keys("\ue007")
60-
try:
61-
if ENTERPRISE_CLOUD_ToS:
62-
ENTERPRISE_CLOUD_ToS = False
63-
self.wait_to_be_clickable("accept_checkbox")
64-
self.accept_checkbox.click()
65-
self.wait_for("accept_button")
66-
self.accept_button.click()
67-
except TimeoutException:
68-
pass
6952
self.wait_for("homepage", "Could not log in to the Splunk instance.")

0 commit comments

Comments
 (0)