mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 11:12:52 +00:00
feat: dashboard search rework
This commit is contained in:
committed by
Rainer Killinger
parent
dff4a95acc
commit
8c30a47706
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user