mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
38 lines
1 KiB
TypeScript
38 lines
1 KiB
TypeScript
import { NBrowser } from '../n-browser-interface';
|
||
|
||
module.exports = {
|
||
command(
|
||
this: NBrowser,
|
||
config: {
|
||
baseUrl: string;
|
||
username: string;
|
||
password: string;
|
||
syncFolderPath: string;
|
||
},
|
||
) {
|
||
// CSS‑Selektoren zentral definieren
|
||
const sel = {
|
||
syncBtn: 'button.sync-btn',
|
||
providerSelect: 'formly-field-mat-select mat-select',
|
||
providerOptionWebDAV: '#mat-option-3', // Eintrag „WebDAV“
|
||
baseUrlInput: '.e2e-baseUrl input',
|
||
userNameInput: '.e2e-userName input',
|
||
passwordInput: '.e2e-password input',
|
||
saveBtn: 'mat-dialog-actions button[mat-stroked-button]',
|
||
};
|
||
|
||
return this.click(sel.syncBtn)
|
||
.waitForElementVisible(sel.providerSelect)
|
||
.pause(100)
|
||
.click(sel.providerSelect)
|
||
.click(sel.providerOptionWebDAV)
|
||
.pause(100)
|
||
|
||
.setValue(sel.baseUrlInput, 'http://localhost:2345')
|
||
.setValue(sel.userNameInput, 'alice')
|
||
.setValue(sel.passwordInput, 'alice')
|
||
.pause(100)
|
||
|
||
.click(sel.saveBtn);
|
||
},
|
||
};
|