Skip to content

Commit 559f916

Browse files
committed
fixed ftp test after backwpup FTP refactor (FTP, FTPS, SFTP and SFTPPK)
1 parent 6a522c8 commit 559f916

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backwpup/utils/storage.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ export class StorageUtils {
128128
await this.page.locator('#ftpuser').fill(BACKWPUP_INFOS.ftp.username);
129129
await this.page.locator('#ftppass').fill(BACKWPUP_INFOS.ftp.password);
130130
await this.page.locator('#ftphostport').fill(BACKWPUP_INFOS.ftp.port ?? '21');
131-
// Checkboxes
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) {
131+
const ftpType = BACKWPUP_INFOS.ftp.ssl ? 'ftps' : 'ftp';
132+
await this.page.locator('#ftpcontype').selectOption(ftpType);
133+
// Only set passive mode checkbox if the passive mode option checkbox element exists and is visible
134+
const passiveCheckboxVisible = await this.page.locator('#ftppasv').isVisible().catch(() => false);
135+
if (passiveCheckboxVisible) {
135136
await this.page.locator('#ftppasv').setChecked(BACKWPUP_INFOS.ftp.passiveMode, { force: true });
136137
}
137138
const timestamp = Date.now();

0 commit comments

Comments
 (0)