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

injecting test & siute to container #4785

Merged
merged 3 commits into from
Jan 30, 2025
Merged

Conversation

DavertMik
Copy link
Contributor

  • injected suite and test into DI
Feature('store-test-and-suite suite')

BeforeSuite(({ suite }) => {
})

Before(({ test }) => {
  test.artifacts.screenshot = 'screenshot'
})

Scenario('test store-test-and-suite test', ({ test }) => {
  assert(test.artifacts)
  assert(test.meta)
  test.meta.browser = 'chrome'
})

After(({ test }) => {
})

Based on feedback

  • changed color for check
  • changed standard acting helper location to Container (plugin to be removed in 4.0)
  • added AI checker for check
  • rolled back codeceptjs object to executed for event.all.before and event.all.after

@DavertMik DavertMik requested a review from kobenguyent January 28, 2025 04:32
@@ -23,6 +22,7 @@ module.exports = async function (options) {
container: false,
pageObjects: false,
plugins: false,
ai: true, // we don't need to check AI
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm just a bit confused here. Is setting true meaning to skip the check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it should not fail if off

@ngraf
Copy link
Contributor

ngraf commented Jan 28, 2025

‼️ When I use this branch, my Typescript compiler fails when I run

$ npx codeceptjs run                                                                                          

TSError: ⨯ Unable to compile TypeScript:
src/config/config.ts:7:10 - error TS2305: Module '"codeceptjs"' has no exported member 'container'.

Line 7 in src/config/config.ts looks like this:

import { container } from 'codeceptjs';

.. I have the impression that any kind of import fails. Not just for container.
I guess there is something fundamentally broken in this branch.
I hope you can easily reproduce.
If not I can provide more details.

@DavertMik
Copy link
Contributor Author

@ngraf is that only here or on 3.x as well?

also try other things except of Container

sorry, I don't use TS much so I don't know how better to test it

@DavertMik
Copy link
Contributor Author

I think I fixed this issue. Please re-check TS

@ngraf
Copy link
Contributor

ngraf commented Jan 29, 2025

I installed the beta version in a wrong way. My fault.
Ignore the reported issue in #4785 (comment)

@DavertMik DavertMik merged commit 9aae736 into 3.x Jan 30, 2025
12 checks passed
@DavertMik DavertMik deleted the feat/add-suite-test-to-container branch January 30, 2025 01:13
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.

3 participants