I have decided to transition my Appium-Javascript boilerplate project into a typescript project. I am opting for the typed-configuration as it is officially recommended and have followed the steps outlined in the documentation.
Here is an overview of the project's structure:
https://i.sstatic.net/RD7ji.jpg
This snippet shows the content of the ‘package.json’ file:
{
"author": "",
... (omitted for brevity)
}
Below is the contents of the ‘tsconfig.json’ file detailing the 'sync-mode'-configuration:
{
"compilerOptions": {
... (omitted for brevity)
}
Lastly, here is the content of the ‘wdio.conf.ts’ file that holds the configuration for the project:
let {join} = require( 'path' );
exports.config = {
... (omitted for brevity)
};
Included in the project is the ‘sample.steps.ts’ file which contains a basic test scenario to verify the project's functionality.
Upon compiling the typescript successfully from the ‘./src’ folder into the ‘./build’ directory using the ‘tsc’ command, I encountered an error message when attempting to run the test:
ERROR @wdio/cli:launcher: No specs found to run, exiting with failure
I suspect there might be an issue within the ‘tsconfig.json’ file causing this error. At this point, even a non-typed implementation would suffice, as I'm unable to implement either successfully.
The project has been pushed to github at: appium-webdriverIO-typescript