codeceptjs 3.6.5-beta.2 → 3.6.5-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,6 +88,10 @@ module.exports = function (config) {
88
88
  const pad = '0000'
89
89
  const reportDir = config.output ? path.resolve(global.codecept_dir, config.output) : defaultConfig.output
90
90
 
91
+ event.dispatcher.on(event.suite.before, (suite) => {
92
+ stepNum = -1
93
+ })
94
+
91
95
  event.dispatcher.on(event.test.before, (test) => {
92
96
  const sha256hash = crypto
93
97
  .createHash('sha256')
@@ -149,11 +153,13 @@ module.exports = function (config) {
149
153
  })
150
154
 
151
155
  async function persistStep(step) {
156
+ if (stepNum === -1) return // Ignore steps from BeforeSuite function
152
157
  if (isStepIgnored(step)) return
153
158
  if (savedStep === step) return // already saved
154
159
  // Ignore steps from BeforeSuite function
155
160
  if (scenarioFailed && config.disableScreenshotOnFail) return
156
161
  if (step.metaStep && step.metaStep.name === 'BeforeSuite') return
162
+ if (!step.test) return // Ignore steps from AfterSuite
157
163
 
158
164
  const fileName = `${pad.substring(0, pad.length - stepNum.toString().length) + stepNum.toString()}.png`
159
165
  if (step.status === 'failed') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.6.5-beta.2",
3
+ "version": "3.6.5-beta.4",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -1183,6 +1183,9 @@ declare namespace CodeceptJS {
1183
1183
  // @ts-ignore
1184
1184
  // @ts-ignore
1185
1185
  // @ts-ignore
1186
+ // @ts-ignore
1187
+ // @ts-ignore
1188
+ // @ts-ignore
1186
1189
  class ExpectHelper {
1187
1190
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1188
1191
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1297,6 +1300,9 @@ declare namespace CodeceptJS {
1297
1300
  // @ts-ignore
1298
1301
  // @ts-ignore
1299
1302
  // @ts-ignore
1303
+ // @ts-ignore
1304
+ // @ts-ignore
1305
+ // @ts-ignore
1300
1306
  class ExpectHelper {
1301
1307
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1302
1308
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1971,6 +1977,9 @@ declare namespace CodeceptJS {
1971
1977
  // @ts-ignore
1972
1978
  // @ts-ignore
1973
1979
  // @ts-ignore
1980
+ // @ts-ignore
1981
+ // @ts-ignore
1982
+ // @ts-ignore
1974
1983
  type MockServerConfig = {
1975
1984
  port?: number;
1976
1985
  host?: string;
@@ -2098,6 +2107,9 @@ declare namespace CodeceptJS {
2098
2107
  // @ts-ignore
2099
2108
  // @ts-ignore
2100
2109
  // @ts-ignore
2110
+ // @ts-ignore
2111
+ // @ts-ignore
2112
+ // @ts-ignore
2101
2113
  class MockServer {
2102
2114
  /**
2103
2115
  * Start the mock server
@@ -3174,6 +3186,9 @@ declare namespace CodeceptJS {
3174
3186
  // @ts-ignore
3175
3187
  // @ts-ignore
3176
3188
  // @ts-ignore
3189
+ // @ts-ignore
3190
+ // @ts-ignore
3191
+ // @ts-ignore
3177
3192
  type PlaywrightConfig = {
3178
3193
  url?: string;
3179
3194
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6553,6 +6568,9 @@ declare namespace CodeceptJS {
6553
6568
  // @ts-ignore
6554
6569
  // @ts-ignore
6555
6570
  // @ts-ignore
6571
+ // @ts-ignore
6572
+ // @ts-ignore
6573
+ // @ts-ignore
6556
6574
  type PuppeteerConfig = {
6557
6575
  url: string;
6558
6576
  basicAuth?: any;
@@ -8362,6 +8380,9 @@ declare namespace CodeceptJS {
8362
8380
  // @ts-ignore
8363
8381
  // @ts-ignore
8364
8382
  // @ts-ignore
8383
+ // @ts-ignore
8384
+ // @ts-ignore
8385
+ // @ts-ignore
8365
8386
  type RESTConfig = {
8366
8387
  endpoint?: string;
8367
8388
  prettyPrintJson?: boolean;
@@ -9483,6 +9504,9 @@ declare namespace CodeceptJS {
9483
9504
  // @ts-ignore
9484
9505
  // @ts-ignore
9485
9506
  // @ts-ignore
9507
+ // @ts-ignore
9508
+ // @ts-ignore
9509
+ // @ts-ignore
9486
9510
  type WebDriverConfig = {
9487
9511
  url: string;
9488
9512
  browser: string;
@@ -1207,6 +1207,9 @@ declare namespace CodeceptJS {
1207
1207
  // @ts-ignore
1208
1208
  // @ts-ignore
1209
1209
  // @ts-ignore
1210
+ // @ts-ignore
1211
+ // @ts-ignore
1212
+ // @ts-ignore
1210
1213
  class ExpectHelper {
1211
1214
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1212
1215
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -1321,6 +1324,9 @@ declare namespace CodeceptJS {
1321
1324
  // @ts-ignore
1322
1325
  // @ts-ignore
1323
1326
  // @ts-ignore
1327
+ // @ts-ignore
1328
+ // @ts-ignore
1329
+ // @ts-ignore
1324
1330
  class ExpectHelper {
1325
1331
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1326
1332
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -1998,6 +2004,9 @@ declare namespace CodeceptJS {
1998
2004
  // @ts-ignore
1999
2005
  // @ts-ignore
2000
2006
  // @ts-ignore
2007
+ // @ts-ignore
2008
+ // @ts-ignore
2009
+ // @ts-ignore
2001
2010
  type MockServerConfig = {
2002
2011
  port?: number;
2003
2012
  host?: string;
@@ -2125,6 +2134,9 @@ declare namespace CodeceptJS {
2125
2134
  // @ts-ignore
2126
2135
  // @ts-ignore
2127
2136
  // @ts-ignore
2137
+ // @ts-ignore
2138
+ // @ts-ignore
2139
+ // @ts-ignore
2128
2140
  class MockServer {
2129
2141
  /**
2130
2142
  * Start the mock server
@@ -3267,6 +3279,9 @@ declare namespace CodeceptJS {
3267
3279
  // @ts-ignore
3268
3280
  // @ts-ignore
3269
3281
  // @ts-ignore
3282
+ // @ts-ignore
3283
+ // @ts-ignore
3284
+ // @ts-ignore
3270
3285
  type PlaywrightConfig = {
3271
3286
  url?: string;
3272
3287
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6797,6 +6812,9 @@ declare namespace CodeceptJS {
6797
6812
  // @ts-ignore
6798
6813
  // @ts-ignore
6799
6814
  // @ts-ignore
6815
+ // @ts-ignore
6816
+ // @ts-ignore
6817
+ // @ts-ignore
6800
6818
  type PuppeteerConfig = {
6801
6819
  url: string;
6802
6820
  basicAuth?: any;
@@ -8742,6 +8760,9 @@ declare namespace CodeceptJS {
8742
8760
  // @ts-ignore
8743
8761
  // @ts-ignore
8744
8762
  // @ts-ignore
8763
+ // @ts-ignore
8764
+ // @ts-ignore
8765
+ // @ts-ignore
8745
8766
  type RESTConfig = {
8746
8767
  endpoint?: string;
8747
8768
  prettyPrintJson?: boolean;
@@ -9923,6 +9944,9 @@ declare namespace CodeceptJS {
9923
9944
  // @ts-ignore
9924
9945
  // @ts-ignore
9925
9946
  // @ts-ignore
9947
+ // @ts-ignore
9948
+ // @ts-ignore
9949
+ // @ts-ignore
9926
9950
  type WebDriverConfig = {
9927
9951
  url: string;
9928
9952
  browser: string;