You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you define your project in such a way you have more than one layer of modules, whenever you run tests for a specific class it will start a gradle task on the topmost parent module in the hierarchy.
For instance, imagine we have the following project structure:
myProject root
model
domain
presentation
feature1
feature2
featureN
Running any contextual testing action for a feature class will trigger a gradle task for the whole presentation module.
That can be problematic for projects with dozen of other sibling modules.
Executingtasks: [verifyPaparazziDebug, --tests, com.company.presentation.feature1.myClass] in project /Users/alex/git/myProject/presentation
The problem seems to be caused by the Path.modulePath extension, which probably assumes there will be only one layer of modules.
An easy workaround would be removing the ".idea/modules" from the module's path.
In additional to that, because we have nested modules, we need to get the path that is closer to the file. This can be solved by ordering the paths by size and choosing the first match with the biggest size.
The following implementation works and address both issues mentioned above:
If you define your project in such a way you have more than one layer of modules, whenever you run tests for a specific class it will start a gradle task on the topmost parent module in the hierarchy.
For instance, imagine we have the following project structure:
Running any contextual testing action for a feature class will trigger a gradle task for the whole presentation module.
That can be problematic for projects with dozen of other sibling modules.
The problem seems to be caused by the
Path.modulePath
extension, which probably assumes there will be only one layer of modules.paparazzi-plugin/src/main/kotlin/com/getyourguide/paparazzi/Utils.kt
Lines 63 to 70 in c062d36
The text was updated successfully, but these errors were encountered: