diff --git a/components/SearchInput.vue b/components/SearchInput.vue new file mode 100644 index 000000000..b3c2b161b --- /dev/null +++ b/components/SearchInput.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/cypress/integration/06.Search.feature b/cypress/integration/06.Search.feature index 16078ede3..a3fc69dae 100644 --- a/cypress/integration/06.Search.feature +++ b/cypress/integration/06.Search.feature @@ -10,5 +10,5 @@ Feature: Search Scenario: Search for specific words Given I am logged in as "user" - And I search for a specific word - Then I should posts with that word included + When I search for a specific word + Then I should see posts with that word included diff --git a/cypress/integration/common/search.js b/cypress/integration/common/search.js new file mode 100644 index 000000000..af46becf0 --- /dev/null +++ b/cypress/integration/common/search.js @@ -0,0 +1,11 @@ +import { When, Then } from 'cypress-cucumber-preprocessor/steps' + +When('I search for a specific word', () => { + cy.get('#nav-search').type('Essays') +}) + +Then('I should see posts with that word included', () => { + cy.get('.ds-card-header:first').then(() => { + cy.title().should('include', 'Essays') + }) +}) diff --git a/layouts/default.vue b/layouts/default.vue index 7283bf308..4e33a1755 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -10,6 +10,9 @@ +