MCPcopy
hub / github.com/tinyplex/tinybase / exerciseCountriesDemo

Function exerciseCountriesDemo

test/e2e/demos/countries.test.ts:16–37  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

14afterAll(stopServer);
15
16const exerciseCountriesDemo = async (page: Page): Promise<void> => {
17 await (await expectedFramedElement(page, '.filter', '★8')).click();
18 await expectedFramedElement(page, '#countries .country', 'United Kingdom');
19 await expectNoFramedElement(page, '#countries .country', 'Bahamas');
20 await (
21 await expectedFramedElement(page, '#countries .country .star', '★')
22 ).click();
23 await expectedFramedElement(page, '.filter', '★7');
24 await expectNoFramedElement(page, '#countries .country', 'United Kingdom');
25 const b = await expectedFramedElement(page, '.filter', 'B21');
26 await expectProperty(b, 'className', 'filter');
27 await b.click();
28 await expectProperty(b, 'className', 'filter current');
29 await expectedFramedElement(page, '#countries .country', 'Bahamas');
30 await (
31 await expectedFramedElement(page, '#countries .country .star', '☆')
32 ).click();
33 await (await expectedFramedElement(page, '.filter', '★8')).click();
34 await expectedFramedElement(page, '#countries .country', 'Bahamas');
35 await page.reload();
36 await expectedFramedElement(page, '#countries .country', 'Bahamas');
37};
38
39test('countries-react', async ({page}) => {
40 await expectPage(page, `/demos/countries/countries-react/`);

Callers 1

countries.test.tsFile · 0.85

Calls 3

expectedFramedElementFunction · 0.90
expectNoFramedElementFunction · 0.90
expectPropertyFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…