Skip to content

Commit 0ce5ab1

Browse files
committed
test fixes
1 parent 4b300ba commit 0ce5ab1

File tree

54 files changed

+311
-264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+311
-264
lines changed

toolkit/theme/recipes/drawer.recipe.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ export const recipe = defineSlotRecipe({
5454
},
5555
header: {
5656
flex: 0,
57-
px: '5',
58-
pt: '5',
59-
pb: '3',
57+
px: '6',
58+
pt: '6',
59+
pb: '4',
6060
},
6161
body: {
62-
p: '5',
62+
p: '6',
6363
flex: '1',
6464
overflow: 'auto',
6565
},
@@ -68,7 +68,7 @@ export const recipe = defineSlotRecipe({
6868
alignItems: 'center',
6969
justifyContent: 'flex-end',
7070
gap: '3',
71-
px: '5',
71+
px: '6',
7272
pt: '2',
7373
pb: '4',
7474
},
@@ -147,6 +147,17 @@ export const recipe = defineSlotRecipe({
147147
positioner: {
148148
alignItems: 'flex-end',
149149
},
150+
header: {
151+
px: '5',
152+
pt: '5',
153+
pb: '3',
154+
},
155+
body: {
156+
p: '5',
157+
},
158+
footer: {
159+
px: '5',
160+
},
150161
content: {
151162
maxW: '100%',
152163
_open: { animationName: 'slide-from-bottom-full, fade-in' },

ui/pages/SearchResults.pw.tsx

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,42 @@ import { test, expect } from 'playwright/lib';
99
import SearchResults from './SearchResults';
1010

1111
async function resetScroll(page: Page) {
12-
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
12+
// Scroll to top and ensure we stay there
1313
await page.evaluate(() => window.scrollTo(0, 0));
14+
15+
// Wait for sticky headers to be in their default (hidden) state
16+
// Check for ActionBar - it should not be visible when at top
17+
await page.waitForFunction(() => {
18+
const actionBar = document.querySelector('[data-testid="action-bar"]') ||
19+
document.querySelector('[class*="ActionBar"]') ||
20+
document.querySelector('[class*="action-bar"]');
21+
if (actionBar) {
22+
const rect = actionBar.getBoundingClientRect();
23+
// ActionBar should be in its default position (not sticky) when at top
24+
return rect.top > 0;
25+
}
26+
return true; // If no ActionBar found, consider it "hidden"
27+
}, { timeout: 500 });
28+
29+
// Check for TableHeaderSticky - it should not be stuck when at top
30+
await page.waitForFunction(() => {
31+
const stickyHeaders = document.querySelectorAll('[class*="TableHeaderSticky"]');
32+
if (stickyHeaders.length > 0) {
33+
return Array.from(stickyHeaders).every(header => {
34+
const rect = header.getBoundingClientRect();
35+
// Sticky headers should be in their default position when at top
36+
return rect.top > 0;
37+
});
38+
}
39+
return true; // If no sticky headers found, consider them "hidden"
40+
}, { timeout: 500 });
41+
42+
// Double-check we're at the top
43+
await page.evaluate(() => {
44+
if (window.scrollY !== 0) {
45+
window.scrollTo(0, 0);
46+
}
47+
});
1448
}
1549

1650
test.describe('search by name', () => {

ui/pages/SearchResults.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ const SearchResultsPageContent = () => {
246246

247247
return (
248248
<>
249-
<HeaderMobile/>
249+
<HeaderMobile hideSearchButton/>
250250
<Layout.MainArea>
251251
<Layout.SideBar/>
252252
<Layout.MainColumn>

ui/snippets/searchBar/SearchBarInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const SearchBarInput = (
113113
onBlur={ onBlur }
114114
onClick={ onFormClick }
115115
w="100%"
116-
backgroundColor={ isHeroBanner ? { _light: 'white', _dark: 'black' } : 'transparent' }
116+
backgroundColor={{ base: isHeroBanner ? { _light: 'white', _dark: 'black' } : 'transparent', lg: { _light: 'white', _dark: 'black' } }}
117117
borderRadius="base"
118118
position="relative"
119119
zIndex={ isSuggestOpen ? 'modal' : 'auto' }

0 commit comments

Comments
 (0)