🧪 Add tests for Firefox 144 - failing unless on 144+

This commit is contained in:
Renato Alves
2025-11-12 21:22:18 +01:00
parent d1852e8981
commit 115e2a1406
8 changed files with 64 additions and 2 deletions

View File

@@ -144,6 +144,34 @@ class TestCSV(unittest.TestCase):
output = lib.run(cmd, stdin=self.pwd)
self.validate_vertbar(output)
def test_firefox_144_default(self):
test = os.path.join(self.test, "test_profile_firefox_144")
cmd = lib.get_script() + [test, "--format", "csv"]
output = lib.run(cmd, stdin=self.pwd)
self.validate_default(output)
def test_firefox_144_tabular(self):
test = os.path.join(self.test, "test_profile_firefox_144")
cmd = lib.get_script() + [test, "--format", "tabular"]
output = lib.run(cmd, stdin=self.pwd)
self.validate_tabular(output)
def test_firefox_144_semicol(self):
test = os.path.join(self.test, "test_profile_firefox_144")
cmd = lib.get_script() + [test, "--format", "csv", "--csv-delimiter", ";", "--csv-quotechar", "'"]
output = lib.run(cmd, stdin=self.pwd)
self.validate_semicol(output)
def test_firefox_144_vertbar(self):
test = os.path.join(self.test, "test_profile_firefox_144")
cmd = lib.get_script() + [test, "--format", "csv", "--csv-delimiter", "\t", "--csv-quotechar", "|"]
output = lib.run(cmd, stdin=self.pwd)
self.validate_vertbar(output)
@unittest.skipIf(lib.platform == "Windows",
"Windows DLL isn't backwards compatible")
def test_firefox_nopassword_46_default(self):

View File

@@ -52,6 +52,11 @@ class TestDirectProfilePass(unittest.TestCase):
"test_profile_firefox_59")
self.run_firefox_with_password()
def test_firefox_144(self):
self.test = os.path.join(lib.get_test_data(),
"test_profile_firefox_144")
self.run_firefox_with_password()
def test_firefox_non_ascii(self):
self.test = os.path.join(lib.get_test_data(),
"test_profile_firefox_LЮшр/")

View File

@@ -51,6 +51,13 @@ class TestJSON(unittest.TestCase):
output = lib.run(cmd, stdin=self.pwd, stderr=sys.stderr)
self.validate_default(output)
def test_firefox_144_default(self):
test = os.path.join(self.test, "test_profile_firefox_144")
cmd = lib.get_script() + [test, "--format", "json"]
output = lib.run(cmd, stdin=self.pwd, stderr=sys.stderr)
self.validate_default(output)
@unittest.skipIf(lib.platform == "Windows",
"Windows DLL isn't backwards compatible")
def test_firefox_nopassword_46_default(self):

View File

@@ -42,6 +42,10 @@ class TestSingleProfile(unittest.TestCase):
self.output_data = "list_single_59"
self.listing_from_single_profile()
def test_firefox_144(self):
self.test_profile = "test_profile_firefox_144"
self.output_data = "list_single_144"
self.listing_from_single_profile()
if __name__ == "__main__":
from simpletap import TAPTestRunner

View File

@@ -43,6 +43,13 @@ class TestNonInteractiveChoice(unittest.TestCase):
out = lib.run(cmd, stdin=pwd)
self.validate(out)
def test_firefox_144(self):
cmd = lib.get_script() + [lib.get_test_data(), "-nc", "7"]
pwd = lib.get_password()
out = lib.run(cmd, stdin=pwd)
self.validate(out)
@unittest.skipIf(lib.platform == "Windows",
"Windows DLL isn't backwards compatible")
def test_firefox_nopass_46(self):

View File

@@ -50,6 +50,14 @@ class TestProfileIni(unittest.TestCase):
output = lib.run(cmd, stdin=payload)
self.validate(output)
def test_firefox_144(self):
cmd = lib.get_script() + [self.test]
choice = "7"
payload = '\n'.join((choice, self.pwd))
output = lib.run(cmd, stdin=payload)
self.validate(output)
def test_firefox_non_ascii(self):
cmd = lib.get_script() + [self.test]
choice = "5"

View File

@@ -0,0 +1,3 @@
- WARNING - profile.ini not found in test_data/test_profile_firefox_59
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_59' is a profile location
- ERROR - Listing single profiles not permitted.

View File

@@ -1,3 +1,3 @@
- WARNING - profile.ini not found in test_data/test_profile_firefox_59
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_59' is a profile location
- WARNING - profile.ini not found in test_data/test_profile_firefox_144
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_144' is a profile location
- ERROR - Listing single profiles not permitted.