type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
const deviceSupport = new DeviceSupport();
deviceSupport.addDetector({name: 'foo', supported: async () => true});
assert.throws(() => deviceSupport.addDetector({
name: 'foo',
supported: async () => false
}), 'foo already added');
} | GoogleChromeLabs/perception-toolk | src/support/device-support_test.ts | TypeScript |
ArrowFunction |
() => deviceSupport.addDetector({
name: 'foo',
supported: async () => false
}) | GoogleChromeLabs/perception-toolk | src/support/device-support_test.ts | TypeScript |
ArrowFunction |
async () => false | GoogleChromeLabs/perception-toolk | src/support/device-support_test.ts | TypeScript |
ArrowFunction |
(done) => {
const deviceSupport = new DeviceSupport();
deviceSupport.useEvents = true;
deviceSupport.addDetector({name: 'foo', supported: async () => true});
window.addEventListener(DeviceSupport.supportsEvent, (evt) => {
const supportEvt = evt as CustomEvent<Support>;
assert.deepEqual(sup... | GoogleChromeLabs/perception-toolk | src/support/device-support_test.ts | TypeScript |
ArrowFunction |
(evt) => {
const supportEvt = evt as CustomEvent<Support>;
assert.deepEqual(supportEvt.detail, { foo: true });
done();
} | GoogleChromeLabs/perception-toolk | src/support/device-support_test.ts | TypeScript |
ArrowFunction |
() => {
test("isCompleted set to false should show up on document", () => {
const markAsCompleted = jest.fn()
const handleEditTask = jest.fn()
render(
<StateProvider>
<TodoListFilter
markAsCompleted={markAsCompleted}
isCompleted={false}
editTask={handleEditTask... | cremalab/israel-todo | src/components/TodoListFilter/TodoListFilter.test.tsx | TypeScript |
ArrowFunction |
() => {
const markAsCompleted = jest.fn()
const handleEditTask = jest.fn()
render(
<StateProvider>
<TodoListFilter
markAsCompleted={markAsCompleted}
isCompleted={false}
editTask={handleEditTask}
/>
</StateProvider>,
)
} | cremalab/israel-todo | src/components/TodoListFilter/TodoListFilter.test.tsx | TypeScript |
ArrowFunction |
() => {
const markAsCompleted = jest.fn()
const handleEditTask = jest.fn()
render(
<StateProvider>
<TodoListFilter
markAsCompleted={markAsCompleted}
isCompleted={true}
editTask={handleEditTask}
/>
</StateProvider>,
)
} | cremalab/israel-todo | src/components/TodoListFilter/TodoListFilter.test.tsx | TypeScript |
ArrowFunction |
() => {
const markAsCompleted = jest.fn()
const handleEditTask = jest.fn()
const newTodo: Todo = {
id: "123",
todo: "Add tests",
isCompleted: false,
}
store.dispatch(addTodo(newTodo))
store.dispatch(toggleTodo(newTodo.id))
const state = store.getState().todos
render(
... | cremalab/israel-todo | src/components/TodoListFilter/TodoListFilter.test.tsx | TypeScript |
FunctionDeclaration |
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const options = new DocumentBuilder()
.setTitle('Star Wars')
.setDescription('YVH')
.setVersion('1.0')
.build();
const document = SwaggerModule.createDocument(app, options);
SwaggerModule.setup('api', app, document);
... | gcinc91/lignbe | src/main.ts | TypeScript |
ArrowFunction |
t => type.toLowerCase().includes(t.type.toLowerCase()) | MccCareplan/providersmartapp | src/app/care-team/care-team.component.ts | TypeScript |
ArrowFunction |
r => role.toLowerCase().includes(r.role.toLowerCase()) | MccCareplan/providersmartapp | src/app/care-team/care-team.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-care-team',
templateUrl: './care-team.component.html',
styleUrls: ['./care-team.component.css']
})
export class CareTeamComponent implements OnInit {
constructor(public dataservice: DataService) {
}
gridColumns = 4;
iconNames = {
types:
[
{ type: 'person',... | MccCareplan/providersmartapp | src/app/care-team/care-team.component.ts | TypeScript |
MethodDeclaration |
getTypeIcon(type) {
if (!type)
return '';
const icon = this.iconNames.types.filter(t => type.toLowerCase().includes(t.type.toLowerCase()));
if (icon.length > 0) {
return icon[0].icon;
} else {
return '';
}
} | MccCareplan/providersmartapp | src/app/care-team/care-team.component.ts | TypeScript |
MethodDeclaration |
getRoleIcon(role) {
if (!role)
return '';
const icon = this.iconNames.roles.filter(r => role.toLowerCase().includes(r.role.toLowerCase()));
if (icon.length > 0) {
return icon[0].icon;
} else {
return '';
}
} | MccCareplan/providersmartapp | src/app/care-team/care-team.component.ts | TypeScript |
ArrowFunction |
() => {
const [value, setValue] = React.useState<number>(1);
const steps = [
{
active: value === 0,
complete: value > 0,
onClick: () => setValue(0),
subTitle: 'SubOne',
title: 'One',
},
{
active: value === 1,
complete: value > 1,
onClick: () => setValue(1),
subTitle: '... | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
ArrowFunction |
() => setValue(0) | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
ArrowFunction |
() => setValue(1) | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
ArrowFunction |
() => setValue(2) | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
ArrowFunction |
() => setValue(3) | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
ArrowFunction |
(
{active, complete, onClick, subTitle, title},
i: number
) => (
<ClayMultiStepNav.Item
active={active} | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
ArrowFunction |
() => {
const [active, setActive] = React.useState(0);
const steps = [
{
subTitle: 'SubOne',
title: 'One',
},
{
subTitle: 'SubTwo',
title: 'Two',
},
{
subTitle: 'SubThree',
title: 'Three',
},
{
subTitle: 'SubFour',
title: 'Four',
},
{
subTitle: 'SubFi... | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
MethodDeclaration |
number('Max Steps Shown', 7) | victorvalle/clay | packages/clay-multi-step-nav/stories/index.tsx | TypeScript |
FunctionDeclaration |
export function activate(context: ExtensionContext) {
// The server is implemented in node
const serverModule = context.asAbsolutePath(
join('dist', 'server.js')
)
// The debug options for the server
// --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the se... | Ghoulboy78/datapack-language-server | src/client.ts | TypeScript |
FunctionDeclaration |
export function deactivate(): Thenable<void> | undefined {
if (!client) {
return undefined
}
return client.stop()
} | Ghoulboy78/datapack-language-server | src/client.ts | TypeScript |
ArrowFunction |
(_: Context, { commentDomain }: Modules): CommentRoutes => {
const getComments = async (req: Request, res: Response) => {
const postId = req.params.id;
let result;
try {
result = await commentDomain.getComments(postId, {
start: req.query.start,
limit: 3,
withVirtuals: true,
... | dhirp/google-datastore-blog-app | src/server/modules/blog/comment/comment.routes-handlers.ts | TypeScript |
ArrowFunction |
async (req: Request, res: Response) => {
const postId = req.params.id;
let result;
try {
result = await commentDomain.getComments(postId, {
start: req.query.start,
limit: 3,
withVirtuals: true,
});
} catch (err) {
return res.status(400).json(err);
}
re... | dhirp/google-datastore-blog-app | src/server/modules/blog/comment/comment.routes-handlers.ts | TypeScript |
ArrowFunction |
async (req: Request, res: Response) => {
const postId = req.params.id;
let comment;
try {
comment = await commentDomain.createComment(postId, req.body);
} catch (err) {
return res.status(400).json(err);
}
res.json(comment);
} | dhirp/google-datastore-blog-app | src/server/modules/blog/comment/comment.routes-handlers.ts | TypeScript |
ArrowFunction |
async (req: Request, res: Response) => {
const commentId = req.params.id;
let result;
try {
result = await commentDomain.deleteComment(commentId);
} catch (err) {
return res.status(400).json(err);
}
res.send(result);
} | dhirp/google-datastore-blog-app | src/server/modules/blog/comment/comment.routes-handlers.ts | TypeScript |
InterfaceDeclaration |
export interface CommentRoutes {
getComments(req: Request, res: Response): any;
createComment(req: Request, res: Response): any;
deleteComment(req: Request, res: Response): any;
} | dhirp/google-datastore-blog-app | src/server/modules/blog/comment/comment.routes-handlers.ts | TypeScript |
ArrowFunction |
(availableViews: { [x: string]: React.RefObject<HTMLElement> }, home: string = 'home') => {
const [view, setView] = React.useState<keyof typeof availableViews>(home);
const changeView = (e: React.MouseEvent<HTMLButtonElement>) => {
const el = e.currentTarget;
const dest = el.dataset.dest;
if (isInUnion(dest, O... | mgn901/m13tk-react | src/view/useView.ts | TypeScript |
ArrowFunction |
(e: React.MouseEvent<HTMLButtonElement>) => {
const el = e.currentTarget;
const dest = el.dataset.dest;
if (isInUnion(dest, Object.keys(availableViews))) {
setView(dest);
}
} | mgn901/m13tk-react | src/view/useView.ts | TypeScript |
ArrowFunction |
() => {
setView(home);
} | mgn901/m13tk-react | src/view/useView.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css'],
})
export class FooterComponent {
} | mthalman/vira-offical-website | ViraOfficialWebpage/ClientApp/src/app/footer/footer.component.ts | TypeScript |
FunctionDeclaration |
export async function up(knex: Knex): Promise<any> {
return knex.schema.createTable("user", table =>{
table.increments("id").primary()
table.string("Username", 100).notNullable()
})
} | lunadis/ScriptControl | api/src/Data/Migrations/20200706214633_Users.ts | TypeScript |
FunctionDeclaration |
export async function down(knex: Knex): Promise<any> {
return knex.schema.dropTable("User")
} | lunadis/ScriptControl | api/src/Data/Migrations/20200706214633_Users.ts | TypeScript |
ArrowFunction |
table =>{
table.increments("id").primary()
table.string("Username", 100).notNullable()
} | lunadis/ScriptControl | api/src/Data/Migrations/20200706214633_Users.ts | TypeScript |
FunctionDeclaration |
async function clickLocationButtonAndAddLocation(gatheringIdx: number, unitIdx: number) {
await $getLocationButtonFor(gatheringIdx, unitIdx).click();
await browser.wait(protractor.ExpectedConditions.visibilityOf($locationModal), 5000, "Map modal waiting timeout");
expect(await $locationModal.isDisplayed()).... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
(form: Form) => async (path: string, type?: string) => {
const parsePointer = (container: any, path: string): any => {
const [next, ...remaining] = path.split(".");
const nextObject = container[next];
if (remaining.length) {
return parsePointer(nextObject, remaining.join("."));
}
return nextObject;
};
... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async (path: string, type?: string) => {
const parsePointer = (container: any, path: string): any => {
const [next, ...remaining] = path.split(".");
const nextObject = container[next];
if (remaining.length) {
return parsePointer(nextObject, remaining.join("."));
}
return nextObject;
};
expect(await la... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
(container: any, path: string): any => {
const [next, ...remaining] = path.split(".");
const nextObject = container[next];
if (remaining.length) {
return parsePointer(nextObject, remaining.join("."));
}
return nextObject;
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
form = await createForm({id: "JX.519"});
testWidget = _testWidget(form);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => {
const $gatheringEvent = lajiFormLocate("gatheringEvent");
it("container is displayed", async () => {
expect(await $gatheringEvent.isPresent()).toBe(true);
});
describe("contains", () => {
it("secureLevel which is editable", async () => {
expect(await $gatheringEvent.element(lajiFormLocate... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $gatheringEvent.isPresent()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => {
it("secureLevel which is editable", async () => {
expect(await $gatheringEvent.element(lajiFormLocate("secureLevel").locator()).isDisplayed()).toBe(true);
await testWidget("secureLevel", "checkbox");
});
it("gatheringEvent.legPublic which is editable", async () => {
await testWidget("gat... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $gatheringEvent.element(lajiFormLocate("secureLevel").locator()).isDisplayed()).toBe(true);
await testWidget("secureLevel", "checkbox");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatheringEvent.legPublic", "checkbox");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatheringEvent.dateBegin", "date");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatheringEvent.dateEnd", "date");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $gatheringEvent.element(lajiFormLocate("keywords").locator()).isDisplayed()).toBe(true);
await testWidget("keywords");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => {
it("displayed", async () => {
expect(await isDisplayed(form.$locate("gatheringEvent.0.leg"))).toBe(true);
});
it("can be added", async () => {
await form.$locateButton("gatheringEvent", "add").click();
expect(await isDisplayed(form.$locate("gatheringEvent.1.leg"))).toBe(true);
... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await isDisplayed(form.$locate("gatheringEvent.0.leg"))).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await form.$locateButton("gatheringEvent", "add").click();
expect(await isDisplayed(form.$locate("gatheringEvent.1.leg"))).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
// Should be 1st delete button (row 0 is labels)
await $$(".table-field .row").get(1).$("button").click(); // eslint-disable-line protractor/use-first-last
expect(await isDisplayed(form.$locate("gatheringEvent.1.leg"))).toBe(false);
expect(await form.$getInputWidget("gatheringEvent.0... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => {
it("is displayed", async () => {
expect(await lajiFormLocate("gatherings").isDisplayed()).toBe(true);
});
it("is empty", async () => {
expect(await lajiFormLocate("gatherings.0").isPresent()).toBe(false);
});
it("map is present", async () => {
expect(await $gatheringsMap.isDisplayed()).toB... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0").isPresent()).toBe(false);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $gatheringsMap.isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await putForeignMarkerToMap();
expect(await lajiFormLocate("gatherings.0").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => {
it("starts and finishes after adding gathering", async () => {
if (await lajiFormLocate("gatherings.0.country").isPresent()) {
return;
}
const $loadingGeocoderButton = $(".geocoder-btn .react-spinner");
if (await $loadingGeocoderButton.isPresent()) {
await browser.wait(protractor... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
if (await lajiFormLocate("gatherings.0.country").isPresent()) {
return;
}
const $loadingGeocoderButton = $(".geocoder-btn .react-spinner");
if (await $loadingGeocoderButton.isPresent()) {
await browser.wait(protractor.ExpectedConditions.invisibilityOf($loadingGeocoderButton), 6... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.country");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.administrativeProvince");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.municipality");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.locality");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.localityDescription");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.weather");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.notes");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $additionalsButton.isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => {
it("can be added from additional fields", async () => {
await $additionalsButton.click();
const $$additionalListItems = $$(".dropdown.open li a");
await $$additionalListItems.last().click();
expect(await form.$locate("gatherings.0.taxonCensus").isDisplayed()).toBe(true);
await $additio... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await $additionalsButton.click();
const $$additionalListItems = $$(".dropdown.open li a");
await $$additionalListItems.last().click();
expect(await form.$locate("gatherings.0.taxonCensus").isDisplayed()).toBe(true);
await $additionalsButton.click();
expect(await $$additionalLis... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await form.$locateButton("gatherings.0.taxonCensus", "add").click();
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await form.$getInputWidget("gatherings.0.taxonCensus.0.censusTaxonID").getAttribute("id")).toBe(await getFocusedId());
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.taxonCensus.0.censusTaxonID");
await testWidget("gatherings.0.taxonCensus.0.taxonCensusType", "enum");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await form.$locateButton("gatherings.0.taxonCensus", "add").click();
expect(await form.$getInputWidget("gatherings.0.taxonCensus.1.censusTaxonID").getAttribute("id")).toBe(await getFocusedId());
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await $gatheringAdd.click();
expect(await lajiFormLocate("gatherings.1").isDisplayed()).toBe(true);
await waitUntilBlockingLoaderHides();
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $gatheringsMap.$(".vector-marker.leaflet-interactive").isPresent()).toBe(false);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await $("#root_gatherings_1-delete").click();
await $("#root_gatherings_1-delete-confirm-yes").click();
expect(await lajiFormLocate("gatherings.1").isPresent()).toBe(false);
expect(await form.$locateAddition("gatherings.1", "header").isPresent()).toBe(false);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units.0").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await $unitAdd.click();
expect(await lajiFormLocate("gatherings.0.units.1").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await form.$getInputWidget("gatherings.0.units.1.identifications.0.taxon").getAttribute("id")).toBe(await getFocusedId());
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units.0").getTagName()).toBe("tr");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await lajiFormLocate("gatherings.0.units.0").click();
expect(await lajiFormLocate("gatherings.0.units.0").getTagName()).toBe("div");
expect(await lajiFormLocate("gatherings.0.units.1").getTagName()).toBe("tr");
await lajiFormLocate("gatherings.0.units.1").click();
expect(await lajiFormL... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await removeUnit(0, 1);
expect(await lajiFormLocate("gatherings.0.units.1").isPresent()).toBe(false);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units.0").getTagName()).toBe("div");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units.0.identifications.0.taxon").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.units.0.count");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.units.0.notes");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.units.0.taxonConfidence", "enum");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await testWidget("gatherings.0.units.0.recordBasis", "enum");
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units.0.images").isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $additionalsButton.isDisplayed()).toBe(true);
const informalGroups = [1, 343, 232, 187];
let mocks = [];
for (let id of informalGroups) {
mocks.push(await form.setMockResponse(`/informal-taxon-groups/MVL.${id}`));
}
await $additionalsButton.click();
await browser.w... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await lajiFormLocate("gatherings.0.units.0.identifications.0.det").isPresent()).toBe(false);
expect(await $additionalsButton.isDisplayed()).toBe(true);
const $firstGroup = $$(".scope-field-modal-item").first();
const getFieldCount = () => lajiFormLocate("gatherings.0.units.0").$$("... | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
() => lajiFormLocate("gatherings.0.units.0").$$("input").count() | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
(gatheringIdx: number, unitIdx: number): ElementFinder => $(`#root_gatherings_${gatheringIdx}_units_${unitIdx}-location`) | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $getLocationButtonFor(0, 0).isDisplayed()).toBe(true);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
await clickLocationButtonAndAddLocation(0, 0);
expect(await $gatheringsMap.$$(".vector-marker.leaflet-interactive").count()).toBe(2);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $locationModalMap.isPresent()).toBe(false);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
ArrowFunction |
async () => {
expect(await $$gatheringMarkerPaths.count()).toBe(2);
const firstFill = await $$gatheringMarkerPaths.first().getAttribute("fill");
const secondFill = await $$gatheringMarkerPaths.last().getAttribute("fill");
expect(await firstFill).not.toBe(secondFill);
} | luomus/laji-form | test/trip-report-spec.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.