* [cypress][s]-setup-integration=with-cypress
* [fix][s]- fix typescript bug 'All files must be modules when the '--isolatedModules' flag is provided' by adding an 'export {}' to all test files
* Fixes of cypress tests
* Use yarn everywhere not npm
Co-authored-by: Abhishek Gahlot <me@abhishek.it>
19 lines
548 B
JavaScript
19 lines
548 B
JavaScript
describe('Test Search Page', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/search');
|
|
});
|
|
|
|
it('has a search form', () => {
|
|
cy.contains('form');
|
|
cy.contains('Search');
|
|
});
|
|
|
|
it('should return a search result', () => {
|
|
cy.get('form').find('[type="text"]').type('world population');
|
|
cy.get('form').submit();
|
|
cy.url().should('include', 'search?q=world%20population&sort=');
|
|
cy.get('.text-3xl').should('have.text', '1 results found');
|
|
cy.get('.text-xl > .text-primary').should('have.text', 'World Population');
|
|
});
|
|
});
|