Before writing real tests, it might be helpful to add some helper files to provide test data and upload your plugin. You must not understand all elements of the files at this point, simply copy/paste them into your plugin and customize them.
Upload your plugin
First of all you might want to upload your plugin. Therefore you can use helper methods from the CPB. The UniversalPluginManager page object provides everything you need. Simple change the pluginPath and the pluginName.
After your plugin is installed you might want to add som test data to your instance.
Shared page objects
This might be users, spaces or pages as well as plugin specific data. It is best practice to encapsulate these data in a sharedPageObjects.js file, where they can be accessed in every test.
If something fails while preparation, the tests will stop immediately. This is why we recommend not to something worth testing in this file.
Clean up Your Instance
After running all tests, you might want your instance to be clean again. Therefore you can implement all cleanup tasks in this file and run it after all.
As specs (as well as unit tests) should not have any dependencies on each other, every spec should cleanup its own data. This is why the cleanupTestSetup.spec.js should only remove the data produced in the prepareTestSetup.spec.js.