Skip to content

Commit

Permalink
Added a missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Dec 30, 2023
1 parent 478e5a9 commit 665e8f6
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.thucydides.model.requirements;

import net.serenitybdd.model.environment.ConfiguredEnvironment;
import net.thucydides.model.ThucydidesSystemProperty;
import net.thucydides.model.environment.MockEnvironmentVariables;
import net.thucydides.model.domain.RequirementCache;
import net.thucydides.model.domain.TestOutcome;
Expand All @@ -12,6 +13,7 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.Set;
Expand Down Expand Up @@ -149,6 +151,16 @@ void shouldListTheRequirementTypesBasedOnTheDepthOfTheRequirementsHierarchy() {
assertThat(tagProvider.getActiveRequirementTypes()).containsExactly("theme", "capability", "feature");
}

@Test
void shouldListTheRequirementTypesBasedOnTheDepthOfTheRequirementsHierarchyOfAJavaScriptProject() {
environmentVariables.setProperty("serenity.outputDirectory", localResource("serenity-js/spec-2-levels/outcomes"));
environmentVariables.setProperty("serenity.requirements.dir", localResource("serenity-js/spec-2-levels/spec"));
ConfiguredEnvironment.updateConfiguration(environmentVariables);

TestOutcomeRequirementsTagProvider tagProvider = new TestOutcomeRequirementsTagProvider(environmentVariables);
assertThat(tagProvider.getActiveRequirementTypes()).containsExactly("theme", "capability", "feature");
}

@Test
void shouldFindParentRequirementsForTestOutcomes() throws IOException {
environmentVariables.setProperty("serenity.outputDirectory", localResource("sample-junit4-outcomes"));
Expand Down

0 comments on commit 665e8f6

Please sign in to comment.