Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
baev committed Aug 27, 2024
1 parent 7595836 commit 10e062e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/it/report-single-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</execution>
</executions>
<configuration>
<signleFile>true</signleFile>
<singleFile>true</singleFile>
</configuration>
</plugin>
</plugins>
Expand Down
4 changes: 2 additions & 2 deletions src/it/report-single-file/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import java.nio.file.Paths

import static io.qameta.allure.maven.TestHelper.checkIndexHtml
import static io.qameta.allure.maven.TestHelper.checkSingleFile

def base = Paths.get(basedir.absolutePath, 'target', 'site')

checkIndexHtml(base.resolve('allure-maven-plugin'))
checkSingleFile(base.resolve('allure-maven-plugin'))
12 changes: 10 additions & 2 deletions src/test/java/io/qameta/allure/maven/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
import java.util.Arrays;
import java.util.List;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.hamcrest.Matchers.not;
import static ru.yandex.qatools.matchers.nio.PathMatchers.exists;
import static ru.yandex.qatools.matchers.nio.PathMatchers.isDirectory;

Expand Down Expand Up @@ -53,9 +54,16 @@ public static void checkReportDirectory(Path outputDirectory, int testCasesCount
getTestCases(dataDirectory.resolve("test-cases")), hasSize(testCasesCount));
}

public static void checkIndexHtml(Path outputDirectory) {
public static void checkSingleFile(Path outputDirectory) {
Path index = outputDirectory.resolve("index.html");
assertThat(index, exists());

Path dataDirectory = outputDirectory.resolve("data");
assertThat(dataDirectory, not(exists()));

for (String fileName : FILE_NAMES) {
assertThat(dataDirectory.resolve(fileName), not(exists()));
}
}

public static List<String> getTestCases(Path dataDirectory) {
Expand Down

0 comments on commit 10e062e

Please sign in to comment.