Skip to content

Commit

Permalink
fix(SILVA-591): removing timber mark from quick search (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj authored Dec 19, 2024
1 parent a90f2ee commit 28c07d3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
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

0 comments on commit 28c07d3

Please sign in to comment.