Skip to content

Commit

Permalink
fix component tests [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
astone123 committed Dec 14, 2022
1 parent 6b4aca5 commit aeb7803
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions packages/app/src/specs/generators/ExpandableFileChooser.cy.tsx
@@ -1,6 +1,5 @@
import ExpandableFileChooser from './ExpandableFileChooser.vue'

import { ref } from 'vue'
import { defaultMessages } from '@cy/i18n'
import data from '../../../cypress/fixtures/FileChooser.json'
import type { FileParts } from '@packages/data-context/src/gen/graphcache-config.gen'
Expand Down Expand Up @@ -29,9 +28,6 @@ const fileMatchIndicatorSelector = '[data-cy=file-match-indicator]'
const noResultsSelector = '[data-testid=no-results]'
const noResultsClearButtonSelector = '[data-cy=no-results-clear]'

// Loading
const loadingSelector = '[data-testid=loading]'

describe('<ExpandableFileChooser />', () => {
it('renders files in a list', () => {
cy.mount(() => (<ExpandableFileChooser extensionPattern={extensionPattern} files={allFiles} />))
Expand Down Expand Up @@ -179,30 +175,6 @@ describe('<ExpandableFileChooser />', () => {
})
})

describe('loading', () => {
it('is not loading by default', () => {
cy.mount(() => (<ExpandableFileChooser
extensionPattern={extensionPattern}
files={[]} />))
.get(loadingSelector).should('not.be.visible')
})

it('toggles a reactive loading indicator', () => {
// Use a button to toggle "loading" state externally
const loading = ref(true)
const buttonSelector = '[data-testid=toggle-button]'

cy.mount(() => (<div>
<button data-testid="toggle-button" onClick={() => loading.value = !loading.value}>Toggle Loading</button>
<ExpandableFileChooser files={allFiles} loading={loading.value} extensionPattern={extensionPattern} /></div>))
.get(loadingSelector).should('be.visible')
.get(buttonSelector).click()
.get(loadingSelector).should('not.be.visible')
.get(buttonSelector).click()
.get(loadingSelector).should('be.visible')
})
})

it('debounces the file extension input event', () => {
const onUpdateExtensionSpy = cy.spy().as('onUpdateExtensionSpy')
const spies = {
Expand Down

4 comments on commit aeb7803

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on aeb7803 Dec 14, 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 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.2.0/linux-arm64/feature/create-from-react-component-aeb7803eb984fbd262ca2bae8d86883a594a3498/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on aeb7803 Dec 14, 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 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.2.0/linux-x64/feature/create-from-react-component-aeb7803eb984fbd262ca2bae8d86883a594a3498/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on aeb7803 Dec 14, 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 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.2.0/darwin-x64/feature/create-from-react-component-aeb7803eb984fbd262ca2bae8d86883a594a3498/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on aeb7803 Dec 14, 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 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.2.0/darwin-arm64/feature/create-from-react-component-aeb7803eb984fbd262ca2bae8d86883a594a3498/cypress.tgz

Please sign in to comment.