Skip to content

Commit

Permalink
Merge branch 'develop' into zachw/issue-22525
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJW34 authored Jul 15, 2022
2 parents e93e9f8 + 6d03596 commit 0cb8f89
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2941,7 +2941,7 @@ declare namespace Cypress {
/**
* Hosts mappings to IP addresses.
*/
hosts: null | string[]
hosts: null | {[key: string]: string}
/**
* Whether Cypress was launched via 'cypress open' (interactive mode)
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/specs/SpecsListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
data-cy="new-spec-button"
:prefix-icon="IconAdd"
prefix-icon-class="justify-center text-lg text-center icon-light-transparent icon-dark-white"
class="min-w-127px"
class="min-w-134px"
size="lg"
@click="emit('showCreateSpecModal')"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/specs/SpecsListRowItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div>
<slot name="latest-runs" />
</div>
<div class="invisible md:col-span-2 md:visible">
<div class="hidden md:col-span-2 md:block">
<slot name="average-duration" />
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,44 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
})
})

context('responsive design', () => {
beforeEach(() => {
cy.mountFragment(HeaderBar_HeaderBarContentFragmentDoc, {
onResult: (result) => {
result.currentProject = null
},
render: (gqlVal) => (
<div class="border-current border-1 h-700px resize overflow-auto">
<HeaderBarContent gql={gqlVal} />
</div>
),
})
})

// https://github.com/cypress-io/cypress/issues/21842
it('shows docs menu correctly on small viewports', () => {
// Simulate the small viewport.
cy.viewport(767, 800)

// show docs menu
cy.contains('button', text.docsMenu.docsHeading).click()

// docs menu flex direction is column when viewport width is small
cy.findByTestId('docs-menu-container').should('have.css', 'flex-direction', 'column')
})

it('shows docs menu correctly on wider viewports', () => {
// Change the viewport size to wide.
cy.viewport(768, 800)

// show docs menu
cy.contains('button', text.docsMenu.docsHeading).click()

// docs menu flex direction is row when viewport width is big enough.
cy.findByTestId('docs-menu-container').should('have.css', 'flex-direction', 'row')
})
})

it('does not show hint when on latest version of Cypress', () => {
mountFragmentWithData({
versions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
</template>
<div
v-if="docsMenuVariant === 'main'"
class="flex p-16px gap-24px"
data-cy="docs-menu-container"
class="flex p-16px gap-24px flex-col md:flex-row"
>
<DocsMenuContent
:current-project-exists="!!props.gql?.currentProject"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ describe('Launchpad: Error System Tests', () => {
})

it(`clears the error correctly after first 'try again' attempt`, () => {
cy.intercept('mutation-Main_ResetErrorsAndLoadConfig').as('resetErrorsAndLoadConfig')
cy.scaffoldProject('config-with-ts-syntax-error')
cy.openProject('config-with-ts-syntax-error')
cy.visitLaunchpad()
Expand All @@ -166,6 +167,8 @@ describe('Launchpad: Error System Tests', () => {
// Try again while the config is still invalid
cy.findByRole('button', { name: 'Try again' }).click()

cy.wait('@resetErrorsAndLoadConfig')

// Wait until config error is on screen again
cy.contains('h1', cy.i18n.launchpadErrors.generic.configErrorTitle)

Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/server-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export abstract class ServerBase<TSocket extends SocketE2E | SocketCt> {
return io
}

createHosts (hosts: string[] | null = []) {
createHosts (hosts: {[key: string]: string} | null = {}) {
return _.each(hosts, (ip, host) => {
return evilDns.add(host, ip)
})
Expand Down

2 comments on commit 0cb8f89

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0cb8f89 Jul 15, 2022

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.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/linux-x64/zachw/issue-22525-0cb8f895934845abb6d6006b21a59ee3aefdb3d5/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0cb8f89 Jul 15, 2022

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.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/darwin-x64/zachw/issue-22525-0cb8f895934845abb6d6006b21a59ee3aefdb3d5/cypress.tgz

Please sign in to comment.