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

tests: frontend test framework setup with playwright #268

Merged
merged 36 commits into from
Mar 5, 2024

Conversation

raaymax
Copy link
Collaborator

@raaymax raaymax commented Feb 27, 2024

No description provided.

@raaymax raaymax marked this pull request as draft February 27, 2024 15:34
ui/tests/button.spec.ts Outdated Show resolved Hide resolved
ui_test_app/index.js Outdated Show resolved Hide resolved
{ type: "metric", locator: `div.CoreMetric.component` },
{ type: "message", locator: `div.CoreMessage.component` },
{ type: "videoplayer", locator: `div.CoreVideoPlayer.component` },
];
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have an idea, we should do a pass of the whole templateMap and check whether we have tests for everything mentioned there. If we don't, we fail.

Otherwise we can easily forget.

Or maybe some --strict flag so that we can pass a PR but not release?

Keen to hear your thoughts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking about using templateMap here earlier but I don't have access to this file from here. Thats why I just created list of components base on templateMap.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you have access to the core you can use getSupportedComponentTypes without doing an import of templateMap which I agree, wouldn't be the cleanest.

@ramedina86
Copy link
Collaborator

I'd really like to start benefiting from this soon, as it gives me more confidence not only when it comes to frontend but also end-to-end. There's the Low Code UI work going on which is big and disruptive, also Fabien's latest PR.

Any chance we can merge something in the next few days?

@raaymax
Copy link
Collaborator Author

raaymax commented Mar 5, 2024

I'm doing what i can to resolve all issues before making it ready to review.
Currently only chromium tests are passing firefox and safari still needs some work.
But I think positively and hope that everything will be resolved soon.

@raaymax raaymax marked this pull request as ready for review March 5, 2024 15:24
@raaymax raaymax requested a review from ramedina86 March 5, 2024 16:00
console.log(
`[${ss.pid}] stdout: ${Buffer.from(data, "utf-8").toString()}`,
);
if (data.includes("Builder is available at")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any ideas to make this less hacky in the future? Something like a health check, some signal I don't know about?

Probably useful for other purposes too.


test.setTimeout(5000);

test.describe('undo and redo', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome that you included this

@ramedina86 ramedina86 merged commit 72a2f75 into writer:dev Mar 5, 2024
15 checks passed
This pull request was closed.
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