Skip to content

Commit

Permalink
fix(cucumber): add FakedJHipsterPresetsFilePropertiesConfiguration to…
Browse files Browse the repository at this point in the history
… cucumber tests context
  • Loading branch information
renanfranca committed Aug 17, 2024
1 parent edc56de commit db3805a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
import tech.jhipster.lite.JHLiteApp;
import tech.jhipster.lite.cucumber.rest.CucumberRestTestContext;
import tech.jhipster.lite.project.infrastructure.secondary.FakedFileSystemProjectFilesConfiguration;
import tech.jhipster.lite.project.infrastructure.secondary.FakedJHipsterPresetsFilePropertiesConfiguration;
import tech.jhipster.lite.project.infrastructure.secondary.MockedProjectFormatterConfiguration;

@ActiveProfiles("test")
@CucumberContextConfiguration
@SpringBootTest(
classes = { JHLiteApp.class, MockedProjectFormatterConfiguration.class, FakedFileSystemProjectFilesConfiguration.class },
classes = {
JHLiteApp.class,
MockedProjectFormatterConfiguration.class,
FakedFileSystemProjectFilesConfiguration.class,
FakedJHipsterPresetsFilePropertiesConfiguration.class,
},
webEnvironment = WebEnvironment.RANDOM_PORT
)
public class CucumberConfiguration {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package tech.jhipster.lite.project.infrastructure.secondary;

import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import tech.jhipster.lite.project.domain.resource.JHipsterPresetsFile;

@TestConfiguration
public class FakedJHipsterPresetsFilePropertiesConfiguration {

@Bean
JHipsterPresetsFile jhipsterPresetsFile() {
return new JHipsterPresetsFile("preset.json");
}
}

0 comments on commit db3805a

Please sign in to comment.