Skip to content

feat: add test for markdown webview #5740

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

Merged
merged 2 commits into from
Nov 3, 2022
Merged

feat: add test for markdown webview #5740

merged 2 commits into from
Nov 3, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Oct 31, 2022

This adds a test to ensure webviews work by rendering the Markdown Preview.

@jsjoeio jsjoeio self-assigned this Oct 31, 2022
@jsjoeio jsjoeio temporarily deployed to npm October 31, 2022 23:29 Inactive
@github-actions
Copy link

github-actions bot commented Oct 31, 2022

✨ code-server dev build published to npm for PR #5740!

  • Last publish status: success
  • Commit: 6468682

To install in a local project, run:

npm install @coder/code-server-pr@5740

To install globally, run:

npm install -g @coder/code-server-pr@5740

@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Merging #5740 (6468682) into main (2530a0d) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5740   +/-   ##
=======================================
  Coverage   72.65%   72.65%           
=======================================
  Files          30       30           
  Lines        1682     1682           
  Branches      369      369           
=======================================
  Hits         1222     1222           
  Misses        397      397           
  Partials       63       63           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2530a0d...6468682. Read the comment docs.

@jsjoeio jsjoeio temporarily deployed to npm November 3, 2022 16:50 Inactive
@jsjoeio jsjoeio temporarily deployed to npm November 3, 2022 17:31 Inactive
Comment on lines +19 to +24
// It's an iframe within an iframe
// so we have to do .frameLocator twice
const renderedText = await codeServerPage.page
.frameLocator("iframe.webview.ready")
.frameLocator("#active-frame")
.locator("text=Hello world")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the hardest part. I didn't realize it was an <iframe> inside of an <iframe> but some rubber-ducking with @code-asher helped me figure it out.

@jsjoeio jsjoeio marked this pull request as ready for review November 3, 2022 17:31
@jsjoeio jsjoeio requested a review from a team as a code owner November 3, 2022 17:31
@jsjoeio jsjoeio requested a review from code-asher November 3, 2022 20:44
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

🎉 🎉 🎉

@jsjoeio jsjoeio merged commit f56ce5b into main Nov 3, 2022
@jsjoeio jsjoeio deleted the jsjoeio/csp-test branch November 3, 2022 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants