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

refactor: prepare html-reporter for pwt GUI integration #522

Merged

Conversation

shadowusr
Copy link
Member

@shadowusr shadowusr commented Nov 26, 2023

What's done?

  • re-written hermione.js to typescript
  • renamed sqlite-adapter to a more precise sqlite-client
  • got rid of init method in sqlite-client
  • began to use ReporterTestResult instead of tool-specific/weird types in sqlite-adapter
  • made attempt field of test result readonly and introduced explicit handling of attempt number

Why?

  • These changes make the code more explicit, simple and clear, in my opinion
  • These changes open a road to pwt GUI integration

⚠️ I recommend reviewing this PR commit-by-commit.

lib/test-attempt-manager.ts Outdated Show resolved Hide resolved
hermione.ts Outdated Show resolved Hide resolved
hermione.ts Outdated Show resolved Hide resolved
hermione.ts Outdated Show resolved Hide resolved
hermione.ts Show resolved Hide resolved
lib/plugin-adapter.ts Outdated Show resolved Hide resolved
lib/plugin-adapter.ts Outdated Show resolved Hide resolved
lib/test-adapter/hermione.ts Outdated Show resolved Hide resolved
lib/test-attempt-manager.ts Outdated Show resolved Hide resolved
lib/test-attempt-manager.ts Outdated Show resolved Hide resolved
@shadowusr shadowusr force-pushed the users/shadowusr/HERMIONE-1004.get-rid-of-prepared-result branch from cb4b5f5 to fc00f1c Compare December 6, 2023 09:01
Copy link
Member

@sipayRT sipayRT left a comment

Choose a reason for hiding this comment

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

✅ refactor: get rid of plugin-adapter

hermione.ts Outdated Show resolved Hide resolved
hermione.ts Outdated
});

hermione.on(hermione.events.INIT, async () => {
if (isCliCommandLaunched) {
Copy link
Member

Choose a reason for hiding this comment

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

чет я не понимаю для чего это условие

Copy link
Member Author

Choose a reason for hiding this comment

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

Это нужно чтобы при запуске cli команд типа gui или любых других команд html-reporter не запускался обычный прогон hermione.

Ранее это было реализовано в PluginAdapter в виде this._run = _.noop. Сейчас — этим способом.

@shadowusr shadowusr merged commit 57589a5 into master Dec 12, 2023
5 checks passed
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