Skip to content

Commit a495541

Browse files
committed
FE: Try to fix java e2e test
1 parent 57b056a commit a495541

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

e2e-tests/src/main/java/io/kafbat/ui/screens/BasePage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public abstract class BasePage extends WebUtil {
3636
protected ElementsCollection gridItems = $$x("//tr[@class]");
3737
protected String summaryCellLocator = "//div[contains(text(),'%s')]";
3838
protected String tableElementNameLocator = "//tbody//a[contains(text(),'%s')]";
39+
protected String columnCellLocator = "//table//tr/td//*[contains(text(),'%s')]";
3940
protected String columnHeaderLocator = "//table//tr/th//div[text()='%s']";
4041
protected String pageTitleFromHeader = "//h1[text()='%s']";
4142
protected String pagePathFromHeader = "//a[text()='%s']/../h1";
@@ -102,6 +103,10 @@ protected SelenideElement getTableElement(String elementName) {
102103
log.debug("\ngetTableElement: {}", elementName);
103104
return $x(String.format(tableElementNameLocator, elementName));
104105
}
106+
protected SelenideElement getTableCellElement(String elementName) {
107+
log.debug("\ngetTableElement: {}", elementName);
108+
return $x(String.format(columnCellLocator, elementName));
109+
}
105110

106111
protected ElementsCollection getDdlOptions() {
107112
return ddlOptions;

e2e-tests/src/main/java/io/kafbat/ui/screens/connectors/KafkaConnectList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public KafkaConnectList clickCreateConnectorBtn() {
3333

3434
@Step
3535
public KafkaConnectList openConnector(String connectorName) {
36-
getTableElement(connectorName).shouldBe(Condition.enabled).click();
36+
getTableCellElement(connectorName).shouldBe(Condition.enabled).click();
3737
return this;
3838
}
3939

frontend/src/components/Connect/List/List.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import useAppParams from 'lib/hooks/useAppParams';
33
import { clusterConnectConnectorPath, ClusterNameRoute } from 'lib/paths';
4-
import Table, { LinkCell, TagCell } from 'components/common/NewTable';
4+
import Table, { TagCell } from 'components/common/NewTable';
55
import { FullConnectorInfo } from 'generated-sources';
66
import { useConnectors } from 'lib/hooks/api/kafkaConnect';
77
import { ColumnDef } from '@tanstack/react-table';
@@ -18,13 +18,14 @@ const kafkaConnectColumns: ColumnDef<FullConnectorInfo>[] = [
1818
{
1919
header: 'Name',
2020
accessorKey: 'name',
21-
cell: ({ getValue }) => (
22-
<LinkCell
23-
wordBreak
24-
value={`${getValue<string | number>()}`}
25-
to={encodeURIComponent(`${getValue<string | number>()}`)}
26-
/>
27-
),
21+
cell: BreakableTextCell,
22+
// cell: ({ getValue }) => (
23+
// <LinkCell
24+
// wordBreak
25+
// value={`${getValue<string | number>()}`}
26+
// to={encodeURIComponent(`${getValue<string | number>()}`)}
27+
// />
28+
// ),
2829
enableResizing: true,
2930
},
3031
{

0 commit comments

Comments
 (0)