@@ -481,22 +481,6 @@ def expect_form_error_search(page: Page, b: bool) -> None:
481481 expect (page .locator ("#id_q + div.form-text.text-danger" )).to_have_count (int (b ))
482482
483483
484- def _version_ge_43 (page : Page ) -> bool :
485- """
486- Return True if the version is >= 4.3.
487- """
488-
489- old_version_strings = (
490- "(v4.0.11)" ,
491- '<li class="list-inline-item">NetBox Community v4.1.11</li>' ,
492- "NetBox Community v4.2" ,
493- )
494-
495- content = page .content ()
496-
497- return not any (s in content for s in old_version_strings )
498-
499-
500484def configure_table (page : Page , * selected_coumns : str ) -> None :
501485 page .get_by_role ("button" , name = re .compile ("Configure Table" )).click ()
502486
@@ -874,10 +858,7 @@ def search() -> None:
874858 "expires_in" ,
875859 "iaid" ,
876860 )
877- # NetBox v4.3 removes the query when saving the table config.
878- # See table tableConfig.ts in https://github.com/netbox-community/netbox/pull/19284.
879- if _version_ge_43 (page ):
880- search ()
861+ search ()
881862
882863 def check ():
883864 cltt = datetime .fromtimestamp (lease ["cltt" ], timezone .utc )
@@ -913,8 +894,7 @@ def check():
913894 "expires_in" ,
914895 "client_id" ,
915896 )
916- if _version_ge_43 (page ):
917- search ()
897+ search ()
918898
919899 def check ():
920900 cltt = datetime .fromtimestamp (lease ["cltt" ], timezone .utc )
@@ -1003,8 +983,7 @@ def search() -> None:
1003983
1004984 search ()
1005985 configure_table (page , "ip_address" , "hostname" , "subnet_id" )
1006- if _version_ge_43 (page ):
1007- search ()
986+ search ()
1008987
1009988 page .get_by_role ("button" , name = "Export" ).click ()
1010989 with page .expect_download () as dl :
@@ -1570,8 +1549,7 @@ def search() -> None:
15701549 "hostname" ,
15711550 "hw_address" ,
15721551 )
1573- if _version_ge_43 (page ):
1574- search ()
1552+ search ()
15751553
15761554 # The last column should not be off the page.
15771555 expect (page .locator ("table.object-list > tbody > tr > td" ).last ).to_be_in_viewport ()
0 commit comments