@dionlarson/playwright-orchestrator-pg 1.6.1 → 1.6.3
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.
|
@@ -43,8 +43,8 @@ export class PostgreSQLAdapter extends Adapter {
|
|
|
43
43
|
});
|
|
44
44
|
if (result.rowCount === 0)
|
|
45
45
|
return undefined;
|
|
46
|
-
const { file, line, character, project, timeout, order_num, title } = result.rows[0];
|
|
47
|
-
return { file, position: `${line}:${character}`, project, timeout, order: order_num, title };
|
|
46
|
+
const { file, line, character, project, timeout, order_num, title, is_serial } = result.rows[0];
|
|
47
|
+
return { file, position: `${line}:${character}`, project, timeout, order: order_num, title, isSerial: is_serial };
|
|
48
48
|
}
|
|
49
49
|
async finishTest(params) {
|
|
50
50
|
await this.updateTestWithResults(TestStatus.Passed, params);
|
|
@@ -60,7 +60,7 @@ export class PostgreSQLAdapter extends Adapter {
|
|
|
60
60
|
text: `INSERT INTO ${this.configTable} (id, status, config) VALUES ($1, $2, $3)`,
|
|
61
61
|
values: [runId, RunStatus.Created, JSON.stringify({ ...testRun.config, args, historyWindow })],
|
|
62
62
|
});
|
|
63
|
-
const fields = ['order_num', 'file', 'line', 'character', 'project', 'timeout', 'title'];
|
|
63
|
+
const fields = ['order_num', 'file', 'line', 'character', 'project', 'timeout', 'title', 'is_serial'];
|
|
64
64
|
await this.pool.query({
|
|
65
65
|
text: `INSERT INTO ${this.testsTable} (run_id, ${fields.join(', ')}) VALUES ${tests
|
|
66
66
|
.map((_, i) => {
|
|
@@ -71,9 +71,9 @@ export class PostgreSQLAdapter extends Adapter {
|
|
|
71
71
|
.join(', ')}`,
|
|
72
72
|
values: [
|
|
73
73
|
runId,
|
|
74
|
-
...tests.flatMap(({ position, order, file, project, timeout, title }) => {
|
|
74
|
+
...tests.flatMap(({ position, order, file, project, timeout, title, isSerial }) => {
|
|
75
75
|
const [line, character] = position.split(':');
|
|
76
|
-
return [order, file, line, character, project, timeout, title];
|
|
76
|
+
return [order, file, line, character, project, timeout, title, isSerial ?? false];
|
|
77
77
|
}),
|
|
78
78
|
],
|
|
79
79
|
});
|
|
@@ -102,6 +102,7 @@ export class PostgreSQLAdapter extends Adapter {
|
|
|
102
102
|
);
|
|
103
103
|
CREATE INDEX IF NOT EXISTS status_idx ON ${this.testsTable}(status);
|
|
104
104
|
ALTER TABLE ${this.testsTable} ADD COLUMN IF NOT EXISTS title TEXT NOT NULL DEFAULT '';
|
|
105
|
+
ALTER TABLE ${this.testsTable} ADD COLUMN IF NOT EXISTS is_serial BOOLEAN NOT NULL DEFAULT FALSE;
|
|
105
106
|
CREATE TABLE IF NOT EXISTS ${this.testInfoTable} (
|
|
106
107
|
id SERIAL PRIMARY KEY,
|
|
107
108
|
name TEXT NOT NULL,
|