Skip to content

Commit fbb9341

Browse files
test: update Surface tests
1 parent f6690f6 commit fbb9341

32 files changed

+827
-520
lines changed

src/components/__tests__/AnimatedFAB.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ it('animated value changes correctly', () => {
7979
style={[{ transform: [{ scale: value }] }]}
8080
/>
8181
);
82-
expect(getByTestId('animated-fab-container')).toHaveStyle({
82+
expect(getByTestId('animated-fab-container-outer-layer')).toHaveStyle({
8383
transform: [{ scale: 1 }],
8484
});
8585

@@ -91,7 +91,7 @@ it('animated value changes correctly', () => {
9191

9292
jest.advanceTimersByTime(200);
9393

94-
expect(getByTestId('animated-fab-container')).toHaveStyle({
94+
expect(getByTestId('animated-fab-container-outer-layer')).toHaveStyle({
9595
transform: [{ scale: 1.5 }],
9696
});
9797
});

src/components/__tests__/Appbar/Appbar.test.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ describe('animated value changes correctly', () => {
384384
<Appbar.Action icon="menu" />
385385
</Appbar>
386386
);
387-
expect(getByTestId('appbar')).toHaveStyle({
387+
expect(getByTestId('appbar-outer-layer')).toHaveStyle({
388388
transform: [{ scale: 1 }],
389389
});
390390

@@ -396,7 +396,7 @@ describe('animated value changes correctly', () => {
396396

397397
jest.advanceTimersByTime(200);
398398

399-
expect(getByTestId('appbar')).toHaveStyle({
399+
expect(getByTestId('appbar-outer-layer')).toHaveStyle({
400400
transform: [{ scale: 1.5 }],
401401
});
402402
});
@@ -412,7 +412,7 @@ describe('animated value changes correctly', () => {
412412
/>
413413
</Appbar>
414414
);
415-
expect(getByTestId('appbar-action-container')).toHaveStyle({
415+
expect(getByTestId('appbar-action-container-outer-layer')).toHaveStyle({
416416
transform: [{ scale: 1 }],
417417
});
418418

@@ -424,7 +424,7 @@ describe('animated value changes correctly', () => {
424424

425425
jest.advanceTimersByTime(200);
426426

427-
expect(getByTestId('appbar-action-container')).toHaveStyle({
427+
expect(getByTestId('appbar-action-container-outer-layer')).toHaveStyle({
428428
transform: [{ scale: 1.5 }],
429429
});
430430
});
@@ -439,9 +439,11 @@ describe('animated value changes correctly', () => {
439439
/>
440440
</Appbar>
441441
);
442-
expect(getByTestId('appbar-back-action-container')).toHaveStyle({
443-
transform: [{ scale: 1 }],
444-
});
442+
expect(getByTestId('appbar-back-action-container-outer-layer')).toHaveStyle(
443+
{
444+
transform: [{ scale: 1 }],
445+
}
446+
);
445447

446448
Animated.timing(value, {
447449
toValue: 1.5,
@@ -451,9 +453,11 @@ describe('animated value changes correctly', () => {
451453

452454
jest.advanceTimersByTime(200);
453455

454-
expect(getByTestId('appbar-back-action-container')).toHaveStyle({
455-
transform: [{ scale: 1.5 }],
456-
});
456+
expect(getByTestId('appbar-back-action-container-outer-layer')).toHaveStyle(
457+
{
458+
transform: [{ scale: 1.5 }],
459+
}
460+
);
457461
});
458462

459463
it('header animated value changes correctly', () => {
@@ -468,7 +472,7 @@ describe('animated value changes correctly', () => {
468472
</Appbar.Header>
469473
</mockSafeAreaContext.SafeAreaProvider>
470474
);
471-
expect(getByTestId('appbar-header')).toHaveStyle({
475+
expect(getByTestId('appbar-header-outer-layer')).toHaveStyle({
472476
transform: [{ scale: 1 }],
473477
});
474478

@@ -480,7 +484,7 @@ describe('animated value changes correctly', () => {
480484

481485
jest.advanceTimersByTime(200);
482486

483-
expect(getByTestId('appbar-header')).toHaveStyle({
487+
expect(getByTestId('appbar-header-outer-layer')).toHaveStyle({
484488
transform: [{ scale: 1.5 }],
485489
});
486490
});

0 commit comments

Comments
 (0)