Skip to content

Commit

Permalink
Changes to tests for more logging / debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <[email protected]>
  • Loading branch information
robstryker committed Nov 3, 2023
1 parent c7bbcb8 commit 615734c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/ui-test/server/ui/rspServerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@ export class RSPServerProvider extends AbstractServer {
}

public async createLocalServer(serverPath: string, serverName: string, webView = false): Promise<void> {
log.info(`Creating new local server at ${serverPath}`);
const quick = await this.getCreateNewServerBox();
await quick.selectQuickPick('No, use server on disk');
log.info(`Selected use server on disk`);

log.info(`Awaiting possible file manager input box`);

// it might happen, depending on vscode settings, that native file manager dialog wont appear
// instead we got input box where we can search for files
try {
Expand All @@ -144,7 +149,9 @@ export class RSPServerProvider extends AbstractServer {
log.warn(`InputBox bar did not appear, ${error.name}`);
throw error;
}

// might get secure storage input box
log.info(`Awaiting possible secure storage prompt`);
try {
const secureStorage = await InputBox.create();
const indexOf = (await secureStorage.getMessage()).indexOf('secure storage');
Expand All @@ -157,6 +164,7 @@ export class RSPServerProvider extends AbstractServer {
// Since rsp-ui 0.23.9 there is by default new webView now
// can be turned off by setting property: rsp-ui.newserverwebviewworkflow = false
if (webView) {
log.info(`Filling out new server details via webview`);
await VSBrowser.instance.driver.wait(async () => editorIsOpened('New Server'), 3000);
const editorView = new EditorView();
const editors = await editorView.getOpenEditorTitles();
Expand All @@ -168,12 +176,14 @@ export class RSPServerProvider extends AbstractServer {
await serverView.setServerId(serverName);
await serverView.finish();
} else {
log.info(`Filling out new server details via input box`);
const nameInput = await InputBox.create();
await nameInput.setText(serverName);
await nameInput.confirm();
const optionsInput = await InputBox.create();
await optionsInput.selectQuickPick('No');
}
log.info(`Done creating new server from local disk`);
}

public async createServer(testServer: ServerTestType): Promise<void> {
Expand Down

0 comments on commit 615734c

Please sign in to comment.