Skip to content

Commit 94dd533

Browse files
committed
implement --spec functionality
1 parent eba6b6b commit 94dd533

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/utils/archiver.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,13 @@ export default class Archiver {
7070
ignoredPaths = ignoredPaths.concat(this.config.run_settings.exclude);
7171
}
7272

73-
if (!this.config.run_settings.cypressSpecs) {
74-
allowedFileTypes.forEach((fileType) => {
75-
archive.glob(`**/*.${fileType}`, {
76-
cwd: this.config.run_settings.cypress_project_dir,
77-
matchBase: true,
78-
ignore: ignoredPaths,
79-
});
80-
});
81-
} else {
82-
archive.glob(this.config.run_settings.cypressSpecs, {
73+
allowedFileTypes.forEach((fileType) => {
74+
archive.glob(`**/*.${fileType}`, {
8375
cwd: this.config.run_settings.cypress_project_dir,
8476
matchBase: true,
8577
ignore: ignoredPaths,
8678
});
87-
}
79+
});
8880

8981
const packageJSON = {};
9082

src/utils/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface ICapability {
1616
build?: string;
1717
headless?: boolean;
1818
cypressEnv?: string[];
19+
cypressSpecs?: string[];
1920
cypressVersion?: string;
2021
}
2122

src/utils/uploader.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ export default class Uploader {
4545
});
4646
}
4747

48+
if (this.config.run_settings.cypressSpecs) {
49+
capabilities.map((capability: ICapability) => {
50+
capability.cypressSpecs = this.config.run_settings.cypressSpecs.split(',');
51+
});
52+
}
53+
4854
if (this.config.run_settings.cypressVersion) {
4955
capabilities.map((capability: ICapability) => {
5056
capability.cypressVersion = this.config.run_settings.cypressVersion;

0 commit comments

Comments
 (0)