nasa / openmct

A web based mission control framework.
https://nasa.github.io/openmct/
Other
11.99k stars 1.24k forks source link

[Testing] Create a POC for testing Vue Components with Playwright #5199

Open unlikelyzero opened 2 years ago

unlikelyzero commented 2 years ago

Summary

Component testing support was recently added in an alpha version of playwright/test. They've added support for vue2 recently. https://github.com/microsoft/playwright/issues/14143

Here's the guide https://playwright.dev/docs/test-components

We did an initial attempt at a POC and have a branch here: https://github.com/nasa/openmct/tree/vue2-component-testing-poc

FAQ for getting started https://github.com/microsoft/playwright/issues/14298

Findings:

<template>
^

SyntaxError: Unexpected token '<'

Next steps:

unlikelyzero commented 2 years ago

Also worth mentioning https://www.cypress.io/blog/2021/04/06/getting-start-with-cypress-component-testing-vue-2-3/