You can test if a computer's hardware is compatible with Ubuntu by downloading the Ubuntu Live DVD iso file and booting the live DVD or live USB. The Ubuntu live USB runs faster than the live DVD and has the additional advantage of being reusable for something else after you are finished testing and/or installing Ubuntu with it.
A live DVD/USB can be used for a quick demo or test of Ubuntu to check if the computer's hardware works as expected without making any changes to the machine. Windows or whatever is already installed on the computer is unaffected after trying this and then rebooting. See this answer for detailed and specific information about how to create a bootable USB flash drive for testing potential PC purchases for compatibility with Ubuntu.
Many computer stores provide their own Ubuntu live USB with Ubuntu for testing Ubuntu as a service to their customers. I discovered this after trying to return a graphics card that wouldn't boot Ubuntu, when a technician plugged the graphics card into one of the store's computers and booted Ubuntu from that computer to show me that my new graphics card was compatible with Ubuntu. If the computer store won't let you test their laptop with your Ubuntu live media, ask if they have their own USB with Ubuntu, and will demonstrate Ubuntu with it on the computer of your choice.
A quick demo can test two things:
- Check if hardware (Ethernet, USB, sound, webcam) works as expected.
- Check the look and feel of the operating system.
Wifi cannot always be tested with a quick demo. Even if the laptop doesn't connect to wifi in the store, it might still work after installing the driver for the wireless adapter.