@@ -55,7 +55,7 @@ await test('the quick search has a native GET destination and submits the actual
|
||||
const input = nodes(tree).find(
|
||||
(node) => node.type === 'input' && node.props.name === 'q',
|
||||
);
|
||||
assert.equal(form.props.action, '/oportunidades');
|
||||
assert.equal(form.props.action, '/pesquisa');
|
||||
assert.equal(form.props.method, 'get');
|
||||
assert.equal(input.props.maxLength, 120);
|
||||
input.props.onChange({ target: { value: 'plantio de algodao' } });
|
||||
@@ -80,15 +80,15 @@ await test('the quick search has a native GET destination and submits the actual
|
||||
});
|
||||
assert.equal(prevented, true);
|
||||
assert.deepEqual(sent, {
|
||||
url: '/oportunidades',
|
||||
url: '/pesquisa',
|
||||
data: { q: 'plantio de algodao' },
|
||||
});
|
||||
} finally {
|
||||
globalThis.FormData = original;
|
||||
}
|
||||
const html = renderToStaticMarkup(tree);
|
||||
assert.ok(html.includes('Pesquisa rápida de oportunidades'));
|
||||
assert.ok(html.includes('action="/oportunidades"'));
|
||||
assert.ok(html.includes('Pesquisa rápida no InvesteMoz'));
|
||||
assert.ok(html.includes('action="/pesquisa"'));
|
||||
assert.ok(html.includes('Pesquisar'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user