e2e: changed test order

This commit is contained in:
Yevheniia Berdnyk 2023-11-24 02:37:28 +02:00
parent d309aa366d
commit c7e230d070
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
3 changed files with 13 additions and 11 deletions

View File

@ -1,15 +1,15 @@
import os
import re
import signal
import requests
import time
from contextlib import contextmanager
from dataclasses import dataclass
from datetime import datetime
from http.client import RemoteDisconnected
from os import environ
import time
import pytest
import requests
from _pytest.runner import runtestprotocol
from requests.exceptions import ConnectionError as c_er
@ -182,13 +182,12 @@ class UploadApkException(Exception):
def _upload_and_check_response(apk_file_path):
with _upload_time_limit(1000):
with open(apk_file_path, 'rb') as f:
resp = sauce.storage._session.request('post', '/v1/storage/upload', files={'payload': f})
resp = sauce.storage.upload(apk_file_path)
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)
except KeyError:
except AttributeError:
raise UploadApkException("Error when uploading apk to Sauce storage, response:\n%s" % resp)

View File

@ -160,13 +160,13 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
self.home_2.just_fyi("Check 'Open in Status' option")
# 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)
chat_element = self.chat_2.chat_element_by_text(url_to_open)
if chat_element.is_element_displayed(120):
chat_element.click_on_link_inside_message_body()
web_view = self.chat_2.open_in_status_button.click()
if not web_view.element_by_text("Lets 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')
else:
self.errors.append("Message with URL was not received")
@ -516,7 +516,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
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
class TestOneToOneChatMultipleSharedDevicesNewUiTwo(MultipleSharedDeviceTestCase):

View File

@ -423,8 +423,11 @@ class HomeView(BaseView):
chat = self.get_chat_view()
self.start_a_new_chat_bottom_sheet_button.click()
for user_name in user_names_to_add:
chat.get_username_checkbox(user_name).click_until_presence_of_element(
chat.get_username_checkbox(user_name, state_on=True))
check_box = chat.get_username_checkbox(user_name)
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()
chat.chat_name_editbox.send_keys(group_chat_name)
chat.create_button.click()