Actually you are right. I am trying to assume plane strain which makes everything a lot easier.

For tension and compression, I simply set displacements of Y=0 on the top and bottom ledge and opposite nonzero displacements in the X direction on the right and left edges with Y = 0.

For shear, I only applied opposite nonzero displacements on the top and bottom edges with Y=0.

For the last example (twisting), I tried to combine the displacements I applied for tension and shear but I get an error due to conflicting DOF constraints at one or more nodes. Not sure how else to simulate it. Would like to hear your thoughts on this.

Below are images of the deformation for: