Add end-to-end test use JavaScript