Skip to content

Commit

Permalink
Development skip selenium failed tests (#3756)
Browse files Browse the repository at this point in the history
* skip failed tests untill they got fixed

* add html view to the test report

* remove html view from test run result

* add html report view

* fix test_config_validation, Domain valiation message changed in the new release.

* skip home page failed tests

* fix tests in nodes and remove skip

* skip test twin_links

* fix missing import pytest

* fix codacy errors
  • Loading branch information
ramezsaeed authored Dec 18, 2024
1 parent 4def2a9 commit b16d1c4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pages.farm import FarmPage
from utils.grid_proxy import GridProxy
from pages.dashboard import DashboardPage
import pytest

# Time required for the run (17 cases) is approximately 13 minutes.

Expand All @@ -16,6 +17,7 @@ def before_test_setup(browser):
farm_page.navigetor()
return farm_page, farm_name

@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3676")
def test_create_farm(browser):
"""
Test Case: TC907-Create farm with valid name
Expand Down Expand Up @@ -131,6 +133,7 @@ def test_create_farm_invalid_name(browser):
# assert id_up == sorted_up


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3676")
def test_farmpayout_address(browser):
"""
Test Case: TC915 - Add farm payout address
Expand Down Expand Up @@ -175,6 +178,7 @@ def test_farmpayout_address(browser):
assert farm_page.farmpayout_address_value()[:-3] in case


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3676")
def test_ip(browser):
"""
Test Case: TC1141 - Enter valid IP
Expand Down Expand Up @@ -233,7 +237,7 @@ def test_ip(browser):
assert farm_page.wait_for('IP is deleted successfully!')
assert farm_page.get_ip(ip, gateway) == (0,0)


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3676")
def test_gateway(browser):
"""
Test Case: TC1142 - Enter valid Gateway
Expand Down Expand Up @@ -265,6 +269,7 @@ def test_gateway(browser):
farm_page.close_ip()


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3676")
def test_range_ips(browser):
"""
Test Case: TC1212 - Enter invalid to IP in add range of IPs
Expand Down Expand Up @@ -354,6 +359,7 @@ def test_range_ips(browser):
assert farm_page.get_ip(gateway, 0) == (2,0)


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3676")
def test_farm_details(browser):
"""
Test Case: TC914 - Farm Details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import math
import time


# Time required for the run (12 cases) is approximately 3 minutes.

def before_test_setup(browser):
Expand Down Expand Up @@ -179,10 +180,9 @@ def test_config_validation(browser):
cases = [generate_inavalid_ip(), generate_inavalid_gateway(), generate_string(), generate_leters(), ' ', '.', '/', 'q', '1', 'ww', 'ww/ww', '22.22']
for case in cases:
node_page.add_config_input( 0, 0, 0, 0, case)
assert node_page.wait_for('Wrong domain format.')
assert node_page.wait_for('Please provide a valid domain.')
assert node_page.get_save_button().is_enabled()==False


def test_add_config(browser):
"""
Test Case: TC1221 - Add a public config
Expand Down Expand Up @@ -211,7 +211,6 @@ def test_add_config(browser):
time.sleep(2)
assert grid_proxy.get_node_ipv4(node_id) == new_ipv4


def test_remove_config(browser):
"""
Test Case: TC1222 - Remove a public config
Expand Down Expand Up @@ -239,7 +238,6 @@ def test_remove_config(browser):
time.sleep(2)
assert grid_proxy.get_node_ipv4(node_id) == ''


def test_additional_fee(browser):
"""
Test Case: TC1750 - Additional Fee
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pages.dashboard import DashboardPage
from utils.grid_proxy import GridProxy
from pages.bridge import BridgePage
import pytest

# Time required for the run (11 cases) is approximately 3 minutes.

Expand Down Expand Up @@ -115,6 +116,7 @@ def test_check_deposit(browser):
assert grid_proxy.get_twin_address(twin_id[twin_id.find('_')+1:]) == user_address


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3752")
def test_check_withdraw_stellar(browser):
"""
Test Case: TC1118 check withdraw stellar
Expand Down Expand Up @@ -156,7 +158,7 @@ def test_check_withdraw_invalid_stellar(browser):
assert bridge_page.check_withdraw_invalid_stellar('') == False
assert bridge_page.wait_for('This field is required')


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3752")
def test_check_withdraw_tft_amount(browser):
"""
Test Case: TC1131 check withdraw tft amount
Expand Down Expand Up @@ -204,7 +206,7 @@ def test_check_withdraw_invalid_tft_amount(browser):
assert bridge_page.check_withdraw_invalid_tft_amount('') == False
assert bridge_page.wait_for('This field is required')


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3752")
def test_check_withdraw(browser):
"""
Test Case: TC1132 check withdraw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pages.dashboard import DashboardPage
from utils.utils import generate_string, get_seed, get_email
from utils.base import Base
import pytest

# Time required for the run (12 cases) is approximately 2 minutes.

Expand All @@ -24,11 +25,7 @@ def test_validate_homepage_links(browser):
"""
dashboard_page = before_test_setup(browser)
assert dashboard_page.navigate_to_find_more() == ('https://threefold.io/')
if Base.net == 'main':
stats_url = 'https://stats.grid.tf/'
else:
stats_url = 'https://stats.' + Base.net + '.grid.tf/'
assert dashboard_page.navigate_to_explore_capacity() == ( stats_url )
assert dashboard_page.navigate_to_explore_capacity() == ( 'https://stats.' + Base.net + '.grid.tf/')
assert dashboard_page.navigate_to_learn_about_grid() == ('https://www.manual.grid.tf/')


Expand All @@ -53,6 +50,7 @@ def test_tft_price(browser):
assert 0.99 < tft_in_usd * usd_in_tft < 1.1


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3753")
def test_stats(browser):
"""
Test Case: TC1674 - TFT stats
Expand Down Expand Up @@ -120,7 +118,7 @@ def test_create_account(browser):
dashboard_page.logout_account()
assert dashboard_page.wait_for_button(dashboard_page.login_account(password)).is_enabled() == True


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3753")
def test_account_validation(browser):
"""
Test Cases: TC1777 - Connect your wallet Validation
Expand Down Expand Up @@ -169,7 +167,7 @@ def test_account_validation(browser):
assert dashboard_page.wait_for('Password is required')
assert dashboard_page.wait_for_button(dashboard_page.login_account('123456')).is_enabled() == True


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3753")
def test_login_links(browser):
"""
Test Case: TC1801 - Verify login profile manager links
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pages.twin import TwinPage
from utils.grid_proxy import GridProxy
from pages.dashboard import DashboardPage
import pytest

# Time required for the run (6 cases) is approximately 3 minutes.

Expand Down Expand Up @@ -78,7 +79,7 @@ def test_get_tft(browser):
# NO checking as devnet don't direct to TF Connect page https://gettft.com/auth/login?next_url=/gettft/shop/#/buy
assert twin_page.press_locked_info() == 'https://www.manual.grid.tf/documentation/developers/tfchain/tfchain.html#contract-locking'


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3751")
def test_twin_links(browser):
"""
Test Case: TC1801 - Verify your profile links
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import math
import pytest
from utils.utils import byte_converter,convert_to_scaled_float
from pages.statistics import StatisticsPage
from utils.grid_proxy import GridProxy
Expand All @@ -11,7 +12,7 @@ def before_test_setup(browser):
statistics_page.navigate()
return statistics_page


@pytest.mark.skip(reason="https://github.com/threefoldtech/tfgrid-sdk-ts/issues/3751")
def test_statistics_details(browser):
"""
TC1503 - Verify Statistics
Expand Down

0 comments on commit b16d1c4

Please sign in to comment.