Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
688 changes: 554 additions & 134 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rsbuild/react-rstest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@rsbuild/core": "2.0.0-beta.5",
"@rsbuild/plugin-react": "^1.4.5",
"@rstest/core": "^0.8.2",
"@rstest/core": "^0.9.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/react": "^19.2.10",
Expand Down
2 changes: 1 addition & 1 deletion rslib/node-rstest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@rslib/core": "^0.19.6",
"@rstest/core": "^0.8.2",
"@rstest/core": "^0.9.1",
"@types/node": "^24.10.9",
"typescript": "^5.9.3"
}
Expand Down
2 changes: 1 addition & 1 deletion rslib/react-rstest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@rsbuild/plugin-react": "^1.4.5",
"@rslib/core": "^0.19.6",
"@rstest/core": "^0.8.2",
"@rstest/core": "^0.9.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/react": "^19.2.10",
Expand Down
2 changes: 1 addition & 1 deletion rslib/vue-rstest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@rslib/core": "^0.19.6",
"@rstest/core": "^0.8.2",
"@rstest/core": "^0.9.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/vue": "^8.1.0",
"@vue/test-utils": "^2.4.6",
Expand Down
26 changes: 26 additions & 0 deletions rstest/browser-locator/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@rstest-example/browser-locator",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "rsbuild build",
"dev": "rsbuild dev",
"test": "rstest",
"test:watch": "rstest --watch"
},
"devDependencies": {
"@rsbuild/core": "2.0.0-beta.5",
"@rsbuild/plugin-react": "^1.4.5",
"@rstest/adapter-rsbuild": "^0.2.2",
"@rstest/browser": "^0.9.1",
"@rstest/browser-react": "^0.9.1",
"@rstest/core": "^0.9.1",
"@types/react": "^19.2.10",
"@types/react-dom": "^19.2.3",
"playwright": "^1.58.1",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"typescript": "^5.9.3"
}
}
11 changes: 11 additions & 0 deletions rstest/browser-locator/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';

export default defineConfig({
plugins: [pluginReact()],
source: {
entry: {
index: './src/index.tsx',
},
},
});
12 changes: 12 additions & 0 deletions rstest/browser-locator/rstest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { withRsbuildConfig } from '@rstest/adapter-rsbuild';
import { defineConfig, type ExtendConfigFn } from '@rstest/core';

export default defineConfig({
extends: withRsbuildConfig() as ExtendConfigFn,
browser: {
enabled: true,
provider: 'playwright',
browser: 'chromium',
port: 3013,
},
});
30 changes: 30 additions & 0 deletions rstest/browser-locator/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

function App() {
return (
<>
<h1>Locator API Demo</h1>
<form aria-label="Login form">
<label htmlFor="username">Username</label>
<input id="username" placeholder="Enter username" />
<label htmlFor="password">Password</label>
<input id="password" type="password" placeholder="Enter password" />
<label>
<input id="remember" type="checkbox" />
Remember me
</label>
<button type="button">Login</button>
</form>
</>
);
}

const root = document.getElementById('root');
if (root) {
createRoot(root).render(
<StrictMode>
<App />
</StrictMode>,
);
}
Loading