Skip to content

Commit 6a522c8

Browse files
authored
removed checkbox that isnot in FTP UI any more (#339)
* removed checkbox that isnot in FTP UI any more * added condition on the enable line instead of removing it to be backward compatible * fix CR
1 parent 8253086 commit 6a522c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backwpup/utils/storage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ export class StorageUtils {
129129
await this.page.locator('#ftppass').fill(BACKWPUP_INFOS.ftp.password);
130130
await this.page.locator('#ftphostport').fill(BACKWPUP_INFOS.ftp.port ?? '21');
131131
// Checkboxes
132-
await this.page.locator('#ftpssl').setChecked(BACKWPUP_INFOS.ftp.ssl, { force: true });
132+
// Only set SSL checkbox if the SSL option checkbox element exists and is visible
133+
const sslCheckboxVisible = await this.page.locator('#ftpssl').isVisible().catch(() => false);
134+
if (sslCheckboxVisible) {
133135
await this.page.locator('#ftppasv').setChecked(BACKWPUP_INFOS.ftp.passiveMode, { force: true });
136+
}
134137
const timestamp = Date.now();
135138
const directoryName = getFolderNameFromHost();
136139
// Changing the directory name to prevent old backups to appear and affect the test

0 commit comments

Comments
 (0)