-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor CF E2E Tests to use Playwright APIs and replace custom promise approach #1285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor CF E2E Tests to use Playwright APIs and replace custom promise approach #1285
Conversation
|
…ils for better reporting and debugging
e7370eb
to
6dfd8e6
Compare
…ariables were properly reassigned
await expectMCUVisible(page) | ||
await test.step('sanity check - call object, call session and page are set', async () => { | ||
// assert that each object has at least one key (not empty) | ||
expect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we test for more specific object properties?
Something that could assert that the object is a real instance of what we expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Updated as follows
await test.step('sanity check - call object, call session and page are set', async () => {
expect(callObj.getProperty('on')).toBeDefined()
expect(callObj.getProperty('audioMute')).toBeDefined()
expect(callObj.getProperty('leave')).toBeDefined()
expect(callSession).toHaveProperty('room_session')
expect(callSession).toHaveProperty('member_id')
expect(page.goto).toBeDefined()
expect(page.evaluate).toBeDefined()
expect(page.waitForSelector).toBeDefined()
})
{ callSession } | ||
) | ||
await videoMuteSelf | ||
await memberVideoUpdatedMuted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this better than using Promise.all
{ callSession } | ||
) | ||
await videoMuteSelf | ||
await memberVideoUpdatedMuted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timeout started earlier, right? Could that be a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iAmmar7 also raised this point. Yes, it could be a problem that the timeout already started if the timeout is a very small number or there is a lot of "waiting" somehow. I think in most cases it won't be a problem. We should keep this in mind though and maybe think of a solution.
…host are defined in createCFClient and createCFClientWithToken functions
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
…nforce mandatory assertion functions for improved clarity and consistency
…w tests for evaluateArgs handling, improving clarity and consistency in test outcomes
…pectPageEvalToPass
…rameters and improve error messaging for better clarity and consistency in tests
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
…rix for both production and staging environments
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
… in utils.spec.ts
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
… assertion on thrown errors and update error message for clarity
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
…romise for error handling, ensuring accurate error assertions and maintaining test clarity.
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
Claude finished @LittorWired's task —— View job PR Review Progress
Reviewing this pull request that refactors CF E2E Tests to use Playwright APIs. Here's my review progress: Todo List:
Comprehensive Code ReviewOverall Assessment: ✅ Good Refactoring with Some ConcernsThis PR successfully refactors E2E tests from a custom promise-based approach to using Playwright's native utilities. The refactoring improves test reliability and maintainability, but there are several important issues to address. 🎯 Code Quality & Best Practices✅ Strengths:
|
Description
Create new utilities for e2e tests in the
internal/e2e-client
package to rewrite custom promise-based tests to use the Playwright wrapper utilities.Type of change
Code snippets
In case of new feature or breaking changes, please include code snippets.