type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
results => { if (mapper) { return results.map(mapper); } return results; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
ArrowFunction
() => { this.setLoading(key, false); this.displayTip(key, this.labels.asyncFailure, 'info', false); this.setProperty(key, '_displayedAsyncFailure', true); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
ArrowFunction
(fieldset, fi) => { fieldset.controls.forEach((fieldsetControl, ci) => { if (fieldsetControl.key === key) { fieldsetIndex = fi; controlIndex = ci; } }); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
ArrowFunction
(fieldsetControl, ci) => { if (fieldsetControl.key === key) { fieldsetIndex = fi; controlIndex = ci; } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
ArrowFunction
() => func()
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public isActiveControlValid(): boolean { return !!this.getValue(this.currentKey); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getActiveControl(): NovoFormControl { return this.getControl(this.currentKey); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getActiveKey(): string { return this.currentKey; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getActiveValue(): any { return this.getValue(this.currentKey); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getActiveInitialValue(): any { return this.getInitialValue(this.currentKey); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getControl(key: string): NovoFormControl { if (!key) { console.error('[FieldInteractionAPI] - invalid or missing "key"'); // tslint:disable-line return null; } let control = this.form.controls[key]; if (!control) { console.error('[FieldInterac...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getValue(key: string): any { let control = this.getControl(key); if (control) { return control.value; } return null; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getRawValue(key: string): any { let control = this.getControl(key); if (control) { return control.rawValue; } return null; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getInitialValue(key: string): any { let control = this.getControl(key); if (control) { return control.initialValue; } return null; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public setValue(key: string, value: any, options?: { onlySelf?: boolean, emitEvent?: boolean, emitModelToViewChange?: boolean, emitViewToModelChange?: boolean }): void { let control = this.getControl(key); if (control) { control.setValue(value, options); ...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public patchValue(key: string, value: any, options?: { onlySelf?: boolean, emitEvent?: boolean, emitModelToViewChange?: boolean, emitViewToModelChange?: boolean }): void { let control = this.getControl(key); if (control) { control.setValue(value, options)...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public setReadOnly(key: string, isReadOnly: boolean): void { let control = this.getControl(key); if (control) { control.setReadOnly(isReadOnly); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public setRequired(key: string, required: boolean): void { let control = this.getControl(key); if (control) { control.setRequired(required); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public hide(key: string, clearValue: boolean = true): void { let control = this.getControl(key); if (control) { control.hide(clearValue); this.disable(key, { emitEvent: false }); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public show(key: string): void { let control = this.getControl(key); if (control) { control.show(); this.enable(key, { emitEvent: false }); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public disable(key: string, options?: { onlySelf?: boolean; emitEvent?: boolean; }): void { let control = this.getControl(key); if (control) { control.disable(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public enable(key: string, options?: { onlySelf?: boolean; emitEvent?: boolean; }): void { let control = this.getControl(key); if (control) { control.enable(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public markAsInvalid(key: string, validationMessage?: string): void { let control = this.getControl(key); if (control) { if (control) { control.markAsInvalid(validationMessage); } } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public markAsDirty(key: string, options?: { onlySelf?: boolean; }): void { let control = this.getControl(key); if (control) { control.markAsDirty(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public markAsPending(key: string, options?: { onlySelf?: boolean; }): void { let control = this.getControl(key); if (control) { control.markAsPending(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public markAsPristine(key: string, options?: { onlySelf?: boolean; }): void { let control = this.getControl(key); if (control) { control.markAsPristine(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public markAsTouched(key: string, options?: { onlySelf?: boolean; }): void { let control = this.getControl(key); if (control) { control.markAsTouched(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public markAsUntouched(key: string, options?: { onlySelf?: boolean; }): void { let control = this.getControl(key); if (control) { control.markAsUntouched(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public updateValueAndValidity(key: string, options?: { onlySelf?: boolean; emitEvent?: boolean; }): void { let control = this.getControl(key); if (control) { control.updateValueAndValidity(options); } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public displayToast(toastConfig: { message: string, title?: string, hideDelay?: number, icon?: string, theme?: string, position?: string, isCloseable?: boolean, customClass?: string }): void { if (this.toaster) { this.toaster.alert...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public displayTip(key: string, tip: string, icon?: string, allowDismiss?: boolean): void { let control = this.getControl(key); if (control) { control.tipWell = { tip: tip, icon: icon, button: allowDismiss }; } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public confirmChanges(key: string, message?: string): Promise<boolean> { let history = this.getProperty(key, 'valueHistory'); let oldValue = history[history.length - 2]; let newValue = this.getValue(key); let label = this.getProperty(key, 'label'); (document.activeElement as any...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public promptUser(key: string, changes: string[]): Promise<boolean> { let showYes: boolean = true; (document.activeElement as any).blur() return this.modalService.open(ControlPromptModal, { changes }).onClosed; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public setProperty(key: string, prop: string, value: any): void { let control = this.getControl(key); if (control) { control[prop] = value; } }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public getProperty(key: string, prop: string): any { let control = this.getControl(key); if (control) { return control[prop]; } return null; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public isValueEmpty(key: string): boolean { let value = this.getValue(key); return Helpers.isEmpty(value); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public isValueBlank(key: string): boolean { let value = this.getValue(key); return Helpers.isBlank(value); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public hasField(key: string): boolean { return !!this.form.controls[key]; }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public addStaticOption(key: string, newOption: any): void { let control = this.getControl(key); let optionToAdd = newOption; if (control) { let currentOptions = this.getProperty(key, 'options'); if (!currentOptions || !currentOptions.length) { let config ...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public removeStaticOption(key: string, optionToRemove: string): void { let control = this.getControl(key); if (control) { let currentOptions = this.getProperty(key, 'options'); if (!currentOptions || !currentOptions.length) { let config = this.getProperty(key, 'c...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public modifyPickerConfig(key: string, config: { format?: string, optionsUrl?: string, optionsUrlBuilder?: Function, optionsPromise?: any, options?: any[] }, mapper?: Function): void { let control = this.getControl(key); if (control) { let newConfig: any = Object.assign({}, control.config);...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public setLoading(key: string, loading: boolean) { let control = this.getControl(key); if (control) { if (loading) { this.form.controls[key].fieldInteractionloading = true; control.setErrors({ 'loading': true }); // History cle...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public addControl(key: string, metaForNewField: any, position: string = FieldInteractionApi.FIELD_POSITIONS.ABOVE_FIELD, initialValue?: any): void { if (!metaForNewField.key && !metaForNewField.name) { console.error('[FieldInteractionAPI] - missing "key" in meta for new field'); // tslint:disable-l...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public removeControl(key: string): void { if (!this.form.controls[key]) { // Field is not on the form return null; } let control = this.getControl(key); if (control) { let fieldsetIndex = -1; let controlIndex = -1; this.form.f...
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
MethodDeclaration
public debounce(func: () => void, wait = 50) { let h: any; clearTimeout(h); h = setTimeout(() => func(), wait); }
ezrashim/novo-elements
src/platform/elements/form/FieldInteractionApi.ts
TypeScript
ClassDeclaration
@TestFixture('Message') export class FixtureMessage { msg: Message = new Message(); @Test('it should convert JS date to short format') public testDate() { this.msg.date = new Date("2003-01-02T04:05"); Expect(this.msg.dateStr).toBe("01-02-03"); } @Test('it should convert JS date to...
BadOPCode/qwk-ts
__tests__/Message.test.ts
TypeScript
MethodDeclaration
@Test('it should convert JS date to short format') public testDate() { this.msg.date = new Date("2003-01-02T04:05"); Expect(this.msg.dateStr).toBe("01-02-03"); }
BadOPCode/qwk-ts
__tests__/Message.test.ts
TypeScript
MethodDeclaration
@Test('it should convert JS date to a short time format') public testTime() { this.msg.date = new Date("2003-01-02T04:05"); Expect(this.msg.timeStr).toBe("04:05"); }
BadOPCode/qwk-ts
__tests__/Message.test.ts
TypeScript
MethodDeclaration
@Test('dateStr and timeStr should set date') public testDateTimeStr() { this.msg.date = new Date("2003-01-02T04:05"); this.msg.timeStr = "02:01"; this.msg.dateStr = "05-04-03"; Expect(this.msg.date.toDateString()).toBe('Sun May 04 2003'); }
BadOPCode/qwk-ts
__tests__/Message.test.ts
TypeScript
MethodDeclaration
@Test('Length should be amount of 128 byte blocks message and header') public testLength() { this.msg.message = "hello world"; Expect(this.msg.length).toBe(2); this.msg.message = "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890...
BadOPCode/qwk-ts
__tests__/Message.test.ts
TypeScript
ArrowFunction
(iconProps: IFluentIconsProps, props: React.HTMLAttributes<HTMLElement>): JSX.Element => { const { primaryFill, className } = iconProps; return <svg {...props} width={24} height={24} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" className={className}><path d="M12.01 2.25c.74 0 1.47.1 2.18.25.32....
LiquidatorCoder/fluentui-system-icons
packages/react-icons/src/components/Settings24Filled.tsx
TypeScript
FunctionDeclaration
export default function fetchAndSetContext(): Promise<void>;
Vlowsz/Morph-v1
node_modules/@line/liff/dist/lib/init/fetchAndSetContext.d.ts
TypeScript
TypeAliasDeclaration
export type TSEnumMember = JSNodeBase & { type: 'TSEnumMember'; id: StringLiteral | Identifier; initializer?: AnyExpression; };
1ntEgr8/rome
packages/@romejs/js-ast/typescript/TSEnumMember.ts
TypeScript
ClassDeclaration
//@target: ES6 class C { [e] = 1 }
divy-beta/swc-typechecker
typescript/checker/tests/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts
TypeScript
FunctionDeclaration
async function init(): Promise<void> { const repoSlugs = [ 'sourcegraph/java-langserver', 'gorilla/mux', 'gorilla/securecookie', 'sourcegraphtest/AlwaysCloningTest', 'sourcegraph/godockerize', 'sourcegraph/jsonrpc2', 'sourcegra...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
error => { console.error('Caught unhandledRejection:', error) }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
error => { console.error('Caught rejectionHandled:', error) }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
slug => `github.com/${slug}`
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { // Reset date mocking MockDate.reset() // Start browser. driver = await createDriverForTest({ sourcegraphBaseUrl, logBrowserConsole: true }) await init() }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { if (driver) { await driver.close() } }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => driver.page
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { if (driver) { // Clear local storage to reset sidebar selection (files or tabs) for each test await driver.page.evaluate(() => { localStorage.setItem('repo-rev-sidebar-last-tab', 'files') }) await driver.resetUserSettings() ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { localStorage.setItem('repo-rev-sidebar-last-tab', 'files') }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { test('Check settings are saved and applied', async () => { await driver.page.goto(sourcegraphBaseUrl + '/users/test/settings') await driver.page.waitForSelector('.e2e-settings-file .monaco-editor') const message = 'A wild notice appears!' await driver.re...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto(sourcegraphBaseUrl + '/users/test/settings') await driver.page.waitForSelector('.e2e-settings-file .monaco-editor') const message = 'A wild notice appears!' await driver.replaceText({ selector: '.e2e-settings-file .mo...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
message => { const elem = document.querySelector('.e2e-global-alert .notices .global-alerts__alert') if (!elem) { throw new Error('No .e2e-global-alert .notices .global-alerts__alert element found') } if (!(elem as HTMLElement).innerTe...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto(sourcegraphBaseUrl + '/users/test/settings/tokens/new') await driver.page.waitForSelector('.e2e-create-access-token-description') const name = 'E2E Test ' + new Date().toISOString() + ' ' + random(1, 1e7) await driver.replaceText({ ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { const elem = document.querySelector<HTMLInputElement>('.e2e-access-token input[type=text]') return elem && elem.value }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
name => !document.querySelector(`[data-e2e-access-token-description="${name}"]`)
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto(sourcegraphBaseUrl + '/users/test/settings/profile') await driver.page.waitForSelector('.e2e-user-settings-profile-page-username') const name = 'alice.bob-chris-' await driver.replaceText({ selector: '.e2e-user-setti...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { test('External service add, edit, delete', async () => { const displayName = 'e2e-github-test-2' await driver.ensureHasExternalService({ kind: ExternalServiceKind.GITHUB, displayName, config: '{"url": "https://g...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { const displayName = 'e2e-github-test-2' await driver.ensureHasExternalService({ kind: ExternalServiceKind.GITHUB, displayName, config: '{"url": "https://github.myenterprise.com", "token": "initial-token", "reposit...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => !document.querySelector('[data-e2e-external-service-name="e2e-github-test-2"]')
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { const repo = 'sourcegraph/go-blame' // Tiny repo, fast to clone const repositoryPathPattern = 'foobar/{host}/{nameWithOwner}' const slug = `github.com/${repo}` const pathPatternSlug = `foobar/github.com/${repo}` const config = { ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.ensureHasExternalService({ kind: ExternalServiceKind.AWSCODECOMMIT, displayName: 'e2e-aws-code-commit', config: JSON.stringify({ region: 'us-west-1', accessKeyID: awsAccessKeyID, ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { const elem = document.querySelector<HTMLElement>('.e2e-repo-blob') return elem && elem.textContent }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.ensureHasExternalService({ kind: ExternalServiceKind.BITBUCKETSERVER, displayName: 'e2e-bitbucket-server', config: JSON.stringify({ url: bbsURL, token: bbsToken, username: ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { test('Repositories list', async () => { await driver.page.goto(sourcegraphBaseUrl + '/site-admin/repositories?query=gorilla%2Fmux') await driver.page.waitForSelector('a[href="/github.com/gorilla/mux"]', { visible: true }) await percySnapshot(driver.page, 'Repositorie...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto(sourcegraphBaseUrl + '/site-admin/repositories?query=gorilla%2Fmux') await driver.page.waitForSelector('a[href="/github.com/gorilla/mux"]', { visible: true }) await percySnapshot(driver.page, 'Repositories list') }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/search?q=repo:%5Egithub.com/gorilla/mux%24&patternType=regexp' ) await driver.page.waitForSelector('a[href="/github.com/gorilla/mux"]', { visible: true }) // Flaky https://github.com/sourcegraph...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/search?q=repo:%5Egithub.com/gorilla/mux%24+file:%5Emux.go%24&patternType=regexp' ) await driver.page.waitForSelector('a[href="/github.com/gorilla/mux"]', { visible: true }) // Flaky https://gith...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/search?q=repo:^github.com/gorilla/mux$&patternType=regexp file:mux.go "func NewRouter"' ) await driver.page.waitForSelector('a[href="/github.com/gorilla/mux"]', { visible: true }) ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { test('changes the theme', async () => { await driver.page.goto(sourcegraphBaseUrl + '/github.com/gorilla/mux/-/blob/mux.go') await driver.page.waitForSelector('.theme.theme-dark, .theme.theme-light', { visible: true }) const getActiveThemeClasses = (): Promise<strin...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto(sourcegraphBaseUrl + '/github.com/gorilla/mux/-/blob/mux.go') await driver.page.waitForSelector('.theme.theme-dark, .theme.theme-light', { visible: true }) const getActiveThemeClasses = (): Promise<string[]> => driver.page.evalua...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
(): Promise<string[]> => driver.page.evaluate(() => Array.from(document.querySelector('.theme')!.classList).filter(c => c.startsWith('theme-')) )
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => Array.from(document.querySelector('.theme')!.classList).filter(c => c.startsWith('theme-'))
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
c => c.startsWith('theme-')
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async (line: number, spanOffset: number): Promise<void> => { const selector = `${blobTableSelector} tr:nth-child(${line}) > td.code > div:nth-child(1) > span:nth-child(${spanOffset})` await driver.page.waitForSelector(selector, { visible: true }) await driver.page.click(selector) ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async (expectedCount = 1): Promise<string[]> => { const selector = expectedCount > 1 ? `.e2e-tooltip-content:nth-child(${expectedCount})` : '.e2e-tooltip-content' await driver.page.waitForSelector(selector, { visible: true }) return await driver.page.evaluate(() => ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => // You can't reference hoverContentSelector in puppeteer's driver.page.evaluate Array.from(document.querySelectorAll('.e2e-tooltip-content')).map(t => t.textContent || '')
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
t => t.textContent || ''
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async (val: string, count?: number): Promise<void> => { expect(await getHoverContents(count)).toEqual(expect.arrayContaining([expect.stringContaining(val)])) }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async (): Promise<void> => { const selector = '.e2e-tooltip-go-to-definition' await driver.page.waitForSelector(selector, { visible: true }) await driver.page.click(selector) }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async (): Promise<void> => { const selector = '.e2e-tooltip-find-references' await driver.page.waitForSelector(selector, { visible: true }) await driver.page.click(selector) }
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
() => { test('does navigation on file click', async () => { await driver.page.goto( sourcegraphBaseUrl + '/github.com/sourcegraph/godockerize@05bac79edd17c0f55127871fa9c6f4d91bebf07c' ) await ( await driver.page.waitFor...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/github.com/sourcegraph/godockerize@05bac79edd17c0f55127871fa9c6f4d91bebf07c' ) await ( await driver.page.waitForSelector('[data-tree-path="godockerize.go"]', { ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/github.com/sourcegraph/jsonrpc2@c6c7b9aa99fb76ee5460ccd3912ba35d419d493d' ) await driver.page.waitForSelector('.tree__row-icon', { visible: true }) await driver.page.click('....
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/github.com/sourcegraph/jsonrpc2@c6c7b9aa99fb76ee5460ccd3912ba35d419d493d' ) await driver.page.waitForSelector('.tree__row-label', { visible: true }) await driver.page.click('...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/github.com/sourcegraph/godockerize@05bac79edd17c0f55127871fa9c6f4d91bebf07c/-/blob/godockerize.go' ) await driver.page.waitForSelector('.tree__row--active [data-tree-...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript
ArrowFunction
async () => { await driver.page.goto( sourcegraphBaseUrl + '/github.com/sourcegraph/jsonrpc2@c6c7b9aa99fb76ee5460ccd3912ba35d419d493d/-/tree/websocket' ) await driver.page.waitForSelector('.tree__row', { visible: true }) ...
winnerineast/sourcegraph
web/src/e2e/e2e.test.ts
TypeScript