Skip to content

Commit

Permalink
fix: update newProject ref when switching between organizations in Se…
Browse files Browse the repository at this point in the history
…lectCloudProjectModal (#25730)
  • Loading branch information
astone123 authored Feb 7, 2023
1 parent f941005 commit a21de6b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

_Released 02/14/2023 (PENDING)_

**Bugfixes:**

- Fixed an issue with the Cloud project selection modal not showing the correct prompts. Fixes [#25520](https://github.com/cypress-io/cypress/issues/25520).

**Features:**

- Added the "Open in IDE" feature for failed tests reported from the Debug page. Addressed in [#25691](https://github.com/cypress-io/cypress/pull/25691).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ describe('<SelectCloudProjectModal />', () => {
mountDialog()
})

it('can switch between organizations with and without projects', () => {
cy.get('[data-cy="selectOrganization"]').click()
cy.findByRole('listbox').within(() => cy.findAllByText('Test Org 2').click())

cy.contains('button', defaultMessages.runs.connect.modal.selectProject.connectProject).should('not.exist')
cy.contains('button', defaultMessages.runs.connect.modal.selectProject.createProject).should('be.visible')

cy.get('[data-cy="selectOrganization"]').click()
cy.findByRole('listbox').within(() => cy.findAllByText('Test Org 1').click())

cy.contains('button', defaultMessages.runs.connect.modal.selectProject.createProject).should('not.exist')
cy.contains('button', defaultMessages.runs.connect.modal.selectProject.connectProject).should('be.visible')
})

context('create new project', () => {
beforeEach(() => {
cy.contains('a', defaultMessages.runs.connect.modal.selectProject.createNewProject).click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,12 @@ watch(projectOptions, (newVal, oldVal) => {
}
if (newVal.length === 1) {
pickedProject.value = projectOptions.value[0]
pickedProject.value = newVal[0]
} else {
pickedProject.value = projectOptions.value.find((p) => p.name === projectName.value)
pickedProject.value = newVal.find((p) => p.name === projectName.value)
}
newProject.value = newVal.length === 0
}, {
immediate: true,
})
Expand Down

5 comments on commit a21de6b

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a21de6b Feb 7, 2023

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 arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.6.0/linux-arm64/develop-a21de6be08cf6fab19e0d1e96980697e8077e7f8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a21de6b Feb 7, 2023

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.6.0/linux-x64/develop-a21de6be08cf6fab19e0d1e96980697e8077e7f8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a21de6b Feb 7, 2023

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 arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.6.0/darwin-arm64/develop-a21de6be08cf6fab19e0d1e96980697e8077e7f8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a21de6b Feb 7, 2023

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 build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.6.0/darwin-x64/develop-a21de6be08cf6fab19e0d1e96980697e8077e7f8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a21de6b Feb 7, 2023

Choose a reason for hiding this comment

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

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

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.6.0/win32-x64/develop-a21de6be08cf6fab19e0d1e96980697e8077e7f8/cypress.tgz

Please sign in to comment.