diff --git a/cypress/e2e/3-widget/search.cy.js b/cypress/e2e/3-widget/search.cy.js index 0e2e588..e5604f3 100644 --- a/cypress/e2e/3-widget/search.cy.js +++ b/cypress/e2e/3-widget/search.cy.js @@ -10,7 +10,7 @@ import { searchResultContainerSelector, searchResultTitle, suggestionResultSelector, - viewerSelector + viewerSelector, } from '../selectors/widget-selectors'; describe('Search', () => { @@ -21,15 +21,21 @@ describe('Search', () => { }); it('should show suggestions and open preview from it', () => { - cy.get(nucliaSearchBarSelector).shadow().find('.sw-search-input input').type('Lamarr'); + cy.get(nucliaSearchBarSelector).shadow().find('.sw-search-input textarea').type('Lamarr'); cy.get(nucliaSearchBarSelector).shadow().find(suggestionResultSelector).should('have.length', 2); cy.get(nucliaSearchBarSelector).shadow().find(`${suggestionResultSelector}:first-child`).click(); - cy.get(nucliaSearchResultsSelector).shadow().find('.sw-viewer .header-title').should('contain', 'Lamarr Lesson plan.pdf'); + cy.get(nucliaSearchResultsSelector) + .shadow() + .find('.sw-viewer .header-title') + .should('contain', 'Lamarr Lesson plan.pdf'); closeViewer(); }); it('should display results', () => { - cy.get(nucliaSearchBarSelector).shadow().find(searchBarInputSelector).type(`${firstQuestion}\n`, { force: true }); + cy.get(nucliaSearchBarSelector) + .shadow() + .find(searchBarInputSelector) + .type(`${firstQuestion}\n`, { force: true }); cy.get(nucliaSearchResultsSelector) .shadow() .find(`${searchResultContainerSelector} ${searchResultTitle}`, { timeout: 6000 }) @@ -51,4 +57,4 @@ describe('Search', () => { }); }); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/selectors/widget-selectors.js b/cypress/e2e/selectors/widget-selectors.js index a32958f..0d7fb35 100644 --- a/cypress/e2e/selectors/widget-selectors.js +++ b/cypress/e2e/selectors/widget-selectors.js @@ -17,12 +17,12 @@ export const answerContainerSelector = '.answer-text'; export const answerCitationSelector = '.source .number'; export const answerSourceTitleSelector = '.source .result-title'; export const chatContainerSelector = '.sw-chat .chat-container'; -export const chatInputSelector = '.sw-chat-input input'; +export const chatInputSelector = '.sw-chat-input textarea'; export const chatQuestionSelector = '.question'; // Viewer selectors export const viewerSelector = '.sw-viewer'; -export const searchBarInputSelector = '.sw-search-input input'; +export const searchBarInputSelector = '.sw-search-input textarea'; export const findInResourceInputSelector = '.find-bar-container input'; export const closeButton = '.header-actions button[aria-label="generic.close"]';