Add a little vegetable oil to the pan and passer the onions. When the onion becomes golden, put a couple of tablespoons of onion in a baking dish - we will need it later. Add mushrooms and salt to the pan and cover.
While the mushrooms are cooking, we can put the first layer of our casserole - beans. Put all the beans to the baking dish, mash it with the onion that we left there earlier and fill the bottom of the baking dish with this layer.
Once mushrooms become golden - put it to the baking dish as a next layer of casserole. After that, put the layers in the following sequence: potatoes (you can add a little salt here), cheese, mayo.
Put the casserole to the preheated oven (about 170 degrees) on 35 minutes. Done! :) Don’t rush, let the casserole cool down a little bit, and do not swallow your tongue (not sure whether it’s vegan).