e2e: changed test order
This commit is contained in:
parent
d309aa366d
commit
c7e230d070
|
@ -1,15 +1,15 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import signal
|
import signal
|
||||||
import requests
|
import time
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from http.client import RemoteDisconnected
|
from http.client import RemoteDisconnected
|
||||||
from os import environ
|
from os import environ
|
||||||
import time
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import requests
|
||||||
from _pytest.runner import runtestprotocol
|
from _pytest.runner import runtestprotocol
|
||||||
from requests.exceptions import ConnectionError as c_er
|
from requests.exceptions import ConnectionError as c_er
|
||||||
|
|
||||||
|
@ -182,13 +182,12 @@ class UploadApkException(Exception):
|
||||||
|
|
||||||
def _upload_and_check_response(apk_file_path):
|
def _upload_and_check_response(apk_file_path):
|
||||||
with _upload_time_limit(1000):
|
with _upload_time_limit(1000):
|
||||||
with open(apk_file_path, 'rb') as f:
|
resp = sauce.storage.upload(apk_file_path)
|
||||||
resp = sauce.storage._session.request('post', '/v1/storage/upload', files={'payload': f})
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if resp['item']['name'] != test_suite_data.apk_name:
|
if resp.name != test_suite_data.apk_name:
|
||||||
raise UploadApkException("Incorrect apk was uploaded to Sauce storage, response:\n%s" % resp)
|
raise UploadApkException("Incorrect apk was uploaded to Sauce storage, response:\n%s" % resp)
|
||||||
except KeyError:
|
except AttributeError:
|
||||||
raise UploadApkException("Error when uploading apk to Sauce storage, response:\n%s" % resp)
|
raise UploadApkException("Error when uploading apk to Sauce storage, response:\n%s" % resp)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -160,13 +160,13 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||||
|
|
||||||
self.home_2.just_fyi("Check 'Open in Status' option")
|
self.home_2.just_fyi("Check 'Open in Status' option")
|
||||||
# url_to_open = 'http://status.app'
|
# url_to_open = 'http://status.app'
|
||||||
url_to_open = 'https://github.com/'
|
url_to_open = 'https://www.ethereum.org/en/run-a-node/'
|
||||||
self.chat_1.send_message(url_to_open)
|
self.chat_1.send_message(url_to_open)
|
||||||
chat_element = self.chat_2.chat_element_by_text(url_to_open)
|
chat_element = self.chat_2.chat_element_by_text(url_to_open)
|
||||||
if chat_element.is_element_displayed(120):
|
if chat_element.is_element_displayed(120):
|
||||||
chat_element.click_on_link_inside_message_body()
|
chat_element.click_on_link_inside_message_body()
|
||||||
web_view = self.chat_2.open_in_status_button.click()
|
web_view = self.chat_2.open_in_status_button.click()
|
||||||
if not web_view.element_by_text("Let’s build from here").is_element_displayed(60):
|
if not web_view.element_by_text("Take full control. Run your own node.").is_element_displayed(60):
|
||||||
self.errors.append('URL was not opened from 1-1 chat')
|
self.errors.append('URL was not opened from 1-1 chat')
|
||||||
else:
|
else:
|
||||||
self.errors.append("Message with URL was not received")
|
self.errors.append("Message with URL was not received")
|
||||||
|
@ -516,7 +516,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||||
self.errors.verify_no_errors()
|
self.errors.verify_no_errors()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xdist_group(name="new_seven_2")
|
@pytest.mark.xdist_group(name="new_six_2")
|
||||||
@marks.new_ui_critical
|
@marks.new_ui_critical
|
||||||
class TestOneToOneChatMultipleSharedDevicesNewUiTwo(MultipleSharedDeviceTestCase):
|
class TestOneToOneChatMultipleSharedDevicesNewUiTwo(MultipleSharedDeviceTestCase):
|
||||||
|
|
||||||
|
|
|
@ -423,8 +423,11 @@ class HomeView(BaseView):
|
||||||
chat = self.get_chat_view()
|
chat = self.get_chat_view()
|
||||||
self.start_a_new_chat_bottom_sheet_button.click()
|
self.start_a_new_chat_bottom_sheet_button.click()
|
||||||
for user_name in user_names_to_add:
|
for user_name in user_names_to_add:
|
||||||
chat.get_username_checkbox(user_name).click_until_presence_of_element(
|
check_box = chat.get_username_checkbox(user_name)
|
||||||
chat.get_username_checkbox(user_name, state_on=True))
|
if not check_box.is_element_displayed():
|
||||||
|
raise NoSuchElementException(
|
||||||
|
"User with the name '%s' is not in contacts list so can't create a group chat" % user_name)
|
||||||
|
check_box.click_until_presence_of_element(chat.get_username_checkbox(user_name, state_on=True))
|
||||||
self.setup_chat_button.click()
|
self.setup_chat_button.click()
|
||||||
chat.chat_name_editbox.send_keys(group_chat_name)
|
chat.chat_name_editbox.send_keys(group_chat_name)
|
||||||
chat.create_button.click()
|
chat.create_button.click()
|
||||||
|
|
Loading…
Reference in New Issue