If your mouse pointer hovers the file list, the main window is focused when the list is being replaced (or simply when it shrinks and your mouse pointer...
...is then outside of the result list). When focusing the main window, the "find file" dialog closes. That would usually be fine, but we don't want to focus the...
var Autofocus = { supported: function() { return 'autofocus' in document.createElement('input'); }, fake: function() { $('[autofocus]').focus(); }, extend: function() { Autofocus.supported() || Autofocus.fake(); } }; $(Autofocus.extend...
...definition that you can use to provoke Selenium focus issues that only occur when two focus-sensitive Selenium scenarios run at the same time (probably with parallel_tests). This can...
...finished its duration. You can CTRL+C out of that. You can now fix your focus-sensitive tests...
Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the browser frame. This will result in flickering tests, which are...
...in your test suite right now, but never noticed. The issue only occurs when two focus-sensitive tests run at the same time. As your test suite accumulates a larger...
...use awesome 3.5, and a gnome or mate panel, the panel will often receive focus when you switch desktops. As a workaround: Add this rule to your rc.lua: { rule = { class...
...Mate-panel" }, properties = { ontop = true, focusable = false } } Replace /usr/share/awesome/lib/awful/autofocus.lua with the attached file
...with Firefox. We recommend using ChromeDriver for your Selenium tests. Firefox will not trigger focus/blur events when its window is not focused. While this makes sense in standard usage, it...
...breaks in parallel test execution. Please do not rely on focus events in your tests. The linked card has an example of how to build passing tests that deal with...
# to individual examples or groups you care about by tagging them with # `:focus` metadata. When nothing is tagged with `:focus`, all examples # get run. config.filter_run_including :focus...
...when_everything_filtered = true ... end Now you can mark a single Example/ExampleGroup with the "focus"-tag so only the tagged spec will be run: describe SomeClass do it 'does great...
...accessible web pages are elements that were made interactive via JavaScript but cannot be focused or activated with anything but the mouse. ❌ Bad example Let's take a look at...
...queryInput.focus() } up.on('click', resetQuery) }) The Clear search button has three issues: It cannot be focused with the keyboard It cannot be pressed with the keyboard A screen reader will not...
...design, and repeatedly pressing the tab key. It highlights interactive elements on focus (e.g. through :focus-visible). Interactive elements without a text label have an aria-label. uses Semantic HTML...
...require unnecessary steps (e.g. when pressing a "search" icon, shows the search field already focused) adheres to common conventions (e.g. backdrop click closes an overlay) is correctly localized (if applicable...
...of the differences: disabled fields don’t post to the server don’t get focus are skipped while tab navigation available for button, fieldset, input, select, textarea, command, keygen, optgroup...
...any JavaScript events at a fieldset[disabled] readonly fields post to the server get focus are included while tab navigation only available for input[type=text], textarea Related cards
...entire test suite is run. There are many causes for flaky tests. This card focuses on a specific class of feature with heavy side effects, mostly on on the UI...
...loading state while requests are loading. If you cannot implement this for every interaction, focus on slow-loading links and forms. Use Responsive Images to give each user only the...
...text. Press Escape for next field. Press Ctrl+S to save entry Example output: Focus mode makandra dev - Memory usage - 59.9 MB page tab...
...back to the previous view, e.g. close a file SHIFT + q: Exit TAB: Switch focus between views, e.g. the commits list and the commit diff Other features Path-based access...
...change values when you scroll the mouse wheel while your mouse pointer hovers the (focused) input. This is terrible. Nobody wants that. Users will change values by accident when trying...
...Firefox) will increment/decrement a number when using the mouse's scroll wheel // above a focused number input. Since this can lead to users changing values by accident, we want to...
Capybara gives you two different methods for executing Javascript: page.evaluate_script("$('input').focus()") page.execute_script("$('input').focus()") While you can use both, the first line (with evaluate_script) might freeze...
...can even chain multiple prompts for different locations using this pattern. Rule of Thumb: Focus on What You Want to Achieve Rather Than How to Achieve It
...polyglot leaderboard tests models across multiple languages on challenging problems, ensuring reliable evaluation. By focusing on real-world editing skills, it helps to pick models that improve efficiency and reduce...
...document.body, 'div[up-target=page]', style: { color: 'red' }) Non-standard pseudo-classes Like "input:focus", "div:visible", ".form-group:has(.email)". Instead filter results of querySelectorAll() in JavaScript. up.element supports...
Capybara allows you to filter elements that are focused. page.find(:fillable_field, focused: true) # Filtering only fillable inputs for performance reasons page.find(:xpath, '//*', focused: true) # Filter all fields Legacy approach...
...In older version, it was possible to use the :focus pseudo-class. This seems not to work in newer versions anymore.
...numbers work as well: :30:36:68). Another is to tag the example with focus: true or to run the example by matching its name. In this card I'd...
...and out smoothly. Yet, opacity only hides visually, not technically: the element is still focusable and visible to screen readers. So, how can we fade an element while maintaining accessibility...
...transition is over. Thanks to visibility, the hidden element is truly hidden and neither focusable nor visible to screen readers. Alternatives If you're starting your transition from JavaScript, you...
...which allows us to worry less about the details happening in the browser and focus more on user centric tests instead! Some of the time you will find a necessity...
Since the rspec documentation on testing cookies is rather sparse and only focuses on controller specs, which recommended usage have been limited since Rails 5+ (see "Rails: Support...
...as digging deeply into CarrierWave code is very fun... Whitelists and blacklists The following focuses on extension allowlisting, but it is the exact same thing for content type allowlisting with...