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

Add step logging to test files for better structure #13359

Closed
wants to merge 1 commit into from

Conversation

artshllk
Copy link

Description

In this PR, I have added step-based logging across all test files to improve readability, clarity, and test structure. This will help us better understand each step during test execution and debugging, ensuring that each phase of the test is explicitly logged.

Proposed Improvement

I also suggest we consider refactoring our approach to selectors:

Move all selectors to a class-based structure: By placing all selectors in a dedicated class, we can centralize their management, making it easier to update or modify them when needed.
Keep logic inside the test body: This would allow us to keep the test logic focused on behavior, improving maintainability and readability.
If the team agrees, I’m happy to create a new PR to implement this approach.

Copy link
Contributor

Label error. Requires exactly 1 of: changelog:.*. Found:

@artshllk
Copy link
Author

To further enhance our code quality and maintainability, we might consider adding some additional ESLint rules in the future. Here are a few suggestions:

eqeqeq: Enforce strict equality checks.
no-console: Disallow console statements for cleaner output.
@typescript-eslint/no-unused-vars: Help catch unused variables more effectively.
@typescript-eslint/no-non-null-assertion: Reduce potential null/undefined errors.
prefer-const: Encourage the use of const for variables that are never reassigned.

If anyone thinks this would be beneficial, just let me know, and I can create a PR for these updates!

@mertalev
Copy link
Contributor

Hi! Thanks for the PR, but I don't think the changes here add much value. It increases noise for successful tests and failed tests already show the line where they failed.

@mertalev mertalev closed this Oct 10, 2024
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