feat: dashboard search rework

This commit is contained in:
Thea Schöbl
2023-03-10 15:46:59 +00:00
committed by Rainer Killinger
parent dff4a95acc
commit 8c30a47706
40 changed files with 375 additions and 781 deletions

View File

@@ -168,25 +168,13 @@ describe('dashboard', async function () {
// });
describe('search section', function () {
it('should lead to the search when hitting enter', function () {
it('should go to search', function () {
cy.visit('/overview');
cy.get('stapps-search-section')
.find('.searchbar')
.type('test', {scrollBehavior: false})
.type('{enter}', {scrollBehavior: false});
cy.url().should('eq', Cypress.config().baseUrl + '/search?query=test');
cy.get('ion-searchbar').should('have.value', 'test');
cy.get('stapps-data-list-item').should('have.length.greaterThan', 0);
});
it('should go to search when clicking the icon', function () {
cy.visit('/overview');
cy.get('stapps-search-section').find('ion-icon[name=search]').click({force: true});
cy.url().should('eq', Cypress.config().baseUrl + '/search?query=');
cy.get('ion-searchbar').click({scrollBehavior: 'center'});
cy.url().should('eq', Cypress.config().baseUrl + '/search');
cy.get('ion-searchbar').should('not.have.value');
cy.get('ion-searchbar input.searchbar-input').should('have.focus');
cy.get('stapps-data-list-item').should('have.length', 0);
});