While theoretical efforts continue to explore possible explanations for the late-time cosmic acceleration, as well as the problem of the cosmological constant, we expect future cosmological surveys to test and constrain many of the proposed theories. In this talk, I will first review the status of models of dark energy provided by fundamental physics (supergravity and string theory) by presenting, as an example, a recently discovered class of alpha-attractor models of quintessential inflation combining dark energy and inflation in a unified framework. I will discuss phenomenological implications of the models in view of the current and future cosmological observations of the large-scale structure of the universe and the B-mode polarisation of the cosmic microwave background. I will then switch gears and discuss the models of dark energy in view of the recently proposed swampland conjectures for string theory, and quantum gravity in general. My focus will be on the cosmological implications of the conjectures, and I will show that all the existing string-theory based models of dark energy that are consistent with the swampland conjectures are ruled out by current cosmological observations.