-
Notifications
You must be signed in to change notification settings - Fork 20
fix: skip PlaywrightCheck constructs during pw-test [RED-155] #1223
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
ac421b0
78ffee0
2aa2868
1bbf380
1c62dfa
01e3ac2
d3d0843
300595e
e919916
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,7 +165,11 @@ export async function parseProject (opts: ProjectParseOpts): Promise<Project> { | |
| ignoreWorkspaces: !enableWorkspaces, | ||
| }) | ||
|
|
||
| checklyConfigConstructs?.forEach( | ||
| const filteredConstructs = currentCommand === 'pw-test' | ||
| ? checklyConfigConstructs?.filter(c => !(c instanceof PlaywrightCheck)) | ||
| : checklyConfigConstructs | ||
|
Comment on lines
+169
to
+171
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not completely sure if this is the correct thing to do. Even when you define a PlaywrightCheck in the config, it could potentially refer to a group construct or alert channel constructs. It could, for example, lead to group defaults not being applied. It might also be completely fine. Could you investigate a bit and see if it's OK or not? |
||
|
|
||
| filteredConstructs?.forEach( | ||
| construct => project.addResource(construct.type, construct.logicalId, construct), | ||
| ) | ||
| Session.project = project | ||
|
|
@@ -186,7 +190,9 @@ export async function parseProject (opts: ProjectParseOpts): Promise<Project> { | |
| // TODO: Do we really need all of the ** globs, or could we just put node_modules? | ||
| const ignoreDirectories = ['**/node_modules/**', '**/.git/**', ...ignoreDirectoriesMatch] | ||
|
|
||
| await loadAllCheckFiles(directory, checkMatch, ignoreDirectories) | ||
| if (currentCommand !== 'pw-test') { | ||
|
||
| await loadAllCheckFiles(directory, checkMatch, ignoreDirectories) | ||
| } | ||
|
|
||
| // Load sequentially because otherwise Session.checkFileAbsolutePath and | ||
| // Session.checkFilePath are going to be subject to race conditions. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of why we need to tweak the config for this test below. I think this is correct since this is how a user would set up the project, but please double-check.