Skip to content

Commit

Permalink
Fix extra spacing below project nav (#7024)
Browse files Browse the repository at this point in the history
* Fix extra spacing in project nav

* Add a snapshot test to ensure nav styling is not mistakenly changed in future

* update yarn.lock

* improve nav css

- use flexbox to make nav respond better to different heights instead of using magic number
- ensure browsers have same heights so changing them doesn't change height of navbar and doesn't cause icons/text to shift

Co-authored-by: Chris Breiding <[email protected]>
Co-authored-by: Chris Breiding <[email protected]>
  • Loading branch information
3 people authored Apr 17, 2020
1 parent de58acb commit ae5ae1f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
19 changes: 11 additions & 8 deletions packages/desktop-gui/cypress/integration/project_nav_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,22 @@ describe('Project Nav', function () {
cy.get('.navbar-default')
})

it('displays \'Tests\' nav as active', () => {
it('displays "Tests" nav as active', () => {
cy.get('.navbar-default').contains('a', 'Tests')
.should('have.class', 'active')
})

describe('when project loads', function () {
beforeEach(() => {
cy.wait(600)
})
it('displays "Tests" page when project loads', () => {
cy.contains('integration')
cy.get('.list-as-table').should('be.visible')
cy.percySnapshot()
})

it('displays \'Tests\' page', () => {
cy.contains('integration')
})
it('displays "Tests" page when switching to a beta browser', () => {
cy.get('.browsers .dropdown-chosen').click()
cy.contains('.browsers', 'beta').first().click()
cy.get('.list-as-table').should('be.visible')
cy.percySnapshot()
})

describe('runs page', function () {
Expand Down
26 changes: 19 additions & 7 deletions packages/desktop-gui/src/app/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,21 @@
i {
font-size: 11px;
color: #555;
margin-right: 5px;
}
}

> li {
display: flex;

> div,
> a {
font-size: 13px;
align-items: center;
color: #444;
padding: 1px 20px 0 20px;
line-height: 40px;
display: flex;
font-size: 13px;
justify-content: center;
padding: 0 20px;
}

> a {
Expand Down Expand Up @@ -178,14 +183,17 @@
}

.dropdown-chosen {
border-radius: 4px;
background: #f6f6f6;
border: 1px solid #c7c7c7;
line-height: 28px !important;
background-color: #f6f6f6;
border-radius: 4px;
display: flex;
height: 34px;
justify-content: center;

img {
margin-right: 5px;
position: relative;
top: -1px;
top: 1px;
}

&.disabled,
Expand All @@ -194,6 +202,10 @@
}
}

.dropdown-toggle {
margin-left: 4px;
}

.fa-check-circle, .fa-sync-alt {
margin-right: 3px;
}
Expand Down

4 comments on commit ae5ae1f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ae5ae1f Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/linux-x64/circle-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-303024/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/circle-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-303007/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ae5ae1f Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/win32-ia32/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/4.4.1/win32-ia32/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/win32-ia32/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/win32-ia32/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ae5ae1f Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/win32-x64/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/4.4.1/win32-x64/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/win32-x64/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/win32-x64/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.zip npm install https://cdn.cypress.io/beta/npm/4.4.1/appveyor-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-32251996/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on ae5ae1f Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.4.1/darwin-x64/circle-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-303030/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.4.1/circle-develop-ae5ae1f9e15095643e014084e50bb4cf3c3d749b-303029/cypress.tgz

Please sign in to comment.