Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Aug 16, 2021
2 parents 14be5d0 + d2c3ccc commit 98f6718
Show file tree
Hide file tree
Showing 50 changed files with 2,028 additions and 1,029 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.0
14.17.0
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branches:
# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use matching version of Node.js
nodejs_version: "14.16.0"
nodejs_version: "14.17.0"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"chrome:beta": "93.0.4577.18",
"chrome:stable": "92.0.4515.107"
"chrome:beta": "93.0.4577.42",
"chrome:stable": "92.0.4515.131"
}
5 changes: 3 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node14.16.0-chrome90-ff88
- image: cypress/browsers:node14.17.0-chrome91-ff89
# by default, we use "small" to save on CI costs. bump on a per-job basis if needed.
resource_class: small
environment:
Expand All @@ -58,7 +58,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers:node14.16.0-chrome90-ff88
- image: cypress/browsers:node14.17.0-chrome91-ff89
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -1126,6 +1126,7 @@ jobs:

runner-integration-tests-electron:
<<: *defaults
resource_class: medium
parallelism: 2
steps:
- run-runner-integration-tests:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress",
"version": "8.2.0",
"version": "8.3.0",
"description": "Cypress.io end to end testing tool",
"private": true,
"scripts": {
Expand Down Expand Up @@ -196,7 +196,7 @@
"yarn-deduplicate": "3.1.0"
},
"engines": {
"node": ">=14.16.0",
"node": ">=14.17.0",
"yarn": ">=1.17.3"
},
"productName": "Cypress",
Expand Down
109 changes: 88 additions & 21 deletions packages/desktop-gui/cypress/integration/runs_list_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,34 +852,101 @@ describe('Runs List', function () {
})
})

it('displays empty message', () => {
cy.contains('To record your first')
})
context('a/b control group', function () {
beforeEach(function () {
this.getProjectStatus.resolve({
orgId: '0',
})
})

it('opens project id guide on clicking "Why?"', () => {
cy.contains('Why?').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWith('https://on.cypress.io/what-is-a-project-id')
it('displays empty message', () => {
cy.contains('To record your first run')
cy.percySnapshot()
})
})

it('opens dashboard on clicking "Cypress Dashboard"', () => {
cy.contains('Cypress Dashboard').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWith(`https://on.cypress.io/dashboard/projects/${this.config.projectId}/runs`)
it('opens project id guide on clicking "Why?"', () => {
cy.contains('Why?').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWithMatch({ url: 'https://on.cypress.io/what-is-a-project-id' })
})
})
})

it('shows tooltip on hover of copy to clipboard', () => {
cy.get('#code-record-command').find('.action-copy').trigger('mouseover')
cy.get('.cy-tooltip').should('contain', 'Copy to clipboard')
cy.get('#code-record-command').find('.action-copy').trigger('mouseout')
it('opens dashboard on clicking "Cypress Dashboard"', () => {
cy.contains('Cypress Dashboard').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWith(`https://on.cypress.io/dashboard/projects/${this.config.projectId}/runs`)
})
})

it('shows tooltip on hover of copy to clipboard', () => {
cy.get('#code-record-command').find('.action-copy').trigger('mouseover')
cy.get('.cy-tooltip').should('contain', 'Copy to clipboard')
cy.get('#code-record-command').find('.action-copy').trigger('mouseout')
})

it('copies record key command to clipboard', () => {
cy.get('#code-record-command').find('.action-copy').click()
.then(function () {
expect(this.ipc.setClipboardText).to.be.calledWith(`cypress run --record --key <record-key>`)
})
})
})

