Skip to content

Commit 0c51b37

Browse files
committed
adding delay and reduce loop amount for chat tests
1 parent 51e8366 commit 0c51b37

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

e2e/tests/chat.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test.describe("Chat tests", () => {
3030
await chat.selectGraph(GRAPH_ID);
3131
const isLoadingArray: boolean[] = [];
3232

33-
for (let i = 0; i < 10; i++) {
33+
for (let i = 0; i < 5; i++) {
3434
await chat.sendMessage(Node_Question);
3535
const isLoading: boolean = await chat.getpreviousQuestionLoadingImage();
3636
isLoadingArray.push(isLoading);
@@ -44,7 +44,7 @@ test.describe("Chat tests", () => {
4444
test("Verify auto-scroll and manual scroll in chat", async () => {
4545
const chat = await browser.createNewPage(CodeGraph, urls.baseUrl);
4646
await chat.selectGraph(GRAPH_ID);
47-
for (let i = 0; i < 10; i++) {
47+
for (let i = 0; i < 5; i++) {
4848
await chat.sendMessage(Node_Question);
4949
}
5050
await delay(500);
@@ -72,13 +72,15 @@ test.describe("Chat tests", () => {
7272
await chat.clickOnshowPathBtn();
7373
await chat.insertInputForShowPath("1", Node_Add_Edge);
7474
await chat.insertInputForShowPath("2", Node_Import_Data);
75+
await delay(500);
7576
expect(await chat.isNotificationError()).toBe(true);
7677
});
7778

7879
test("Validate error notification when sending an empty question in chat", async () => {
7980
const chat = await browser.createNewPage(CodeGraph, urls.baseUrl);
8081
await chat.selectGraph(GRAPH_ID);
8182
await chat.clickAskquestionBtn();
83+
await delay(500);
8284
expect(await chat.isNotificationError()).toBe(true);
8385
});
8486

0 commit comments

Comments
 (0)