Skip to content

Commit

Permalink
test: don't force a specific order when checking for spectrum names
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Dec 12, 2023
1 parent 66d293b commit 03d0700
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test-e2e/panels/spectra.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,16 +537,18 @@ test('Multiple spectra analysis', async ({ page }) => {
await expect(nmrium.page.getByTestId('spectrum-line')).toHaveCount(13);
});
await test.step('Check spectra names', async () => {
const testPremisses: Array<Promise<void>> = [];
for (let i = 0; i < 13; i++) {
// eslint-disable-next-line no-await-in-loop
await expect(
const test = expect(
nmrium.page.locator(
`_react=SpectraTable >> _react=SpectrumName >> nth=${i} >> text=coffee ${
`_react=SpectraTable >> _react=SpectrumName >> text="coffee ${
i + 1
}`,
}"`,
),
).toBeVisible();
testPremisses.push(test);
}
await Promise.all(testPremisses);
});
await test.step('Check spectra colors', async () => {
expect(await nmrium.getNumberOfDistinctColors()).toBe(13);
Expand Down

0 comments on commit 03d0700

Please sign in to comment.