Skip to content

Commit f2bd898

Browse files
Merge pull request #6983 from masslight/alex/fix-nw-mdm-flake
Alex/fix nw mdm flake
2 parents d401f25 + 69c5b4f commit f2bd898

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/ehr/tests/e2e/specs/in-person/inPersonChartData.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,11 @@ test.describe('In-Person Visit Chart Data', async () => {
672672
// Check default text
673673
await assessmentPage.expectMdmField({ text: '' });
674674

675-
// Edit the text
675+
// Edit the text and wait for the debounced save to complete
676676
const newText = 'Updated medical decision making text';
677+
const saveResponsePromise = page.waitForResponse((resp) => resp.url().includes('save-chart-data'));
677678
await assessmentPage.fillMdmField(newText);
678-
await page.getByTestId(dataTestIds.assessmentCard.medicalDecisionLoading).waitFor({ state: 'visible' });
679-
await page.getByTestId(dataTestIds.assessmentCard.medicalDecisionLoading).waitFor({ state: 'hidden' });
679+
await saveResponsePromise;
680680

681681
// Verify text is updated
682682
await assessmentPage.expectMdmField({ text: newText });

0 commit comments

Comments
 (0)