it('copies record key command to clipboard', () => {
cy.get('#code-record-command').find('.action-copy').click()
.then(function () {
expect(this.ipc.setClipboardText).to.be.calledWith(`cypress run --record --key <record-key>`)
context('a/b test group', function () {
beforeEach(function () {
this.getProjectStatus.resolve({
orgId: '1',
})
})

it('displays empty message', () => {
cy.contains('How to record your first run')
cy.percySnapshot()
})

it('displays tooltip with project id info', () => {
cy.get('.help-text').eq(0).find('a').trigger('mouseover')
cy.get('.cy-tooltip').should('contain', 'This helps Cypress uniquely identify your project')
.contains('Learn more').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWithMatch({ url: 'https://on.cypress.io/what-is-a-project-id' })
})
})

it('displays tooltip with record run command info', () => {
cy.get('.help-text').eq(1).find('a').trigger('mouseover')
cy.get('.cy-tooltip').should('contain', 'Close this application and run this command')
.contains('Learn more').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWithMatch({ url: 'https://on.cypress.io/recording-project-runs' })
})
})

it('shows tooltip on hover of copy to clipboard', () => {
cy.get('#code-record-command').find('.action-copy').trigger('mouseover')
cy.get('.cy-tooltip').should('contain', 'Copy to clipboard')
cy.get('#code-record-command').find('.action-copy').trigger('mouseout')
})

it('copies record key command to clipboard', () => {
cy.get('#code-record-command').find('.action-copy').click()
.then(function () {
expect(this.ipc.setClipboardText).to.be.calledWith(`cypress run --record --key <record-key>`)
})
})

it('displays run in ci panel with link', () => {
cy.contains('Run in CI').parents('.panel').contains('Show me how').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWithMatch({ url: 'https://on.cypress.io/ci' })
})
})

it('displays sample project panel with link', () => {
cy.contains('Sample Project').parents('.panel').contains('See the sample').click()
.then(function () {
expect(this.ipc.externalOpen).to.be.calledWithMatch({ url: 'https://on.cypress.io/rwa-dashboard' })
})
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const onSubmitNewProject = function (orgId) {

it('displays empty runs page', function () {
cy.get('.setup-project').should('not.exist')
cy.contains('To record your first')
cy.contains('How to record your first')
cy.contains('cypress run --record --key record-key-123')
})

Expand Down
6 changes: 6 additions & 0 deletions packages/desktop-gui/src/project/project-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,10 @@ export default class Project {
serialize () {
return _.pick(this, cacheProps)
}

getTestGroup (numGroups) {
const numKey = this.orgId && this.orgId.length ? this.orgId.charCodeAt(0) : 0

return numKey % numGroups
}
}
27 changes: 14 additions & 13 deletions packages/desktop-gui/src/projects/projects-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ const closeProject = (project) => {
])
}

const updateProjectStatus = (project) => {
return ipc.getProjectStatus(project.clientDetails())
.then((projectDetails) => {
project.update(projectDetails)
})
.catch(ipc.isUnauthed, ipc.handleUnauthed)
.catch((err) => {
project.setApiError(err)
})
}

const openProject = (project) => {
specsStore.loading(true)

Expand All @@ -145,17 +156,6 @@ const openProject = (project) => {
project.setError(err)
}

const updateProjectStatus = () => {
return ipc.getProjectStatus(project.clientDetails())
.then((projectDetails) => {
project.update(projectDetails)
})
.catch(ipc.isUnauthed, ipc.handleUnauthed)
.catch((err) => {
project.setApiError(err)
})
}

const updateConfig = (config) => {
project.update({
id: config.projectId,
Expand Down Expand Up @@ -199,9 +199,9 @@ const openProject = (project) => {
project.setLoading(false)
getSpecs(setProjectError)

projectPollingId = setInterval(updateProjectStatus, 10000)
projectPollingId = setInterval(() => updateProjectStatus(project), 10000)

return updateProjectStatus()
return updateProjectStatus(project)
})
.catch(setProjectError)
}
Expand Down Expand Up @@ -242,6 +242,7 @@ const getRecordKeys = () => {

export default {
loadProjects,
updateProjectStatus,
openProject,
reopenProject,
closeProject,
Expand Down
Loading

4 comments on commit 98f6718

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 98f6718 Aug 16, 2021

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/8.3.1/circle-develop-98f67189c61310002eda4537344028e4c15ba21a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 98f6718 Aug 16, 2021

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.

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/8.3.1/appveyor-develop-98f67189c61310002eda4537344028e4c15ba21a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 98f6718 Aug 16, 2021

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.

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/8.3.1/appveyor-develop-98f67189c61310002eda4537344028e4c15ba21a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 98f6718 Aug 16, 2021

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/8.3.1/circle-develop-98f67189c61310002eda4537344028e4c15ba21a/cypress.tgz

Please sign in to comment.