feat: added webPlatform enabling react-native-web testing#40
feat: added webPlatform enabling react-native-web testing#40nachooya wants to merge 16 commits intocallstackincubator:mainfrom
Conversation
|
@nachooya is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
V3RON
left a comment
There was a problem hiding this comment.
This is definitely a step in the right direction 🎉
As for the implementation:
- What are the requirements for an end user to use Harness on the web?
- Could you prepare a variant of the "E2E tests" workflow for the web?
packages/platform-web/src/config.ts
Outdated
| export const WebPlatformConfigSchema = z.object({ | ||
| name: z.string().min(1, 'Name is required'), | ||
| browserName: z.string().min(1, 'browserName is required'), | ||
| appUrl: z.string().url('appUrl must be a valid URL'), |
There was a problem hiding this comment.
I think we can set the 'appUrl' to 'http://localhost:8081' by default.
There was a problem hiding this comment.
Added default value:
appUrl: z.string().url('appUrl must be a valid URL').default('http://localhost:8081'),
| const client = await WebDriver.newSession({ | ||
| path: '/', | ||
| capabilities: { browserName: parsedConfig.browserName }, | ||
| logLevel: 'warn', |
There was a problem hiding this comment.
Can we pipe logs through logger so they’re ignored when debug mode is not enabled?
There was a problem hiding this comment.
Now it uses process.env.HARNESS_DEBUG to define log level.
I did not found a straightforward way to pipe WebDriver logs.
| return { | ||
| platform: 'web', | ||
| manufacturer: '', | ||
| model: '', | ||
| osVersion: '', | ||
| }; |
There was a problem hiding this comment.
This is currently unused, but if we want to follow native variants, we should use something like ua-parser-js and the NavigatorUAData.getHighEntropyValues() API to obtain a similar set of data for browsers.
I've added e2e test for web. |
V3RON
left a comment
There was a problem hiding this comment.
This PR includes many changes that aren't related to web support, such as workflow updates and Android/iOS adapters. Can you remove them and keep only the web-related changes?
|
I went ahead and removed all changes except those needed for the web platform, and I also adapted the UI module to support the web. See #62. Feel free to test it out and report any issues, or leave comments with ideas. |
Description
added
webPlatformenabling react-native-web testingTesting
Using
playgroundapp, executepnpm react-native-harness --harnessRunner web:chrome