Skip to content

Commit f4ecbb1

Browse files
test: update locators selector
1 parent 47f64d5 commit f4ecbb1

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

test-e2e/core.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ test('should load NMRium from external Urls', async ({ page }) => {
2626
// if loaded successfully, there should be a 1H and 13C tabs
2727
await test.step('spectra should be loaded', async () => {
2828
await expect(
29-
nmrium.page.locator('_react=InternalTab[tabid = "1H"]'),
29+
nmrium.page.locator('.tab-list-item >> text=1H'),
3030
).toBeVisible();
3131
await expect(
32-
nmrium.page.locator('_react=InternalTab[tabid = "13C"]'),
32+
nmrium.page.locator('.tab-list-item >> text=13C'),
3333
).toBeVisible();
3434
});
3535

@@ -45,7 +45,7 @@ test('should load NMRium from Files', async ({ page }) => {
4545
// if loaded successfully, there should be a 1H and 13C tabs
4646
await test.step('spectra should be loaded', async () => {
4747
await expect(
48-
nmrium.page.locator('_react=InternalTab[tabid = "13C"]'),
48+
nmrium.page.locator('.tab-list-item >> text=13C'),
4949
).toBeVisible();
5050
});
5151

@@ -60,7 +60,5 @@ test('should load NMRium from json', async ({ page }) => {
6060
await nmrium.page.click('text=Test load from json');
6161

6262
// if loaded successfully, there should be a 1H and 13C tabs
63-
await expect(
64-
nmrium.page.locator('_react=InternalTab[tabid = "13C"]'),
65-
).toBeVisible();
63+
await expect(nmrium.page.locator('.tab-list-item >> text=13C')).toBeVisible();
6664
});

0 commit comments

Comments
 (0)