Skip to content

Commit

Permalink
replace some snapshots with checking test ids to be defined
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahlessner committed Oct 10, 2024
1 parent a53e611 commit aef29f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
6 changes: 3 additions & 3 deletions apps/optimizely/src/EditorPage.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import mockProps from './mockProps';
import mockVariantData from './mockData/mockVariantData';

import EditorPage from '../src/EditorPage';
import { vi } from 'vitest';
import { expect, vi } from 'vitest';

configure({ testIdAttribute: 'data-test-id' });

Expand All @@ -22,14 +22,14 @@ describe('EditorPage', () => {
it('should show the reauth modal when no client is available', () => {
const { getByTestId } = render(<EditorPage sdk={sdk} />);

expect(getByTestId('reconnect-optimizely')).toMatchSnapshot();
expect(getByTestId('reconnect-optimizely')).toBeDefined();
});

it('should show the preemtive reconnect warning box', () => {
const expires = (Date.now() + 50000).toString();
const { getByTestId } = render(<EditorPage sdk={sdk} client={() => {}} expires={expires} />);

expect(getByTestId('preemptive-connect')).toMatchSnapshot();
expect(getByTestId('preemptive-connect')).toBeDefined();
});

it('should show the experiment data when loaded', async () => {
Expand Down
19 changes: 0 additions & 19 deletions apps/optimizely/src/__snapshots__/EditorPage.spec.jsx.snap

This file was deleted.

0 comments on commit aef29f9

Please sign in to comment.