Skip to main content

Posts

Laravel Dusk Tip: Click Bootstrap Toggle

We use BootStrap Toggle extensiverly at work. The problem with writing a browser test to toggle is that, the checkbox item that we use in the html template is never visible as it bootstrap toggle renders it as a button. I find writing a clean simple macro to solve the issue: Browser::macro('clickToggle', function($inputSelector) { $this->ensurejQueryIsAvailable(); $this->driver->executeScript("jQuery(\"{$inputSelector}\").parent().click();"); return $this; }); Once you define this macro using it is simple: $this->browse(function (Browser $browser) { $browser->login() ->visit(new MyPage()) ->clickToggle('#mycheckbox'); });

The Fedora XFCE Tweaks Guide

One of the strongest arguments you can make for using GNU/Linux is the flexibility it provides for customization. You can tweak it as per your taste. Of course sometimes the extent of efforts required to do that may not be feasible for everyone. Its a double edged sword though. It can be very confusing to choose from the alternatives and decide on what's good for you. Generally people may not like everything what they get as default settings or face very minor but irritating issues with no immediate remedy. Sometimes issues crop up with time. There are many articles like Things to Do After Installing Fedora or Ubuntu or GNOME or XFCE which list various customizing tips. However, they discuss very specific stuff and scattered. I needed to refer many articles, wikis and documentation to find out solutions. I always wanted to find a good single reference with the minimal set of steps telling you what a genera

To Buy or Not to Buy a House

There is a lot of debate that goes around on whether buying a house is a wise decision. Then it tries to conclude if you should buy a house - one way or the other. Having gone through all the struggle myself, ultimately buying a humble flat - I think the question is not if but when . If you are going to live long enough, there is going to be a time when you would want to secure a place from where no one could throw you out. Reasons Not to Buy a House There are a few good reasons that you may not want to buy a house as yet ... Here are the few that I can think of: You know better alternatives to invest. Thank you for reading this article, but it's not for you. You are acting out of expectations from others Your elders are nagging you to buy a property because someone else they has done it. But you don't want to. Or there are some oversmart people around you not to do that. You are not

योगदान

तुझ्या शब्दाला, तुझ्या तळमळीला जास्त वजन यायचे असेल तर तुला तू आहेस त्यापेक्षा मोठं, उंच व्हायला हवं. काय सांगितलं गेलं हे महत्त्वाचं आहे, पण ते कोणी सांगितलं याला जास्त महत्त्व आहे. तू काहीही करू शकशील, पण आत्ता नाही. तू तुझ्या आयुष्यात भक्कम उभा हवास. वेळ आल्यास तुला चार पैसे खर्च करता आले पाहिजेत. तरच तुझ्यावर दुसऱ्यांचा विश्वास बसेल. घाव जाणकारीनं घालायला हवा. आंधळेपणानं केलेली वाटचाल ही फरपट ठरते. मोठा हो, जाणता हो, समर्थ हो. मग आपल्या कार्यात तू निश्चित योगदान करू शकशील.