mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 17:23:40 -05:00
Reenable disabled smoke and integration tests (#23976)
* Smoke tests run locally * Re-enable smoke tests for pipeline * Resolves merge conflict with distro * Runs smoke tests with xvfb * Updates distro commit hash to fix merge conflict * Install xvfb * Install xvfb for fail on error * Removing log path temporarily * Clarifies edit comments * Darwin SQL build publishes log files * Resolve merge conflicts * Revert "Resolve merge conflicts" This reverts commit fb53d5662745d4ba5c897be0b0c9eb2ed093a38e. * Update distro hash * List all files to find full product.json path * Fix script * Fix script * Adjust test path for arm64 * List all files for darwin * always list all files * Specify Darwin logs directory * Adjust publish log files condition * Fix condition * Removes apt from script * Add missing import * Fix issues stopping smoke tests from running * Disables failing tests * Updates distro hash * Remove list all files scripts * Clean up * Update distro hash
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { join } from 'path';
|
||||
// import { join } from 'path'; // {{SQL CARBON EDIT}} - not used
|
||||
import * as cp from 'child_process';
|
||||
import * as os from 'os';
|
||||
import * as treekill from 'tree-kill';
|
||||
import { IElement, ILocaleInfo, ILocalizedStrings, ILogFile } from './driver';
|
||||
@@ -198,29 +199,30 @@ export class Code {
|
||||
accept = accept || (result => textContent !== undefined ? textContent === result : !!result);
|
||||
|
||||
// {{SQL CARBON EDIT}} Print out found element
|
||||
return await poll(
|
||||
() => this.driver.getElements(windowId, selector).then(els => els.length > 0 ? Promise.resolve(els[0].textContent) : Promise.reject(new Error('Element not found for textContent'))),
|
||||
s => accept!(typeof s.textContent === 'string' ? s.textContent : ''),
|
||||
return await this.poll(
|
||||
() => this.driver.getElements(selector).then(els => els.length > 0 ? Promise.resolve(els[0].textContent) : Promise.reject(new Error('Element not found for textContent'))),
|
||||
s => accept!(typeof s === 'string' ? s : ''),
|
||||
`get text content '${selector}'`,
|
||||
retryCount
|
||||
);
|
||||
this.logger.log(`got text content element ${JSON.stringify(element)}`);
|
||||
return element.textContent;
|
||||
}
|
||||
|
||||
async waitAndClick(selector: string, xoffset?: number, yoffset?: number, retryCount: number = 200): Promise<void> {
|
||||
await this.poll(() => this.driver.click(selector, xoffset, yoffset), () => true, `click '${selector}'`, retryCount);
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - defined waitAndDoubleClick
|
||||
async waitAndDoubleClick(selector: string): Promise<void> {
|
||||
await this.poll(() => this.driver.doubleClick(selector), () => true, `double click '${selector}'`);
|
||||
}
|
||||
|
||||
async waitForSetValue(selector: string, value: string): Promise<void> {
|
||||
await this.poll(() => this.driver.setValue(selector, value), () => true, `set value '${selector}'`);
|
||||
}
|
||||
|
||||
async waitForElements(selector: string, recursive: boolean, accept: (result: IElement[]) => boolean = result => result.length > 0): Promise<IElement[]> {
|
||||
// {{SQL CARBON EDIT}} Print out found element
|
||||
return await poll(() => this.driver.getElements(windowId, selector, recursive), accept, this.logger, `get elements '${selector}'`);
|
||||
this.logger.log(`got elements ${elements.map(element => JSON.stringify(element)).join('\n')}`);
|
||||
return elements;
|
||||
return await this.poll(() => this.driver.getElements(selector, recursive), accept, `get elements '${selector}'`);
|
||||
}
|
||||
|
||||
async waitForElement(selector: string, accept: (result: IElement | undefined) => boolean = result => !!result, retryCount: number = 200): Promise<IElement> {
|
||||
@@ -230,6 +232,11 @@ export class Code {
|
||||
return element;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - defined waitForElementGone
|
||||
async waitForElementGone(selector: string, accept: (result: IElement | undefined) => boolean = result => !result, retryCount: number = 200): Promise<IElement> {
|
||||
return await this.poll<IElement>(() => this.driver.getElements(selector).then(els => els[0]), accept, `get element gone '${selector}'`, retryCount);
|
||||
}
|
||||
|
||||
async waitForActiveElement(selector: string, retryCount: number = 200): Promise<void> {
|
||||
await this.poll(() => this.driver.isActiveElement(selector), r => r, `is active element '${selector}'`, retryCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user