Skip to content

Commit

Permalink
fix: don't display run passing status if Cloud org is over run limit (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
astone123 authored Apr 19, 2023
1 parent c0b37ff commit 4963893
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _Released 04/25/2023 (PENDING)_
**Bugfixes:**

- Fixed an issue where setting `videoCompression` to `0` would cause the video output to be broken. `0` is now treated as false. Addresses [#5191](https://github.com/cypress-io/cypress/issues/5191) and [#24595](https://github.com/cypress-io/cypress/issues/24595).
- Fixed an issue on the [Debug page](https://on.cypress.io/debug-page) where the passing run status would appear even if the Cypress Cloud organization was over its monthly test result limit. Addresses [#26528](https://github.com/cypress-io/cypress/issues/26528).

## 12.10.0

Expand Down
14 changes: 12 additions & 2 deletions packages/app/src/debug/DebugContainer.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,28 @@ describe('<DebugContainer />', () => {
it('handled usage exceeded', () => {
mountTestRun('overLimit')

cy.findByRole('link', { name: 'Contact admin' }).should('have.attr', 'href', 'http://localhost:3000?utmMedium=Debug+Tab&utmSource=Binary%3A+Launchpad')
cy.findByRole('link', { name: 'Contact admin' }).should('be.visible').should('have.attr', 'href', 'http://localhost:3000?utmMedium=Debug+Tab&utmSource=Binary%3A+Launchpad')

cy.percySnapshot()
})

it('handles retention exceeded', () => {
mountTestRun('overLimitRetention')

cy.findByRole('link', { name: 'Contact admin' }).should('have.attr', 'href', 'http://localhost:3000?utmMedium=Debug+Tab&utmSource=Binary%3A+Launchpad')
cy.findByRole('link', { name: 'Contact admin' }).should('be.visible').should('have.attr', 'href', 'http://localhost:3000?utmMedium=Debug+Tab&utmSource=Binary%3A+Launchpad')

cy.percySnapshot()
})

it('does not show passing message if run is hidden', () => {
mountTestRun('overLimitPassed')

cy.contains('Well Done!').should('not.exist')

cy.contains('All your tests passed.').should('not.exist')

cy.findByRole('link', { name: 'Contact admin' }).should('be.visible').should('have.attr', 'href', 'http://localhost:3000?utmMedium=Debug+Tab&utmSource=Binary%3A+Launchpad')
})
})

context('cancelled', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/debug/DebugPageDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
v-if="['PASSED', 'OVERLIMIT'].includes(status) || isHidden"
class="flex flex-col flex-grow w-full p-12 justify-center items-center align-middle "
>
<DebugPassed v-if="status === 'PASSED'" />
<DebugPassed v-if="status === 'PASSED' && !isHidden" />
<DebugOverLimit
v-if="isHidden"
:over-limit-reasons="reasonsRunIsHidden"
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/test/stubCloudTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ export const CloudRunStubs = {
timedOutWithoutCi: createCloudRun({ status: 'TIMEDOUT', specs: skippedSpecs }),
overLimit: createCloudRun({ status: 'OVERLIMIT', overLimitActionType: 'CONTACT_ADMIN', overLimitActionUrl: 'http://localhost:3000', isHidden: true, reasonsRunIsHidden: [{ __typename: 'UsageLimitExceeded', monthlyTests: 100 }] }),
overLimitRetention: createCloudRun({ status: 'OVERLIMIT', overLimitActionType: 'CONTACT_ADMIN', overLimitActionUrl: 'http://localhost:3000', isHidden: true, reasonsRunIsHidden: [{ __typename: 'DataRetentionLimitExceeded', dataRetentionDays: 10 }] }),
overLimitPassed: createCloudRun({ status: 'PASSED', overLimitActionType: 'CONTACT_ADMIN', overLimitActionUrl: 'http://localhost:3000', isHidden: true, reasonsRunIsHidden: [{ __typename: 'UsageLimitExceeded', monthlyTests: 100 }] }),
cancelled: createCloudRun({ status: 'CANCELLED', cancelledAt: '2019-01-25T02:00:00.000Z', specs: skippedSpecs, cancelledBy: { id: '123', fullName: 'Test Tester', email: '[email protected]', __typename: 'CloudUser', userIsViewer: true } }),
} as Record<string, Required<CloudRun>>

Expand Down

4 comments on commit 4963893

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4963893 Apr 19, 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.11.0/linux-arm64/develop-4963893ac5738d8a0e447c0a624639a21ae7a072/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4963893 Apr 19, 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.11.0/linux-x64/develop-4963893ac5738d8a0e447c0a624639a21ae7a072/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4963893 Apr 19, 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.11.0/darwin-x64/develop-4963893ac5738d8a0e447c0a624639a21ae7a072/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4963893 Apr 19, 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.11.0/darwin-arm64/develop-4963893ac5738d8a0e447c0a624639a21ae7a072/cypress.tgz

Please sign in to comment.