repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte/playwright/index.ts | tests/components/ct-svelte/playwright/index.ts | // @ts-check
import '../src/assets/index.css';
import { beforeMount, afterMount } from '@playwright/experimental-ct-svelte/hooks';
export type HooksConfig = {
route: string;
}
beforeMount<HooksConfig>(async ({ hooksConfig }) => {
console.log(`Before mount: ${JSON.stringify(hooksConfig)}`);
});
afterMount<Hooks... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/playwright.config.ts | tests/components/ct-react-vite/playwright.config.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/vite.config.ts | tests/components/ct-react-vite/vite.config.ts | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
})
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/App.tsx | tests/components/ct-react-vite/src/App.tsx | import { Routes, Route, Link } from 'react-router-dom';
import logo from './assets/logo.svg';
import LoginPage from './pages/LoginPage';
import DashboardPage from './pages/DashboardPage';
export default function App({ title }: { title?: string }) {
return <>
<header>
<img src={logo} alt="logo" width={125} ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/main.tsx | tests/components/ct-react-vite/src/main.tsx | import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App';
import './assets/index.css';
createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</Rea... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/vite-env.d.ts | tests/components/ct-react-vite/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/pages/DashboardPage.tsx | tests/components/ct-react-vite/src/pages/DashboardPage.tsx | export default function DashboardPage() {
return <main>Dashboard</main>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/pages/LoginPage.tsx | tests/components/ct-react-vite/src/pages/LoginPage.tsx | export default function LoginPage() {
return <main>Login</main>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/EmptyFragment.tsx | tests/components/ct-react-vite/src/components/EmptyFragment.tsx | export default function EmptyFragment(props: unknown) {
Object.assign(window, { props });
return <>{[]}</>;
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/MultipleChildren.tsx | tests/components/ct-react-vite/src/components/MultipleChildren.tsx |
type MultipleChildrenProps = {
children?: [any, any, any];
}
export default function MultipleChildren(props: MultipleChildrenProps) {
return <div>
<header>
{props.children?.at(0)}
</header>
<main>
{props.children?.at(1)}
</main>
<footer>
{props.children?.at(2)}
</footer>
</div>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/DefaultChildren.tsx | tests/components/ct-react-vite/src/components/DefaultChildren.tsx | type DefaultChildrenProps = {
children?: any;
}
export default function DefaultChildren(props: DefaultChildrenProps) {
return <div>
<h1>Welcome!</h1>
<main>
{props.children}
</main>
<footer>
Thanks for visiting.
</footer>
</div>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/Fetcher.tsx | tests/components/ct-react-vite/src/components/Fetcher.tsx | import { useEffect, useState } from "react"
export default function Fetcher() {
const [data, setData] = useState<{ name: string }>({ name: '<none>' });
const [fetched, setFetched] = useState(false);
useEffect(() => {
const doFetch = async () => {
try {
const response = await fetch('/data.json'... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/Button.tsx | tests/components/ct-react-vite/src/components/Button.tsx | import { ButtonHTMLAttributes } from "react";
type ButtonProps = {
title: string;
onClick?(props: string): void;
className?: string;
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>;
export default function Button({ onClick, title, ...attributes }: ButtonProps) {
return <button {...attributes} onC... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/Counter.tsx | tests/components/ct-react-vite/src/components/Counter.tsx | import { useLayoutEffect, useRef, useState } from "react"
type CounterProps = {
count?: number;
onClick?(props: string): void;
children?: any;
}
let _remountCount = 1;
export default function Counter(props: CounterProps) {
const [remountCount] = useState(_remountCount);
const didMountRef = useRef(... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/CheckChildrenProp.tsx | tests/components/ct-react-vite/src/components/CheckChildrenProp.tsx | import type { PropsWithChildren } from 'react';
type DefaultChildrenProps = PropsWithChildren<{}>;
export default function CheckChildrenProp(props: DefaultChildrenProps) {
return <>{'children' in props ? props.children : 'No Children'}</>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/TitleWithFont.tsx | tests/components/ct-react-vite/src/components/TitleWithFont.tsx | import './TitleWithFont.css';
export default function TitleWithFont() {
return <div className='title-with-font'>+-</div>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/ComponentAsProp.tsx | tests/components/ct-react-vite/src/components/ComponentAsProp.tsx | import { ReactNode } from "react";
type ComponentAsProp = {
component: ReactNode[] | ReactNode;
};
export function ComponentAsProp({ component }: ComponentAsProp) {
return <div>{component}</div>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/src/components/MultiRoot.tsx | tests/components/ct-react-vite/src/components/MultiRoot.tsx | export default function MultiRoot() {
return <>
<div>root 1</div>
<div>root 2</div>
</>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/unmount.spec.tsx | tests/components/ct-react-vite/tests/unmount.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import Button from '@/components/Button';
import MultiRoot from '@/components/MultiRoot';
test('unmount', async ({ page, mount }) => {
const component = await mount(<Button title="Submit" />);
await expect(page.locator('#root')).toContainText('Submi... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/update.spec.tsx | tests/components/ct-react-vite/tests/update.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import Counter from '@/components/Counter';
import DefaultChildren from '@/components/DefaultChildren';
test('update props without remounting', async ({ mount }) => {
const component = await mount(<Counter count={9001} />);
await expect(component.ge... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/react-router.spec.tsx | tests/components/ct-react-vite/tests/react-router.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import App from '@/App';
import type { HooksConfig } from '../playwright';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount<HooksConfig>(<App />, {
hooksConfig: { routing: true },
});
awa... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/callbacks.spec.tsx | tests/components/ct-react-vite/tests/callbacks.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import Button from '@/components/Button';
import DefaultChildren from '@/components/DefaultChildren';
test('execute callback when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(
<Butto... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/children.spec.tsx | tests/components/ct-react-vite/tests/children.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import Button from '@/components/Button';
import CheckChildrenProp from '@/components/CheckChildrenProp';
import DefaultChildren from '@/components/DefaultChildren';
import MultipleChildren from '@/components/MultipleChildren';
test('render a default ch... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/route.spec.tsx | tests/components/ct-react-vite/tests/route.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import TitleWithFont from '@/components/TitleWithFont';
import Fetcher from '@/components/Fetcher';
import { http, HttpResponse, passthrough, bypass } from 'msw';
import httpServer from 'http';
import type net from 'net';
test('should load font without ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/tests/render.spec.tsx | tests/components/ct-react-vite/tests/render.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react';
import Button from '@/components/Button';
import EmptyFragment from '@/components/EmptyFragment';
import { ComponentAsProp } from '@/components/ComponentAsProp';
import DefaultChildren from '@/components/DefaultChildren';
test('render props', async ({ m... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react-vite/playwright/index.tsx | tests/components/ct-react-vite/playwright/index.tsx | import { beforeMount, afterMount } from '@playwright/experimental-ct-react/hooks';
import { BrowserRouter } from 'react-router-dom';
import '../src/assets/index.css';
export type HooksConfig = {
route?: string;
routing?: boolean;
}
beforeMount<HooksConfig>(async ({ hooksConfig, App }) => {
console.log(`Before m... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/playwright.config.ts | tests/components/ct-vue-vite/playwright.config.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/env.d.ts | tests/components/ct-vue-vite/env.d.ts | /// <reference types="vite/client" />
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/src/router/index.ts | tests/components/ct-vue-vite/src/router/index.ts | import DashboardPage from '../pages/DashboardPage.vue';
import LoginPage from '../pages/LoginPage.vue';
import { createRouter, createWebHistory } from 'vue-router';
export const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{ path: '/', component: LoginPage },
{ pat... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/slots/slots.spec.ts | tests/components/ct-vue-vite/tests/slots/slots.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import DefaultSlot from '@/components/DefaultSlot.vue';
import NamedSlots from '@/components/NamedSlots.vue';
import Button from '@/components/Button.vue';
import SlotDefaultValue from "@/components/SlotDefaultValue.vue";
test('render a default slot', asy... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/slots/slots.spec.tsx | tests/components/ct-vue-vite/tests/slots/slots.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import DefaultSlot from '@/components/DefaultSlot.vue';
import NamedSlots from '@/components/NamedSlots.vue';
test('render a default slot', async ({ mount }) => {
const component = await mount(
<DefaultS... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/unmount/unmount.spec.tsx | tests/components/ct-vue-vite/tests/unmount/unmount.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import MultiRoot from '@/components/MultiRoot.vue';
import Button from '@/components/Button.vue';
test('unmount a multi root component', async ({ mount, page }) => {
const component = await mount(<MultiRoot />);
await expect(page.locator('#root')).toC... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/unmount/unmount.spec.ts | tests/components/ct-vue-vite/tests/unmount/unmount.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import MultiRoot from '@/components/MultiRoot.vue';
test('unmount', async ({ page, mount }) => {
const component = await mount(Button, {
props: {
title: 'Submit',
},
});
await expect(page.l... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/events/events.spec.tsx | tests/components/ct-vue-vite/tests/events/events.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import DefaultSlot from '@/components/DefaultSlot.vue';
test('emit a submit event when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(
<Butt... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/events/events.spec.ts | tests/components/ct-vue-vite/tests/events/events.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
test('emit a submit event when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(Button, {
props: {
title: 'Submit',
},
on: {
... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/update/update.spec.tsx | tests/components/ct-vue-vite/tests/update/update.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Counter from '@/components/Counter.vue';
test('update props without remounting', async ({ mount }) => {
const component = await mount(<Counter count={9001} />);
await expect(component.getByTestId('props')).toContainText('9001');
await compon... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/update/update.spec.ts | tests/components/ct-vue-vite/tests/update/update.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Counter from '@/components/Counter.vue';
test('update props without remounting', async ({ mount }) => {
const component = await mount(Counter, {
props: { count: 9001 },
});
await expect(component.getByTestId('props')).toContainText('9001'... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/render/render.spec.tsx | tests/components/ct-vue-vite/tests/render/render.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import EmptyTemplate from '@/components/EmptyTemplate.vue';
test('render props', async ({ mount }) => {
const component = await mount(<Button title='Submit' />);
await expect(component).toContainText('Subm... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/render/render.spec.ts | tests/components/ct-vue-vite/tests/render/render.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import EmptyTemplate from '@/components/EmptyTemplate.vue';
import Component from '@/components/Component.vue';
test('render props', async ({ mount }) => {
const component = await mount(Button, {
props: ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/vue-router/vue-router.spec.ts | tests/components/ct-vue-vite/tests/vue-router/vue-router.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import type { HooksConfig } from '../../playwright';
import App from '@/App.vue';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount<HooksConfig>(App, {
hooksConfig: { routing: true },
});
aw... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/tests/vue-router/vue-router.spec.tsx | tests/components/ct-vue-vite/tests/vue-router/vue-router.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import type { HooksConfig } from '../../playwright';
import App from '@/App.vue';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount<HooksConfig>(<App />, {
hooksConfig: { routing: true },
});
... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-vite/playwright/index.ts | tests/components/ct-vue-vite/playwright/index.ts | import { beforeMount, afterMount } from '@playwright/experimental-ct-vue/hooks';
import { router } from '../src/router';
import Button from '../src/components/Button.vue';
import '../src/assets/index.css';
export type HooksConfig = {
routing?: boolean;
components?: Record<string, any>;
}
beforeMount<HooksConfig>(... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/playwright.config.ts | tests/components/ct-svelte-vite/playwright.config.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/vite.config.ts | tests/components/ct-svelte-vite/vite.config.ts | import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()]
})
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/src/main.ts | tests/components/ct-svelte-vite/src/main.ts | import App from './App.svelte';
import './assets/index.css';
const app = new App({
target: document.getElementById('app')!
});
export default app;
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/src/vite-env.d.ts | tests/components/ct-svelte-vite/src/vite-env.d.ts | /// <reference types="svelte" />
/// <reference types="vite/client" />
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/src/store/index.ts | tests/components/ct-svelte-vite/src/store/index.ts | export let remountCount = 0;
export function update() {
remountCount++;
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/tests/slots.spec.ts | tests/components/ct-svelte-vite/tests/slots.spec.ts | import { test, expect } from '@playwright/experimental-ct-svelte';
import DefaultSlot from '@/components/DefaultSlot.svelte';
import NamedSlots from '@/components/NamedSlots.svelte';
test('render main children slot', async ({ mount }) => {
const component = await mount(DefaultSlot, {
slots: {
children: 'Ma... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/tests/events.spec.ts | tests/components/ct-svelte-vite/tests/events.spec.ts | import { test, expect } from '@playwright/experimental-ct-svelte';
import Button from '@/components/Button.svelte';
test('emit an submit event when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(Button, {
props: {
title: 'Submit',
onsubmi... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/tests/router.spec.ts | tests/components/ct-svelte-vite/tests/router.spec.ts | import { test, expect } from '@playwright/experimental-ct-svelte';
import App from '@/App.svelte';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount(App);
await expect(component.getByRole('main')).toHaveText('Login');
await expect(page).toHaveURL('/');
awa... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/tests/unmount.spec.ts | tests/components/ct-svelte-vite/tests/unmount.spec.ts | import { test, expect } from '@playwright/experimental-ct-svelte';
import Button from '@/components/Button.svelte';
import MultiRoot from '@/components/MultiRoot.svelte';
test('unmount', async ({ page, mount }) => {
const component = await mount(Button, {
props: {
title: 'Submit',
onsubmit: () => {},... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/tests/update.spec.ts | tests/components/ct-svelte-vite/tests/update.spec.ts | import { test, expect } from '@playwright/experimental-ct-svelte';
import Counter from '@/components/Counter.svelte';
test('update props without remounting', async ({ mount }) => {
const component = await mount(Counter, {
props: {
count: 9001,
onsubmit: () => {},
},
});
await expect(component... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/tests/render.spec.ts | tests/components/ct-svelte-vite/tests/render.spec.ts | import { test, expect } from '@playwright/experimental-ct-svelte';
import type { HooksConfig } from '../playwright';
import Button from '@/components/Button.svelte';
import Empty from '@/components/Empty.svelte';
import Context from '@/components/Context.svelte';
test('render props', async ({ mount }) => {
const com... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-svelte-vite/playwright/index.ts | tests/components/ct-svelte-vite/playwright/index.ts | import '../src/assets/index.css';
import { beforeMount, afterMount } from '@playwright/experimental-ct-svelte/hooks';
export type HooksConfig = {
context?: string;
route?: string;
}
beforeMount<HooksConfig>(async ({ hooksConfig, App }) => {
console.log(`Before mount: ${JSON.stringify(hooksConfig)}`);
return n... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/playwright.config.ts | tests/components/ct-vue-cli/playwright.config.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/vue.d.ts | tests/components/ct-vue-cli/vue.d.ts | declare module '*.vue' {
const value: any;
export default value;
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/src/vue.d.ts | tests/components/ct-vue-cli/src/vue.d.ts | declare module '*.vue' {
const value: any;
export default value;
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/slots/slots.spec.ts | tests/components/ct-vue-cli/tests/slots/slots.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import DefaultSlot from '@/components/DefaultSlot.vue';
import NamedSlots from '@/components/NamedSlots.vue';
test('render a default slot', async ({ mount }) => {
const component = await mount(DefaultSlot, {
slots: {
default: '<strong>Main Con... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/slots/slots.spec.tsx | tests/components/ct-vue-cli/tests/slots/slots.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import DefaultSlot from '@/components/DefaultSlot.vue';
import NamedSlots from '@/components/NamedSlots.vue';
test('render a default slot', async ({ mount }) => {
const component = await mount(
<DefaultS... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/unmount/unmount.spec.tsx | tests/components/ct-vue-cli/tests/unmount/unmount.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import MultiRoot from '@/components/MultiRoot.vue';
test('unmount', async ({ page, mount }) => {
const component = await mount(<Button title="Submit" />);
await expect(page.locator('#root')).toContainText(... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/unmount/unmount.spec.ts | tests/components/ct-vue-cli/tests/unmount/unmount.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import MultiRoot from '@/components/MultiRoot.vue';
test('unmount', async ({ page, mount }) => {
const component = await mount(Button, {
props: {
title: 'Submit',
},
});
await expect(page.l... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/events/events.spec.tsx | tests/components/ct-vue-cli/tests/events/events.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import DefaultSlot from '@/components/DefaultSlot.vue';
test('emit an submit event when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(
<But... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/events/events.spec.ts | tests/components/ct-vue-cli/tests/events/events.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
test('emit an submit event when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(Button, {
props: {
title: 'Submit',
},
on: {
... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/update/update.spec.tsx | tests/components/ct-vue-cli/tests/update/update.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Counter from '@/components/Counter.vue';
test('update props without remounting', async ({ mount }) => {
const component = await mount(<Counter count={9001} />);
await expect(component.getByTestId('props')).toContainText('9001');
await compon... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/update/update.spec.ts | tests/components/ct-vue-cli/tests/update/update.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Counter from '@/components/Counter.vue';
test('update props without remounting', async ({ mount }) => {
const component = await mount(Counter, {
props: { count: 9001 },
});
await expect(component.getByTestId('props')).toContainText('9001'... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/render/render.spec.tsx | tests/components/ct-vue-cli/tests/render/render.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import EmptyTemplate from '@/components/EmptyTemplate.vue';
test('render props', async ({ mount }) => {
const component = await mount(<Button title="Submit" />);
await expect(component).toContainText('Subm... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/render/render.spec.ts | tests/components/ct-vue-cli/tests/render/render.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import Button from '@/components/Button.vue';
import Component from '@/components/Component.vue';
import EmptyTemplate from '@/components/EmptyTemplate.vue';
test('render props', async ({ mount }) => {
const component = await mount(Button, {
props: ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/vue-router/vue-router.spec.ts | tests/components/ct-vue-cli/tests/vue-router/vue-router.spec.ts | import { test, expect } from '@playwright/experimental-ct-vue';
import App from '@/App.vue';
import type { HooksConfig } from '../../playwright';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount<HooksConfig>(App, {
hooksConfig: { routing: true },
});
aw... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/tests/vue-router/vue-router.spec.tsx | tests/components/ct-vue-cli/tests/vue-router/vue-router.spec.tsx | import { test, expect } from '@playwright/experimental-ct-vue';
import App from '@/App.vue';
import type { HooksConfig } from '../../playwright';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount<HooksConfig>(<App />, {
hooksConfig: { routing: true },
});
... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-vue-cli/playwright/index.ts | tests/components/ct-vue-cli/playwright/index.ts | import { beforeMount, afterMount } from '@playwright/experimental-ct-vue/hooks';
import { router } from '../src/router';
import Button from '../src/components/Button.vue';
import '../src/assets/index.css';
export type HooksConfig = {
route?: string;
routing?: boolean;
}
beforeMount<HooksConfig>(async ({ app, hook... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/playwright.config.ts | tests/components/ct-react17/playwright.config.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/App.tsx | tests/components/ct-react17/src/App.tsx | import { Routes, Route, Link } from 'react-router-dom';
import logo from './assets/logo.svg';
import LoginPage from './pages/LoginPage';
import DashboardPage from './pages/DashboardPage';
export default function App({ title }: { title?: string }) {
return <>
<header>
<img src={logo} alt="logo" width={125} ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/react-app-env.d.ts | tests/components/ct-react17/src/react-app-env.d.ts | /// <reference types="react-scripts" />
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/pages/DashboardPage.tsx | tests/components/ct-react17/src/pages/DashboardPage.tsx | export default function DashboardPage() {
return <main>Dashboard</main>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/pages/LoginPage.tsx | tests/components/ct-react17/src/pages/LoginPage.tsx | export default function LoginPage() {
return <main>Login</main>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/Fetch.tsx | tests/components/ct-react17/src/components/Fetch.tsx | import React, { useEffect, useState } from 'react';
type FetchProps = {
url: string;
}
export default function Fetch(props: FetchProps) {
const [data, setData] = useState('no response yet');
useEffect(() => {
fetch(props.url).then(res => res.text()).then(setData);
}, [props.url]);
return <p>{data}</p>;
... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/DelayedData.tsx | tests/components/ct-react17/src/components/DelayedData.tsx | import { useEffect, useState } from 'react';
type DelayedData = {
data: string;
}
export default function DelayedData(props: DelayedData) {
const [status, setStatus] = useState('loading');
useEffect(() => {
const timeout = setTimeout(() => setStatus(props.data), 500);
return () => clearTimeout(timeout)... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/EmptyFragment.tsx | tests/components/ct-react17/src/components/EmptyFragment.tsx | export default function EmptyFragment(props: unknown) {
Object.assign(window, { props });
return <>{[]}</>;
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/MultipleChildren.tsx | tests/components/ct-react17/src/components/MultipleChildren.tsx | type MultipleChildrenProps = {
children?: [any, any, any];
}
export default function MultipleChildren(props: MultipleChildrenProps) {
return <div>
<header>
{props.children?.at(0)}
</header>
<main>
{props.children?.at(1)}
</main>
<footer>
{props.children?.at(2)}
</footer>
</div>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/DefaultChildren.tsx | tests/components/ct-react17/src/components/DefaultChildren.tsx | type DefaultChildrenProps = {
children?: any;
}
export default function DefaultChildren(props: DefaultChildrenProps) {
return <div>
<h1>Welcome!</h1>
<main>
{props.children}
</main>
<footer>
Thanks for visiting.
</footer>
</div>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/Button.tsx | tests/components/ct-react17/src/components/Button.tsx | import { ButtonHTMLAttributes } from "react";
type ButtonProps = {
title: string;
onClick?(props: string): void;
className?: string;
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>;
export default function Button({ onClick, title, ...attributes }: ButtonProps) {
return <button {...attributes} onC... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/Counter.tsx | tests/components/ct-react17/src/components/Counter.tsx | import { useLayoutEffect, useRef, useState } from "react"
type CounterProps = {
count?: number;
onClick?(props: string): void;
children?: any;
}
let _remountCount = 1;
export default function Counter(props: CounterProps) {
const [remountCount] = useState(_remountCount);
const didMountRef = useRef(... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/CheckChildrenProp.tsx | tests/components/ct-react17/src/components/CheckChildrenProp.tsx | import type { PropsWithChildren } from 'react';
type DefaultChildrenProps = PropsWithChildren<{}>;
export default function CheckChildrenProp(props: DefaultChildrenProps) {
return <>{'children' in props ? props.children : 'No Children'}</>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/src/components/MultiRoot.tsx | tests/components/ct-react17/src/components/MultiRoot.tsx | export default function MultiRoot() {
return <>
<div>root 1</div>
<div>root 2</div>
</>
}
| typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/tests/unmount.spec.tsx | tests/components/ct-react17/tests/unmount.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react17';
import Button from '@/components/Button';
import MultiRoot from '@/components/MultiRoot';
test('unmount', async ({ page, mount }) => {
const component = await mount(<Button title="Submit" />);
await expect(page.locator('#root')).toContainText('Sub... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/tests/update.spec.tsx | tests/components/ct-react17/tests/update.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react17';
import Counter from '@/components/Counter';
import DefaultChildren from '@/components/DefaultChildren';
test('update props without remounting', async ({ mount }) => {
const component = await mount(<Counter count={9001} />);
await expect(component.... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/tests/react-router.spec.tsx | tests/components/ct-react17/tests/react-router.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react17';
import App from '@/App';
import type { HooksConfig } from '../playwright';
test('navigate to a page by clicking a link', async ({ page, mount }) => {
const component = await mount<HooksConfig>(<App />, {
hooksConfig: { routing: true },
});
a... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/tests/callbacks.spec.tsx | tests/components/ct-react17/tests/callbacks.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react17';
import Button from '@/components/Button';
import DefaultChildren from '@/components/DefaultChildren';
test('execute callback when the button is clicked', async ({ mount }) => {
const messages: string[] = [];
const component = await mount(
<But... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/tests/children.spec.tsx | tests/components/ct-react17/tests/children.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react17';
import Button from '@/components/Button';
import CheckChildrenProp from '@/components/CheckChildrenProp';
import DefaultChildren from '@/components/DefaultChildren';
import MultipleChildren from '@/components/MultipleChildren';
test('render a default ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/tests/render.spec.tsx | tests/components/ct-react17/tests/render.spec.tsx | import { test, expect } from '@playwright/experimental-ct-react17';
import Fetch from '@/components/Fetch';
import DelayedData from '@/components/DelayedData';
import Button from '@/components/Button';
import EmptyFragment from '@/components/EmptyFragment';
const { serverFixtures } = require('../../../../tests/config/s... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/components/ct-react17/playwright/index.tsx | tests/components/ct-react17/playwright/index.tsx | import { beforeMount, afterMount } from '@playwright/experimental-ct-react17/hooks';
import { BrowserRouter } from 'react-router-dom';
import '../src/assets/index.css';
export type HooksConfig = {
route?: string;
routing?: boolean;
}
beforeMount<HooksConfig>(async ({ hooksConfig, App }) => {
console.log(`Before... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/browsercontext-csp.spec.ts | tests/library/browsercontext-csp.spec.ts | /**
* Copyright 2018 Google Inc. All rights reserved.
* Modifications copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/client-certificates.spec.ts | tests/library/client-certificates.spec.ts | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | true |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/route-web-socket.spec.ts | tests/library/route-web-socket.spec.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/defaultbrowsercontext-2.spec.ts | tests/library/defaultbrowsercontext-2.spec.ts | /**
* Copyright 2017 Google Inc. All rights reserved.
* Modifications copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/logger.spec.ts | tests/library/logger.spec.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/defaultbrowsercontext-1.spec.ts | tests/library/defaultbrowsercontext-1.spec.ts | /**
* Copyright 2017 Google Inc. All rights reserved.
* Modifications copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/playwright.config.ts | tests/library/playwright.config.ts | /**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/browsercontext-viewport.spec.ts | tests/library/browsercontext-viewport.spec.ts | /**
* Copyright 2018 Google Inc. All rights reserved.
* Modifications copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
microsoft/playwright | https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/library/proxy-pattern.spec.ts | tests/library/proxy-pattern.spec.ts | /**
* Copyright Microsoft Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... | typescript | Apache-2.0 | 1359b5fbf7087a8b72d7ee25ad16ff2751195300 | 2026-01-04T15:25:31.902420Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.