Added integration test for the search box

This commit is contained in:
Przemek Wiech
2020-04-01 18:41:46 +02:00
parent 2148304ff0
commit ef611be3f3
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
describe('Chart view', () => {
beforeEach(() => {
cy.visit('/view?handleCors=false&url=https%3A%2F%2Fraw.githubusercontent.com%2FPeWu%2Ftopola%2Fmaster%2Fdemo%2Fdata%2Ffamily.ged');
});
it('Search works', () => {
cy.contains('Chike').should('not.exist');
cy.get('#search').type('chik');
cy.contains('Chike');
cy.get('#search').type('{enter}');
cy.get('#content').contains('Chike');
});
});

View File

@@ -349,6 +349,7 @@ export class TopBar extends React.Component<
setValue(value: string): void;
})
}
id="search"
/>
);
}