Skip to content

Commit 853ed93

Browse files
committed
Enable videos [skip ci]
1 parent 2361603 commit 853ed93

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

e2e-playwright/src/features/Topics.feature

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Feature: Topics page visibility and functions
44
Given Topics is visible
55
When click on Topics link
66
Given Topics Serchfield visible
7-
And Topics ShowInternalTopics visible
7+
And Topics ShowInternalTopics visible
88
And Topics AddATopic visible
99
And Topics DeleteSelectedTopics active is: "false"
1010
And Topics CopySelectedTopic active is: "false"
@@ -18,15 +18,15 @@ Feature: Topics page visibility and functions
1818
Given Topics DeleteSelectedTopics active is: "false"
1919
And Topics CopySelectedTopic active is: "false"
2020
And Topics PurgeMessagesOfSelectedTopics active is: "false"
21-
When Topics serchfield input "SomeTopic"
22-
Then Topic named: "SomeTopic" visible is: "true"
21+
When Topics serchfield input "users"
22+
Then Topic named: "users" visible is: "true"
2323
When Topic serchfield input cleared
24-
Then Topic named: "SomeTopic" visible is: "true"
25-
When Topic row named: "SomeTopic" checked is: "true"
24+
Then Topic named: "users" visible is: "true"
25+
When Topic row named: "users" checked is: "true"
2626
Given Topics DeleteSelectedTopics active is: "true"
2727
And Topics CopySelectedTopic active is: "true"
28-
And Topics PurgeMessagesOfSelectedTopics active is: "true"
29-
When Topic row named: "SomeTopic" checked is: "false"
28+
And Topics PurgeMessagesOfSelectedTopics active is: "true"
29+
When Topic row named: "users" checked is: "false"
3030
Given Topics DeleteSelectedTopics active is: "false"
3131
And Topics CopySelectedTopic active is: "false"
3232
And Topics PurgeMessagesOfSelectedTopics active is: "false"
@@ -41,6 +41,6 @@ Feature: Topics page visibility and functions
4141
Then Topic named: "__consumer_offsets" visible is: "false"
4242
When Topics ShowInternalTopics switched is: "true"
4343
Then Topic named: "__consumer_offsets" visible is: "true"
44-
When Topics serchfield input "SomeTopic"
45-
Then Topic named: "SomeTopic" visible is: "true"
44+
When Topics serchfield input "users"
45+
Then Topic named: "users" visible is: "true"
4646

e2e-playwright/src/hooks/hooks.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import ConnectorsLocators from "../pages/Connectors/ConnectorsLocators";
1414
import ksqlDbLocators from "../pages/KSQLDB/ksqldbLocators";
1515
import DashboardLocators from '../pages/Dashboard/DashboardLocators';
1616
import TopicCreateLocators from "../pages/Topics/TopicsCreateLocators";
17+
import fs from 'fs';
1718

1819
let browser: Browser;
1920
let context: BrowserContext;
@@ -26,7 +27,9 @@ setDefaultTimeout(60 * 1000);
2627

2728
Before(async function ({ pickle }) {
2829
const scenarioName = pickle.name + pickle.id
29-
context = await browser.newContext();
30+
context = await browser.newContext({
31+
recordVideo: { dir: 'test-results/videos/' }
32+
});
3033
await context.tracing.start({
3134
name: scenarioName,
3235
title: pickle.name,
@@ -68,6 +71,12 @@ After({ timeout: 30000 }, async function ({ pickle, result }) {
6871
path: `./test-results/screenshots/${pickle.name}.png`,
6972
type: "png"
7073
});
74+
const video = await fixture.page.video();
75+
if (video) {
76+
const videoPath = await video.path();
77+
const videoFile = fs.readFileSync(videoPath);
78+
await this.attach(videoFile, 'video/webm');
79+
}
7180
}
7281
} catch (e) {
7382
console.error("Error taking screenshot:", e);

0 commit comments

Comments
 (0)