playwright 1.43.0 → 1.43.1

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.
@@ -24,6 +24,7 @@ exports.serializeRegexPatterns = serializeRegexPatterns;
24
24
 
25
25
  class TeleReporterReceiver {
26
26
  constructor(reporter, options) {
27
+ this.isListing = false;
27
28
  this._rootSuite = void 0;
28
29
  this._options = void 0;
29
30
  this._reporter = void 0;
@@ -34,11 +35,6 @@ class TeleReporterReceiver {
34
35
  this._options = options;
35
36
  this._reporter = reporter;
36
37
  }
37
- reset() {
38
- this._rootSuite.suites = [];
39
- this._rootSuite.tests = [];
40
- this._tests.clear();
41
- }
42
38
  dispatch(message) {
43
39
  const {
44
40
  method,
@@ -99,6 +95,26 @@ class TeleReporterReceiver {
99
95
  // Always update project in watch mode.
100
96
  projectSuite._project = this._parseProject(project);
101
97
  this._mergeSuitesInto(project.suites, projectSuite);
98
+
99
+ // Remove deleted tests when listing. Empty suites will be auto-filtered
100
+ // in the UI layer.
101
+ if (this.isListing) {
102
+ const testIds = new Set();
103
+ const collectIds = suite => {
104
+ suite.tests.map(t => t.testId).forEach(testId => testIds.add(testId));
105
+ suite.suites.forEach(collectIds);
106
+ };
107
+ project.suites.forEach(collectIds);
108
+ const filterTests = suite => {
109
+ suite.tests = suite.tests.filter(t => {
110
+ if (testIds.has(t.id)) return true;
111
+ this._tests.delete(t.id);
112
+ return false;
113
+ });
114
+ suite.suites.forEach(filterTests);
115
+ };
116
+ filterTests(projectSuite);
117
+ }
102
118
  }
103
119
  _onBegin() {
104
120
  var _this$_reporter$onBeg, _this$_reporter2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.43.0",
3
+ "version": "1.43.1",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "license": "Apache-2.0",
60
60
  "dependencies": {
61
- "playwright-core": "1.43.0"
61
+ "playwright-core": "1.43.1"
62
62
  },
63
63
  "optionalDependencies": {
64
64
  "fsevents": "2.3.2"