-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #973 from blockscout/tom2drum/issue-963
search: bug fixes
- Loading branch information
Showing
12 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { LightMode } from '@chakra-ui/react'; | ||
import { test, expect } from '@playwright/experimental-ct-react'; | ||
import React from 'react'; | ||
|
||
import TestApp from 'playwright/TestApp'; | ||
|
||
import SearchBarInput from './SearchBarInput'; | ||
|
||
const props = { | ||
onChange: () => {}, | ||
onSubmit: () => {}, | ||
onClear: () => {}, | ||
value: 'duck duck', | ||
}; | ||
|
||
test('input on regular page +@mobile +@dark-mode', async({ mount, page }) => { | ||
await mount( | ||
<TestApp> | ||
<SearchBarInput { ...props }/> | ||
</TestApp>, | ||
); | ||
const input = page.getByPlaceholder(/search by/i); | ||
|
||
await expect(input).toHaveScreenshot(); | ||
}); | ||
|
||
test('input on home page +@mobile +@dark-mode', async({ mount, page }) => { | ||
await mount( | ||
<TestApp> | ||
<LightMode> | ||
<SearchBarInput { ...props } isHomepage/> | ||
</LightMode> | ||
</TestApp>, | ||
); | ||
const input = page.getByPlaceholder(/search by/i); | ||
|
||
await expect(input).toHaveScreenshot(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.71 KB
...SearchBarInput.pw.tsx_dark-color-mode_input-on-home-page-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.89 KB
...rchBarInput.pw.tsx_dark-color-mode_input-on-regular-page-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.38 KB
...shots__/SearchBarInput.pw.tsx_default_input-on-home-page-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.75 KB
...ts__/SearchBarInput.pw.tsx_default_input-on-regular-page-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.93 KB
...nshots__/SearchBarInput.pw.tsx_mobile_input-on-home-page-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.98 KB
...ots__/SearchBarInput.pw.tsx_mobile_input-on-regular-page-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters