Skip to content

Commit

Permalink
Fix search height (#18)
Browse files Browse the repository at this point in the history
* Remove a space that is the problem

* Move search box outside of dropdown

* Unrelated for release-it: make tags and releases format as before

* Run and pass tests (visual difference now in Percy)

* Remove dead code

* standard
  • Loading branch information
kevinashworth authored Dec 24, 2020
1 parent d5a6d6e commit 4fae9fe
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"git": {
"commitMessage": "${version}"
},
"github": {
"release": true,
"releaseName": "${version}",
"tokenRef": "RELEASE_IT_GITHUB_TOKEN"
},
"npm": {
Expand Down
6 changes: 3 additions & 3 deletions packages/octave/lib/components/common/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Configure, connectHits, connectPoweredBy, connectSearchBox, connectStat
// eslint-disable-next-line react/display-name
const CustomToggle = forwardRef(({ children }, ref) => (
<span ref={ref}>
{children} &nbsp;
{children}
</span>
))

Expand Down Expand Up @@ -124,8 +124,8 @@ const Algolia = () => {
</>
)}
</Media>
<Dropdown show={show} drop='right' onToggle={toggle}>
<CustomSearchBox />
<CustomSearchBox />
<Dropdown show={true} drop='right' onToggle={toggle}>
<CustomSearchResults />
</Dropdown>
</InstantSearch>
Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/fixtures/Triad.gz
Git LFS file not shown
4 changes: 3 additions & 1 deletion tests/cypress/integration/1-ui/5-markdown.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ describe('Markdown', () => {
cy.get('[data-cy=pastproject-header]', { log: false }).contains(pastproject.projectTitle)

// set flag on the window for assertion below
cy.window().then(w => w.beforeReload = true)
cy.window().then((win) => {
win.beforeReload = true
})

// assert prepared links in "Production Notes:"
cy.get('#past_projects_single_tabs-tabpane-main').within(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ describe('Projects Create', () => {
cy.getTestingCollection('contacts')
cy.getTestingCollection('offices')
cy.getTestingCollection('projects')
cy.getTestingCollection('pastprojects')
})

beforeEach(() => {
Cypress.Cookies.preserveOnce('meteor_login_token')
cy.fixture('output/callback-testing/testing-contacts.json').as('testingContacts')
cy.fixture('output/callback-testing/testing-offices.json').as('testingOffices')
cy.fixture('output/callback-testing/testing-projects.json').as('testingProjects')
cy.fixture('output/callback-testing/testing-pastprojects.json').as('testingPastprojects')
cy.fixture('callback-testing.json').as('items')
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ describe('Projects Delete', () => {
Cypress.LocalStorage.clear = doNotClearLocalStorage
cy.readyForCypress()
cy.resetTriad()
// cy.stubAlgolia()
cy.login()
cy.getTestingCollection('contacts')
cy.getTestingCollection('offices')
cy.getTestingCollection('projects')
// cy.getTestingCollection('pastprojects')
})

beforeEach(() => {
Cypress.Cookies.preserveOnce('meteor_login_token')
cy.fixture('output/callback-testing/testing-contacts.json').as('testingContacts')
cy.fixture('output/callback-testing/testing-offices.json').as('testingOffices')
cy.fixture('output/callback-testing/testing-projects.json').as('testingProjects')
// cy.fixture('output/callback-testing/testing-pastprojects.json').as('testingPastprojects')
})

it('delete a project', function () {
Expand Down Expand Up @@ -68,6 +65,7 @@ describe('Projects Delete', () => {
cy.get('[data-cy=project-header]', { log: false }).contains(project.projectTitle)
cy.toggleSidebar()
cy.enterAlgoliaSearch(project.projectTitle)
cy.percySnapshot('Algolia Search Results')
cy.get('[data-cy=search-result]').should('have.length', 1)

// delete the project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ describe('Projects Update', () => {
cy.getTestingCollection('contacts')
cy.getTestingCollection('offices')
cy.getTestingCollection('projects')
cy.getTestingCollection('pastprojects')
})

beforeEach(() => {
Cypress.Cookies.preserveOnce('meteor_login_token')
cy.fixture('output/callback-testing/testing-contacts.json').as('testingContacts')
cy.fixture('output/callback-testing/testing-offices.json').as('testingOffices')
cy.fixture('output/callback-testing/testing-projects.json').as('testingProjects')
cy.fixture('output/callback-testing/testing-pastprojects.json').as('testingPastprojects')
})

it('reorder the contacts and offices on a 2-contact-2-office project', function () {
Expand Down

0 comments on commit 4fae9fe

Please sign in to comment.