Skip to content

Commit 39d27b1

Browse files
committed
Rollback to Downloads as default export directory
1 parent eb654df commit 39d27b1

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

modules/page_object_about_pages.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@ def check_logins_present(
179179
else:
180180
assert expected_logins == actual_logins
181181

182-
def get_documents_dir(self) -> str:
182+
def get_downloads_dir(self) -> str:
183183
# Return full path to Documents directory
184184
home = os.path.expanduser("~")
185-
export_dir = os.path.join(home, "Documents")
185+
export_dir = os.path.join(home, "Downloads")
186186
return export_dir
187187

188188
def remove_password_csv(self):
189189
# Delete password.csv, if there is one in the export location
190-
documents_dir = self.get_documents_dir()
191-
passwords_csv = os.path.join(documents_dir, "passwords.csv")
192-
for file in os.listdir(documents_dir):
190+
downloads_dir = self.get_downloads_dir()
191+
passwords_csv = os.path.join(downloads_dir, "passwords.csv")
192+
for file in os.listdir(downloads_dir):
193193
delete_files_regex = re.compile(r"\bpasswords.csv\b")
194194
if delete_files_regex.match(file):
195195
os.remove(passwords_csv)

tests/password_manager/test_password_csv_correctness.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def test_password_csv_correctness(driver_and_saved_logins, home_folder, sys_plat
4343
keyboard.tap(Key.enter)
4444

4545
# Verify the exported csv file is present in the target folder
46-
documents_directory = about_logins.get_documents_dir()
47-
csv_file = os.path.join(documents_directory, "passwords.csv")
46+
downloads_directory = about_logins.get_downloads_dir()
47+
csv_file = os.path.join(downloads_directory, "passwords.csv")
4848
about_logins.wait.until(lambda _: os.path.exists(csv_file))
4949

5050
# Verify the contents of the exported csv file

tests/password_manager/test_password_csv_export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def test_password_csv_export(
4343
keyboard.tap(Key.enter)
4444

4545
# Verify the exported csv file is present in the target folder
46-
documents_directory = about_logins.get_documents_dir()
47-
csv_file = os.path.join(documents_directory, "passwords.csv")
46+
downloads_directory = about_logins.get_downloads_dir()
47+
csv_file = os.path.join(downloads_directory, "passwords.csv")
4848
about_logins.wait.until(lambda _: os.path.exists(csv_file))
4949

5050
# Delete the password.csv created

0 commit comments

Comments
 (0)