Refactor e2e test for plugins