question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QSelect does not render certain items in test environment

See original GitHub issue

Describe the bug

We’re seeing a problem that when we use QSelect with current Cypress (3.6.1) on both Chrome stable (78) and Canary (80), QSelect’s virtual scrolling does not render all items, which leads to this:

quasar-select 2019-11-15 11-46-52

Codepen/jsFiddle/Codesandbox (required)

I don’t have that, but a full repo that you can clone and check out yourself: https://github.com/rmehner/quasar-select-cypress

To Reproduce

Steps to reproduce the behavior:

  1. Init quasar app (quasar init qselect-demo) with standard options
  2. Add Cypress to app (quasar ext add @quasar/testing-e2e-cypress), say yes to everything
  3. Edit src/pages/Index.vue to look like this:
<template>
  <q-page class="flex flex-center">
    <q-select outlined label="Number" :options="options" />
  </q-page>
</template>

<script>
export default {
  name: "PageIndex",
  data() {
    return {
      options: [...Array(5000).keys()]
    };
  }
};
</script>
  1. Add cypress test test/cypress/integration/home/init.spec.js:
import * as ctx from  '../../../../quasar.conf.js'

describe('Landing', () => {
  beforeEach(() => {
    cy.visit('/')
  })

  it('.should() - select the number', () => {
    cy.get('.q-page')
      .contains('Number')
      .within(() => {
        cy.contains('arrow_drop_down').click()
      })

    cy.get('.q-menu')
      .scrollTo('bottom')
      .contains('4999')
      .click()
  })
})
  1. Remove Chrome:: Hack for shaking AUT from test/cypress/plugins/index.js, as this will break current Cypress versions.
  2. Start server quasar dev
  3. Run npm run test:e2e
  4. Click init.spec.js in the opened browser for Cypress
  5. See that some items are not rendered in the list

Expected behavior

All items should be rendered, just like it normally does in the browser.

Platform (please complete the following information): OS: macOS 10.14.6 (although we’re also seeing this on other machines that run Win10 and Linux) Node: 12.13.0 NPM: 6.11.1 Yarn: - Browsers: Chrome 78 / Chrome 80 iOS: - Android: - Electron: -

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
kamcnallycommented, Feb 14, 2022

I came across this problem using a table with virtual scroll. In the end, I disabled modifyObstructiveCode in the Cypress configuration and the problem was immediately solved.

I’m guessing that something in the virtual scroll code is similar enough to a framebusting technique that Cypress is by default removing it.

0reactions
Nervus86commented, Aug 23, 2021

I have the same problem with quasar 2.0.3, I don’t use @ virtual-scroll, however only the last 20-30 options are rendered.

it works correctly only if virtual-scroll-item-size=“0” is set

Read more comments on GitHub >

github_iconTop Results From Across the Web

Justpy QSelect doesn't display values in dropdown when ...
I'm able to get the dropdown menu to populate and display the values I want using the input event. I can manually select...
Read more >
Default Operator: QSELECT (Quick Select) - Autodesk Forums
Solved: Is there a way to change the default Operator for QSELECT? ... you do not need a complex tool for selecting objects...
Read more >
hg - Mercurial source code management system
How each is rendered depends on the terminal emulator. Some may not be available for a given terminal type, and will be silently...
Read more >
Essential Cluster OS Commands - HKBU
Line 5 is not a resource directive. Instead it specifies how PBS should handle some aspect of this job. (Specifically, the “-j oe”...
Read more >
Fixes integrated in HCL Digital Experience 8.5.0.0, 9.0 and 9.5 ...
DAM WILL NOT DISPLAY IMAGES WITH ANONYMOUS ACCESS SELECTED ... WCM Search issue: Content item list is gathered but documents are not indexed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found