MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / getSearchInput

Function getSearchInput

e2e/search-bar.spec.ts:11–27  ·  view source on GitHub ↗
({
  page,
  isMobile
}: {
  page: Page;
  isMobile: boolean;
})

Source from the content-addressed store, hash-verified

9 process.env.ALGOLIA_API_KEY !== 'api_key_from_algolia_dashboard';
10
11const getSearchInput = async ({
12 page,
13 isMobile
14}: {
15 page: Page;
16 isMobile: boolean;
17}) => {
18 if (isMobile) {
19 const menuButton = page.getByRole('button', {
20 name: translations.buttons.menu
21 });
22 await expect(menuButton).toBeVisible();
23 await menuButton.click();
24 }
25
26 return page.getByLabel('Search', { exact: true });
27};
28
29const search = async ({
30 page,

Callers 2

searchFunction · 0.70
search-bar.spec.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected