Skip to content
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

feat: update playwright config #681

Merged
merged 1 commit into from
May 14, 2024
Merged

feat: update playwright config #681

merged 1 commit into from
May 14, 2024

Conversation

elrrrrrrr
Copy link
Member

@elrrrrrrr elrrrrrrr commented May 14, 2024

follow ref update

  • 🔧 Modify Playwright DOWNLOAD_PATHS configuration
  • 🔧 Add android related configuration
  • ♻️ Remove chromium-with-symbols configuration and ubuntu18.04 related versions

参照 ref 变更

  • 🔧 修改 playwright DOWNLOAD_PATHS 相关配置
  • 🔧 添加 android 相关配置
  • ♻️ 移除 chromium-with-symbols 配置,ubuntu18.04 相关版本

Summary by CodeRabbit

  • New Features

    • Added support for mac14 and mac14-arm64 platforms for Chromium and Chromium tip-of-tree downloads.
  • Bug Fixes

    • Updated download paths for various platforms to ensure compatibility and correct file retrieval.
  • Tests

    • Adjusted test assertions to reflect changes in download paths and platform support, ensuring accurate validation.

@elrrrrrrr elrrrrrrr added the enhancement New feature or request label May 14, 2024
@elrrrrrrr elrrrrrrr requested a review from fengmk2 May 14, 2024 15:18
Copy link
Contributor

coderabbitai bot commented May 14, 2024

Walkthrough

The recent updates to PlaywrightBinary.ts and its corresponding test file involve modifying download paths for various platforms and browsers, including the addition of new paths for macOS 14 and adjustments for other operating systems. The test file has been updated to reflect these changes, including altering assertions and the expected number of items in the result array.

Changes

Files Change Summary
app/common/adapter/binary/PlaywrightBinary.ts Modified download paths for chromium, chromium-tip-of-tree, firefox, firefox-beta, webkit, ffmpeg, and android. Added new paths for macOS 14. Set some Ubuntu 18.04 paths to undefined.
test/common/adapter/binary/PlaywrightBinary.test.ts Updated assertions to match new item names and order in result.items array. Adjusted array length check from 8 to 7.

🐇
Paths updated, binaries in line,
For macOS 14, new entries shine.
Ubuntu's older paths we leave behind,
In tests, new order we now find.
Code evolves, a dance so fine,
Playwright's journey, by design.
🖥️✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between cedb959 and b39e52c.
Files selected for processing (2)
  • app/common/adapter/binary/PlaywrightBinary.ts (7 hunks)
  • test/common/adapter/binary/PlaywrightBinary.test.ts (1 hunks)
Additional comments not posted (19)
app/common/adapter/binary/PlaywrightBinary.ts (19)

16-19: Remove unsupported ubuntu18.04 paths.

The removal of ubuntu18.04 paths for chromium is appropriate as it aligns with the updated support matrix.


22-24: Update paths for debian11 and debian12.

The updated paths for debian11 and debian12 for chromium are correct and align with the new structure.


35-36: Add support for mac14 and mac14-arm64.

The addition of mac14 and mac14-arm64 paths for chromium is correct and aligns with the new support matrix.


41-44: Remove unsupported ubuntu18.04 paths.

The removal of ubuntu18.04 paths for chromium-tip-of-tree is appropriate as it aligns with the updated support matrix.


47-49: Update paths for debian11 and debian12.

The updated paths for debian11 and debian12 for chromium-tip-of-tree are correct and align with the new structure.


60-61: Add support for mac14 and mac14-arm64.

The addition of mac14 and mac14-arm64 paths for chromium-tip-of-tree is correct and aligns with the new support matrix.


66-68: Remove unsupported ubuntu18.04 paths.

The removal of ubuntu18.04 paths for firefox is appropriate as it aligns with the updated support matrix.


72-75: Update paths for debian11 and debian12.

The updated paths for debian11 and debian12 for firefox are correct and align with the new structure.


85-86: Add support for mac14 and mac14-arm64.

The addition of mac14 and mac14-arm64 paths for firefox is correct and aligns with the new support matrix.


91-93: Remove unsupported ubuntu18.04 paths.

The removal of ubuntu18.04 paths for firefox-beta is appropriate as it aligns with the updated support matrix.


97-100: Update paths for debian11 and debian12.

The updated paths for debian11 and debian12 for firefox-beta are correct and align with the new structure.


110-111: Add support for mac14 and mac14-arm64.

The addition of mac14 and mac14-arm64 paths for firefox-beta is correct and aligns with the new support matrix.


116-118: Remove unsupported ubuntu18.04 paths.

The removal of ubuntu18.04 paths for webkit is appropriate as it aligns with the updated support matrix.


122-125: Update paths for debian11 and debian12.

The updated paths for debian11 and debian12 for webkit are correct and align with the new structure.


135-136: Add support for mac14 and mac14-arm64.

The addition of mac14 and mac14-arm64 paths for webkit is correct and aligns with the new support matrix.


141-143: Remove unsupported ubuntu18.04 paths.

The removal of ubuntu18.04 paths for ffmpeg is appropriate as it aligns with the updated support matrix.


147-149: Update paths for debian11 and debian12.

The updated paths for debian11 and debian12 for ffmpeg are correct and align with the new structure.


160-161: Add support for mac14 and mac14-arm64.

The addition of mac14 and mac14-arm64 paths for ffmpeg is correct and aligns with the new support matrix.


166-187: Add support for android paths.

The addition of android paths for various platforms is correct and aligns with the new support matrix.

@@ -51,19 +51,18 @@ describe('test/common/adapter/binary/PlaywrightBinary.test.ts', () => {
let result = await binary.fetch('/builds/');
assert(result);
// console.log(result.items);
assert.equal(result.items.length, 8);
assert.equal(result.items.length, 7);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the expected length of result.items.

The expected length of result.items should be updated to 6 instead of 7, as the chromium-with-symbols configuration has been removed.

- assert.equal(result.items.length, 7);
+ assert.equal(result.items.length, 6);

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
assert.equal(result.items.length, 7);
assert.equal(result.items.length, 6);

Comment on lines +57 to +61
assert.equal(result.items[2].name, 'firefox/');
assert.equal(result.items[3].name, 'firefox-beta/');
assert.equal(result.items[4].name, 'webkit/');
assert.equal(result.items[5].name, 'ffmpeg/');
assert.equal(result.items[6].name, 'android/');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the expected item names and their order.

The expected item names and their order should be updated to reflect the removal of chromium-with-symbols and the addition of android.

- assert.equal(result.items[0].name, 'chromium/');
- assert.equal(result.items[1].name, 'chromium-tip-of-tree/');
- assert.equal(result.items[2].name, 'firefox/');
- assert.equal(result.items[3].name, 'firefox-beta/');
- assert.equal(result.items[4].name, 'webkit/');
- assert.equal(result.items[5].name, 'ffmpeg/');
- assert.equal(result.items[6].name, 'android/');
+ assert.equal(result.items[0].name, 'firefox/');
+ assert.equal(result.items[1].name, 'firefox-beta/');
+ assert.equal(result.items[2].name, 'webkit/');
+ assert.equal(result.items[3].name, 'ffmpeg/');
+ assert.equal(result.items[4].name, 'android/');

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
assert.equal(result.items[2].name, 'firefox/');
assert.equal(result.items[3].name, 'firefox-beta/');
assert.equal(result.items[4].name, 'webkit/');
assert.equal(result.items[5].name, 'ffmpeg/');
assert.equal(result.items[6].name, 'android/');
assert.equal(result.items[0].name, 'firefox/');
assert.equal(result.items[1].name, 'firefox-beta/');
assert.equal(result.items[2].name, 'webkit/');
assert.equal(result.items[3].name, 'ffmpeg/');
assert.equal(result.items[4].name, 'android/');

@fengmk2 fengmk2 merged commit 6bfbe35 into master May 14, 2024
11 checks passed
@fengmk2 fengmk2 deleted the playwright branch May 14, 2024 16:40
fengmk2 pushed a commit that referenced this pull request May 14, 2024
[skip ci]

## [3.57.0](v3.56.2...v3.57.0) (2024-05-14)

### Features

* update playwright config ([#681](#681)) ([6bfbe35](6bfbe35))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants