Skip to content

Commit 1f45b1c

Browse files
committed
check three more buttons in the NavBar
1 parent 8616fcd commit 1f45b1c

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

tests/e2e-frontend/tests/navigationBar/navigationBar.spec.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const expectedElements = {
2626
"visible": true,
2727
"label": "DATA",
2828
},
29+
"notifications": true,
30+
"help": true,
31+
"credits": false,
2932
},
3033
"s4l": {
3134
"poweredByOsparc": true,
@@ -44,6 +47,9 @@ const expectedElements = {
4447
"data": {
4548
"visible": false,
4649
},
50+
"notifications": true,
51+
"help": true,
52+
"credits": true,
4753
},
4854
"s4lacad": {
4955
"poweredByOsparc": true,
@@ -62,6 +68,9 @@ const expectedElements = {
6268
"data": {
6369
"visible": false,
6470
},
71+
"notifications": true,
72+
"help": true,
73+
"credits": true,
6574
},
6675
"s4llite": {
6776
"poweredByOsparc": true,
@@ -79,6 +88,9 @@ const expectedElements = {
7988
"data": {
8089
"visible": false,
8190
},
91+
"notifications": true,
92+
"help": true,
93+
"credits": false,
8294
},
8395
"tis": {
8496
"poweredByOsparc": true,
@@ -95,6 +107,9 @@ const expectedElements = {
95107
"data": {
96108
"visible": false,
97109
},
110+
"notifications": true,
111+
"help": true,
112+
"credits": true,
98113
},
99114
"tiplite": {
100115
"poweredByOsparc": true,
@@ -111,6 +126,9 @@ const expectedElements = {
111126
"data": {
112127
"visible": false,
113128
},
129+
"notifications": true,
130+
"help": true,
131+
"credits": true,
114132
},
115133
};
116134

@@ -188,6 +206,45 @@ for (const product in products) {
188206
await checkButton("servicesTabBtn", isServicesVisible, servicesLabel);
189207
await checkButton("dataTabBtn", isDataVisible, dataLabel);
190208
});
209+
210+
test(`Check Notifications button`, async () => {
211+
expect(expectedElements[product]["notifications"]).toBeDefined();
212+
213+
const isVisible = expectedElements[product]["notifications"];
214+
const button = page.getByTestId("notificationsButton");
215+
if (isVisible) {
216+
await expect(button).toBeVisible();
217+
} else {
218+
await expect(button).toHaveCount(0);
219+
}
220+
});
221+
222+
test(`Check Help button`, async () => {
223+
expect(expectedElements[product]["help"]).toBeDefined();
224+
225+
const isVisible = expectedElements[product]["help"];
226+
const button = page.getByTestId("helpNavigationBtn");
227+
if (isVisible) {
228+
await expect(button).toBeVisible();
229+
} else {
230+
await expect(button).toHaveCount(0);
231+
}
232+
});
233+
234+
test(`Check Credits button`, async () => {
235+
expect(expectedElements[product]["credits"]).toBeDefined();
236+
237+
const isVisible = expectedElements[product]["credits"];
238+
const button = page.getByTestId("creditsIndicatorButton");
239+
if (isVisible) {
240+
await expect(button).toBeVisible();
241+
} else {
242+
await expect(button).toHaveCount(0);
243+
}
244+
});
245+
246+
247+
191248
});
192249
}
193250
}

0 commit comments

Comments
 (0)