Which kind of test has bike parts to pass to be sold?
There are quite a number of standards that should be adhered to.  The list below comes from the references section of the Bicycle page on Wikipedia

The TC149 ISO bicycle committee, including the TC149/SC1 ("Cycles and major sub-assemblies") subcommittee, has published the following standards:


ISO 4210 Cycles – Safety requirements for bicycles
ISO 6692 Cycles – Marking of cycle components
ISO 6695 Cycles – Pedal axle and crank assembly with square end
fitting – Assembly dimensions
ISO 6696 Cycles – Screw threads used in bottom bracket assemblies
ISO 6697 Cycles – Hubs and freewheels – Assembly dimensions
ISO 6698 Cycles – Screw threads used to assemble freewheels on bicycle hubs
ISO 6699 Cycles – Stem and handlebar bend – Assembly dimensions
ISO 6701 Cycles – External dimensions of spoke nipples
ISO 6742 Cycles – Lighting and retro-reflective devices – Photometric
and physical requirements
ISO 8090 Cycles – Terminology (same as BS 6102-4)
ISO 8098 Cycles – Safety requirements for bicycles for young children
ISO 8488 Cycles – Screw threads used to assemble head fittings on bicycle forks
ISO 8562 Cycles – Stem wedge angle
ISO 10230 Cycles – Splined hub and sprocket – Mating dimensions
ISO 11243 Cycles – Luggage carriers for bicycles – Concepts, classification and testing


Other ISO Technical Committees have published various cycle relevant standards, for example:


ISO 5775 Bicycle tire and rim designations
ISO 9633 Cycle chains – Characteristics and test methods


Published cycle standards from CEN TC333 include:


EN 14764 City and trekking bicycles – Safety requirements and test methods
EN 14765 Bicycles for young children – Safety requirements and test methods
EN 14766 Mountain-bicycles – Safety requirements and test methods
EN 14781 Racing bicycles – Safety requirements and test methods
EN 14782 Bicycles – Accessories for bicycles – Luggage carriers
EN 15496 Cycles – Requirements and test methods for cycle locks


Yet to be approved cycle standards from CEN TC333:


EN 15194 Cycles – Electrically power assisted cycles (EPAC bicycle)
EN 15532 Cycles – Terminology