Skip to content

Conversation

@DiogoPires2003
Copy link
Contributor

This PR introduces a new Playwright end-to-end test suite in template_testing.spec.ts to cover the following template-related scenarios:

Creating a new template and verifying its presence in the list.
Displaying an error when attempting to create a template with a duplicate name.
Validating required fields (name and description) during template creation.
Filtering templates by name using the search functionality.
Preventing saving a template with an empty description.
These tests help ensure the robustness of the template creation workflow, proper error handling, and improved user experience in the template management section. All tests use a consistent login flow and interact with the UI as an end user would.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
62.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@DiogoPires2003
Copy link
Contributor Author

should create a template and verify it appears in the list

Simulates a user logging in, navigating to the Templates section, and creating a new template with the name and description "test".
Completes all required steps in the template creation wizard, including selecting test type and options.
After saving, verifies that the new template appears in the Templates list.
should show error when creating a template with duplicate name

Logs in and navigates to the Templates section.
Attempts to create a new template with the same name ("test") as an existing template.
Expects an error message indicating that a template with this name already exists or is a duplicate.
should validate required fields when creating a template

Logs in and starts the template creation process.
Leaves the "Test Name" field empty but fills in the description.
Attempts to save and expects a validation error message indicating that the name is required.
should filter templates by name

Logs in and navigates to the Templates section.
Uses the search/filter input to search for templates with the name "test".
Verifies that templates matching the search term are visible in the list.
should not allow saving template with empty description

Logs in and starts creating a new template, filling in the name but leaving the description empty.
Attempts to save and expects a validation error message indicating that the description is required.

@DiogoPires2003 DiogoPires2003 requested a review from marcgc21 June 14, 2025 16:36
@marcgc21
Copy link
Member

Thank you for your contribution @DiogoPires2003! As you have seen there is on quality gate that blocked the merge request because there is a 62% of duplicated code.
However I will merge it and will updated into the future.

Thanks!

@marcgc21 marcgc21 merged commit 5dd607c into ruxailab:develop Jun 19, 2025
5 of 6 checks passed
KarinePistili pushed a commit that referenced this pull request Oct 8, 2025
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