fix(mail): search every owned job
Replace ineffective pageSize=100 selectors with a bounded owner-filtered search endpoint for composing and moving linked threads.
This commit is contained in:
@@ -51,28 +51,20 @@ describe("correspondence Gmail import", () => {
|
||||
correspondenceMessages = [];
|
||||
|
||||
mockedApi.get.mockImplementation((url: string, config?: any) => {
|
||||
if (url === "/jobapplications") {
|
||||
if (url === "/jobapplications/choices") {
|
||||
return Promise.resolve({
|
||||
data: {
|
||||
items: [
|
||||
data: [
|
||||
{
|
||||
id: 42,
|
||||
jobTitle: "Backend Developer",
|
||||
status: "Applied",
|
||||
dateApplied: new Date().toISOString(),
|
||||
daysSince: 3,
|
||||
company: { name: "Acme", recruiterEmail: "maria@acme.test", recruiterName: "Maria Recruiter" },
|
||||
companyName: "Acme",
|
||||
},
|
||||
{
|
||||
id: 77,
|
||||
jobTitle: "Platform Engineer",
|
||||
status: "Applied",
|
||||
dateApplied: new Date().toISOString(),
|
||||
daysSince: 1,
|
||||
company: { name: "Beta" },
|
||||
companyName: "Beta",
|
||||
},
|
||||
],
|
||||
},
|
||||
} as any);
|
||||
}
|
||||
if (url === "/jobapplications/42") {
|
||||
@@ -377,7 +369,7 @@ describe("correspondence Gmail import", () => {
|
||||
renderDialog();
|
||||
|
||||
fireEvent.click(await screen.findByRole("button", { name: /manage thread-1/i }));
|
||||
fireEvent.mouseDown((await screen.findAllByRole("combobox")).slice(-1)[0]);
|
||||
fireEvent.mouseDown(await screen.findByRole("combobox", { name: /move to job/i }));
|
||||
fireEvent.click(await screen.findByRole("option", { name: /beta • platform engineer/i }));
|
||||
fireEvent.click(screen.getByRole("button", { name: /move thread/i }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user