Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SILVA-591): removing timber mark from quick search #538

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ LEFT JOIN THE.STOCKING_MILESTONE smfg ON (smfg.STOCKING_STANDARD_UNIT_ID = ssu.S
AND o.OPENING_ID = TO_NUMBER(:#{#filter.mainSearchTerm})
) OR (
o.OPENING_NUMBER = :#{#filter.mainSearchTerm} OR
cboa.TIMBER_MARK = :#{#filter.mainSearchTerm} OR
cboa.FOREST_FILE_ID = :#{#filter.mainSearchTerm}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("OpeningsSearchBar", () => {

// Check if the search input field is present with the correct placeholder text
const searchInput = screen.getByPlaceholderText(
"Search by opening ID, opening number, timber mark or file ID"
"Search by opening ID, opening number or file ID"
);
expect(searchInput).toBeInTheDocument();
});
Expand Down Expand Up @@ -159,7 +159,7 @@ describe("OpeningsSearchBar", () => {

// Check if the search input field is present with the correct placeholder text
const searchInput = screen.getByPlaceholderText(
"Search by opening ID, opening number, timber mark or file ID"
"Search by opening ID, opening number or file ID"
);
await act(async () => await userEvent.type(searchInput, 'tfl47'));
await act(async () => await userEvent.keyboard('{enter}'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('OpeningSearchTab', () => {
</QueryClientProvider>
</BrowserRouter>
);
expect(screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID')).toBeInTheDocument();
expect(screen.getByPlaceholderText('Search by opening ID, opening number or file ID')).toBeInTheDocument();
});

it('should display search results when search is performed', async () => {
Expand All @@ -111,7 +111,7 @@ describe('OpeningSearchTab', () => {
</QueryClientProvider>
</BrowserRouter>
);
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID') as HTMLInputElement;
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number or file ID') as HTMLInputElement;
await act(async () => userEvent.type(searchInput, 'test'));
await act(async () => (await screen.findByTestId('search-button')).click());
await act(async () => await screen.findByText('Actions'));
Expand All @@ -133,7 +133,7 @@ describe('OpeningSearchTab', () => {
</QueryClientProvider>
</BrowserRouter>
);
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID');
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number or file ID');
await act(async () => await userEvent.type(searchInput, 'potato'));
await act(async () => (await screen.findByTestId('search-button')).click());
expect(screen.getByText('Results not found')).toBeInTheDocument();
Expand All @@ -155,7 +155,7 @@ describe('OpeningSearchTab', () => {
</QueryClientProvider>
</BrowserRouter>
));
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID');
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number or file ID');
await act(async () => await userEvent.type(searchInput, 'test'));
await act(async () => (await screen.findByTestId('search-button')).click());
await act(async () => await screen.findByText('Actions'));
Expand All @@ -182,7 +182,7 @@ describe('OpeningSearchTab', () => {
</BrowserRouter>
)));

const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID');
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number or file ID');
await act(async () => await userEvent.type(searchInput, 'test'));
await act(async () => (await screen.findByTestId('search-button')).click());
await act(async () => await screen.findByText('Actions'));
Expand Down Expand Up @@ -211,7 +211,7 @@ describe('OpeningSearchTab', () => {
</QueryClientProvider>
</BrowserRouter>
));
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID');
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number or file ID');
await act(async () => await userEvent.type(searchInput, 'test'));
await act(async () => (await screen.findByTestId('search-button')).click());
await act(async () => await screen.findByText('Actions'));
Expand All @@ -238,7 +238,7 @@ describe('OpeningSearchTab', () => {
</BrowserRouter>
)));

const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number, timber mark or file ID');
const searchInput = screen.getByPlaceholderText('Search by opening ID, opening number or file ID');
await act(async () => await userEvent.type(searchInput, 'test'));
await act(async () => (await screen.findByTestId('search-button')).click());
await act(async () => await screen.findByText('Actions'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const OpeningsSearchBar: React.FC<IOpeningsSearchBar> = ({
<InlineNotification
className="mw-100 w-100"
title="Missing at least one criteria to search"
subtitle="Please, start searching for an opening ID, opening number, timber mark, file ID or apply advanced search criteria"
subtitle="Please, start searching for an opening ID, opening number, file ID or apply advanced search criteria"
lowContrast={true} />
</Column>
</Row>
Expand All @@ -75,7 +75,7 @@ const OpeningsSearchBar: React.FC<IOpeningsSearchBar> = ({
<Column lg={8} xl={6} max={10} className="p-0 mb-2 mb-lg-0">
<Search
size="md"
placeholder="Search by opening ID, opening number, timber mark or file ID"
placeholder="Search by opening ID, opening number or file ID"
labelText="Search"
closeButtonLabelText="Clear search input"
id={`search-1`}
Expand Down
Loading