diff --git a/.github/scripts/release-server-tag.sh b/.github/scripts/release-server-tag.sh
index c4c89421..c7a55700 100644
--- a/.github/scripts/release-server-tag.sh
+++ b/.github/scripts/release-server-tag.sh
@@ -1,7 +1,7 @@
#!/usr/bin/bash
# root directory is in root of this project
#
-output="graspit-reporters/packages/graspit-commons/.version"
+output="handshake-nodejs-reporters/packages/common-handshakes/.version"
if [ -f "$output" ] ; then
rm "$output"
diff --git a/.github/workflows/dashboard-test.yml b/.github/workflows/dashboard-test.yml
deleted file mode 100644
index 8da2e1d8..00000000
--- a/.github/workflows/dashboard-test.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: 'sanity-e2e'
-
-on:
- push:
- branches:
- - "nodejs-reporters"
-
-permissions:
- contents: write
-
-jobs:
- test:
- name: Test Dashboard
- runs-on: 'macos-latest'
- permissions: write-all
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Use Node.js
- uses: actions/setup-node@v3
- with:
- node-version: 20.9.0
-
- - name: Setup Turbo Repo
- working-directory: ./graspit-reporters
- run: npm install && npm run build
-
- - name: Download required for Dashboard
- working-directory: ./graspit-reporters/packages/graspit-dashboard
- run: npm install
-
- - name: Install Test Related Packages for mocha
- working-directory: ./graspit-reporters/apps/test-wdio-mocha
- run: npm install
-
- - name: Install Test Related Packages for cucumber
- working-directory: ./graspit-reporters/apps/test-wdio-cucumber
- run: npm install
-
- - name: patch & export results
- working-directory: ./graspit-reporters
- run: |
- sudo npm run sanity
- sudo npx graspit patch ../TestResults
- sudo npx graspit export ../TestResults --out ../TestReports
\ No newline at end of file
diff --git a/.github/workflows/deploy-nodejs-reporters.yml b/.github/workflows/deploy-nodejs-reporters.yml
new file mode 100644
index 00000000..c42eba1a
--- /dev/null
+++ b/.github/workflows/deploy-nodejs-reporters.yml
@@ -0,0 +1,55 @@
+name: 'deploy-nodejs-reporters'
+
+on:
+ push:
+ branches:
+ - "nodejs-reporters"
+ paths:
+ - '**.js'
+ - '**.ts'
+ - '**deploy-nodejs-reporters.yml' # for testing this workflow
+
+permissions:
+ contents: write
+
+jobs:
+ test:
+ name: Test Dashboard
+ runs-on: 'macos-latest'
+ permissions: write-all
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Use Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 20.9.0
+
+ - name: Setup Turbo Repo and conduct sanity test
+ working-directory: ./handshake-nodejs-reporters
+ run: npm install && npm run build && sudo npm run sanity
+
+ - name: Download required for Dashboard
+ working-directory: ./handshake-nodejs-reporters/packages/handshake-dashboard
+ run: npm install
+
+ - name: exporting results
+ working-directory: ./handshake-nodejs-reporters
+ run: |
+ sudo npx handshake export ../TestResults --out ../TestReports
+
+ - name: Create Release Pull Request
+ uses: changesets/action@v1
+ with:
+ cwd: ./handshake-nodejs-reporters
+ publish: npx changeset publish
+ title: "version handshake-nodejs-reporters"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: Publish the package if required
+ if: steps.changesets.outputs.published == 'true'
+ run: echo 'published packages'
\ No newline at end of file
diff --git a/.github/workflows/server-build.yml b/.github/workflows/server-build.yml
index 0b8c4195..7a1c308c 100644
--- a/.github/workflows/server-build.yml
+++ b/.github/workflows/server-build.yml
@@ -109,10 +109,10 @@ jobs:
id: release
with:
files: dist/**/*
- body: ":rocket: Bump graspit-server version to `${{ steps.version.outputs.VERSION }}`"
+ body: ":rocket: Bump Handshake-server version to `${{ steps.version.outputs.VERSION }}`"
prerelease: true
tag_name: ${{ steps.version.outputs.VERSION }}
- name: "Graspit - ${{ steps.version.outputs.VERSION }}"
+ name: "Handshake ๐ค - ${{ steps.version.outputs.VERSION }}"
generate_release_notes: true
- name: Post Release Post
@@ -128,7 +128,7 @@ jobs:
title: "Bump Server Build"
labels: "Automated,Server-build"
reviewers: "RahulARanger"
- body: ":rocket: Bumped graspit-server version to `${{ steps.version.outputs.VERSION }}`.
+ body: ":rocket: Bumped handshake-server version to `${{ steps.version.outputs.VERSION }}`.
:magic_wand: Make sure to edit this [release](${{ steps.release.outputs.url }}) once done."
base: "nodejs-reporters"
assignees: "RahulARanger"
diff --git a/.gitignore b/.gitignore
index 78575793..824f87c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
# dependencies
-graspit-dashboard/.next/*
+handshake-dashboard/.next/*
dist/*
**/out/*
**/node_modules/*
@@ -45,9 +45,6 @@ venv/*
**/dist/**
**/build/**
check.py
-graspit-reporters/packages/graspit-dashboard/public/antd.min.css
-graspit-reporters/packages/graspit-dashboard/src/styles/antd.min.css
-
# Production
/build
@@ -55,4 +52,7 @@ graspit-reporters/packages/graspit-dashboard/src/styles/antd.min.css
# Misc
.DS_Store
-graspit-reporters/packages/graspit-commons/bin
+handshake-nodejs-reporters/packages/common-handshakes/bin
+handshake-nodejs-reporters/Jest-Results
+handshake-nodejs-reporters/packages/handshake-dashboard/src/styles/antd.min.css
+/handshake-nodejs-reporters/packages/handshake-dashboard/test-export.ps1
diff --git a/.idea/GraspIt.iml b/.idea/Handshake.iml
similarity index 83%
rename from .idea/GraspIt.iml
rename to .idea/Handshake.iml
index dd8f7211..7f3a6eef 100644
--- a/.idea/GraspIt.iml
+++ b/.idea/Handshake.iml
@@ -2,6 +2,7 @@
+
@@ -10,7 +11,7 @@
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index f7002428..93855d38 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -7,5 +7,5 @@
-
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index d9fc97e5..6188599f 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 7fa57697..a6586f57 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,22 @@
-# Grasp-it
+# Handshake ๐ค
+_A Modern Test Reporter_
-Utilizes the data collected from the test execution does some processing and then displays it in the Dashboard.
+Processes the data collected from the test execution and then generates a modern Dashboard.
-## Architecture
+## Getting Started
-- we initiate the Grasp-it-dashboard
- - this step would be skipped if these below steps were done previously, Note: it would be not skipped if it finds a new version of the dashboard
- - Copy the dashboard from `src`
- - downloads all the required npm modules
- - creates a new `TeStReSuLtS.db`
-- And then we start the framework
-- Past that we collect all the Test suites, sessions, test cases, we name this routes under the prefix: "register"
-- After the registration, we collect the details pertaining to the end result of the registered entity
-- Now we make sure to fill the calculated cells in some records that were added, this is to save the time while generating the report.
-- we export the results past the test completion, while this is an optional step, which could be configured at the plugin level, but it has to done at some point in order to generate a report.
+### Nodejs-Reporters
+
+#### WebdriverIO
+
+[WebdriverIO](https://webdriver.io/) is a Next-gen browser and mobile automation test framework for Node.js
+
+with the help of customer [reporter](https://webdriver.io/docs/customreporter/) and [service](https://webdriver.io/docs/customservices), we would be able to collect the results generated through its project.
+
+1. Install Packages: `npm install wdio-handshake-reporter`
## Plans
### Test Reports
-- Adding Attachments
- Dynamic Report
- JIRA Reporter
-
-### wdio-py-reporter
-- Support Cucumber framework
-- Dynamic Report
-
-### Note
-* https://python-poetry.org/docs/basic-usage/#using-your-virtual-environment
\ No newline at end of file
diff --git a/__test__/conftest.py b/__test__/conftest.py
new file mode 100644
index 00000000..e8817e89
--- /dev/null
+++ b/__test__/conftest.py
@@ -0,0 +1,65 @@
+import platform
+import subprocess
+
+from pytest import fixture, mark
+from pathlib import Path
+from handshake.services.DBService.shared import db_path as shared_db_path
+from tortoise.connection import connections
+from handshake.services.DBService.models.enums import ConfigKeys
+
+pytestmark = mark.asyncio
+
+testNames = "pyTestForOurProject"
+
+
+@fixture()
+def root_dir():
+ return Path(__file__).parent.parent / "TestResults"
+
+
+@fixture()
+def db_path(root_dir):
+ return shared_db_path(root_dir)
+
+
+@fixture()
+def dist(root_dir):
+ return root_dir.parent / "dist"
+
+
+@fixture()
+def dist_name():
+ return (
+ f"handshake-{platform.system()}.exe"
+ if platform.system() == "Windows"
+ else f"handshake-{platform.system()}"
+ )
+
+
+@fixture()
+def init_db(root_dir):
+ return lambda: subprocess.call(f'handshake config "{root_dir}"', shell=True)
+
+
+@fixture
+async def get_v3_connection(scripts):
+ connection = connections.get("default")
+
+ # assuming we are at v4
+ await connection.execute_script((scripts / "revert-v4.sql").read_text())
+ await connection.execute_query(
+ "UPDATE CONFIGBASE set value = '3' where key = ?", (ConfigKeys.version,)
+ )
+
+ return connection
+
+
+@fixture
+def scripts():
+ return (
+ Path(__file__).parent.parent
+ / "handshake"
+ / "services"
+ / "DBService"
+ / "scripts"
+ )
diff --git a/__test__/test_regression/conftest.py b/__test__/test_regression/conftest.py
index 1d2a350f..3048c8a5 100644
--- a/__test__/test_regression/conftest.py
+++ b/__test__/test_regression/conftest.py
@@ -1,36 +1,10 @@
-from pytest import fixture, mark
-from pathlib import Path
-from graspit.services.DBService.shared import db_path as shared_db_path
-from graspit.services.DBService.lifecycle import init_tortoise_orm, close_connection
-from graspit.services.DBService.models import RunBase, SessionBase
+from pytest import fixture
+from handshake.services.DBService.lifecycle import init_tortoise_orm, close_connection
+from handshake.services.DBService.models import RunBase, SessionBase
from datetime import datetime, timedelta
-from subprocess import call
from sanic_testing.testing import SanicASGITestClient
-from graspit.services.Endpoints.core import service_provider
-
-pytestmark = mark.asyncio
-
-testNames = "pyTestForOurProject"
-
-
-@fixture()
-def root_dir():
- return Path(__file__).parent.parent.parent / "TestResults"
-
-
-@fixture()
-def db_path(root_dir):
- return shared_db_path(root_dir)
-
-
-@fixture()
-def patch(root_dir):
- return lambda: call(f'graspit patch "{root_dir}"', shell=True)
-
-
-@fixture()
-def init_db(root_dir):
- return lambda: call(f'graspit config "{root_dir}"', shell=True)
+from handshake.services.Endpoints.core import service_provider
+from __test__.conftest import testNames
@fixture(autouse=True)
diff --git a/__test__/test_regression/test_patch_jobs/conftest.py b/__test__/test_regression/test_patch_jobs/conftest.py
index 5c9f757b..5d5a1e9e 100644
--- a/__test__/test_regression/test_patch_jobs/conftest.py
+++ b/__test__/test_regression/test_patch_jobs/conftest.py
@@ -1,7 +1,7 @@
from pytest import fixture
-from graspit.services.DBService.models import SuiteBase, TestConfigBase, SessionBase
-from graspit.services.DBService.models.enums import SuiteType, Status, AttachmentType
-from graspit.services.SchedularService.register import register_patch_suite
+from handshake.services.DBService.models import SuiteBase, TestConfigBase, SessionBase
+from handshake.services.DBService.models.enums import SuiteType, Status, AttachmentType
+from handshake.services.SchedularService.register import register_patch_suite
import datetime
from asyncio import sleep
@@ -97,11 +97,12 @@ async def helper_create_test_config(
)
-async def helper_create_session(test_id: str):
+async def helper_create_session(test_id: str, entityName="sample"):
await sleep(0.0025)
started = datetime.datetime.utcnow()
return await SessionBase.create(
started=started,
+ entityName=entityName,
test_id=test_id,
ended=started + datetime.timedelta(milliseconds=24),
)
diff --git a/graspit/services/CommandLine/__init__.py b/__test__/test_regression/test_patch_jobs/test_migration/__init__.py
similarity index 100%
rename from graspit/services/CommandLine/__init__.py
rename to __test__/test_regression/test_patch_jobs/test_migration/__init__.py
diff --git a/__test__/test_regression/test_patch_jobs/test_migration/conftest.py b/__test__/test_regression/test_patch_jobs/test_migration/conftest.py
new file mode 100644
index 00000000..ad60fb2f
--- /dev/null
+++ b/__test__/test_regression/test_patch_jobs/test_migration/conftest.py
@@ -0,0 +1,42 @@
+import shutil
+import time
+
+from pytest import fixture
+from pathlib import Path
+
+from __test__.test_regression.conftest import testNames
+from handshake.services.DBService.shared import db_path as shared_db_path
+from handshake.services.DBService.lifecycle import init_tortoise_orm, close_connection
+from handshake.services.DBService.models import RunBase
+
+
+@fixture()
+def root_dir():
+ return Path(__file__).parent.parent.parent.parent.parent / "TestMigration"
+
+
+@fixture()
+def db_path(root_dir):
+ return shared_db_path(root_dir)
+
+
+@fixture(autouse=True)
+async def clean_close(db_path, init_db, root_dir):
+ if root_dir.exists():
+ shutil.rmtree(root_dir)
+
+ root_dir.mkdir()
+
+ if not db_path.exists():
+ init_db()
+
+ await init_tortoise_orm(db_path)
+ yield
+
+ # deleting sample test runs
+ await RunBase.filter(projectName=testNames).all().delete()
+ await close_connection()
+ time.sleep(1)
+
+ if root_dir.exists():
+ shutil.rmtree(root_dir)
diff --git a/__test__/test_regression/test_patch_jobs/test_migration/test_scripts.py b/__test__/test_regression/test_patch_jobs/test_migration/test_scripts.py
new file mode 100644
index 00000000..27b72365
--- /dev/null
+++ b/__test__/test_regression/test_patch_jobs/test_migration/test_scripts.py
@@ -0,0 +1,52 @@
+import tortoise
+from handshake.services.DBService.models import ConfigBase, SessionBase
+from handshake.services.DBService.models.enums import ConfigKeys
+from handshake.services.DBService.migrator import migration
+from subprocess import run, PIPE
+
+
+async def assertEntityNameType(connection, expected):
+ info = await connection.execute_query("PRAGMA table_info('SessionBase');")
+
+ found = False
+ for row in info[1]:
+ if row["name"] == "entityName":
+ found = True
+ assert row["type"] == expected
+ assert found, "entityName not found"
+
+
+class TestMigrationScripts:
+ async def test_bump_v3(
+ self, get_v3_connection, scripts, sample_test_run, create_session, db_path
+ ):
+ connection = tortoise.connections.get("default")
+ test_run = await sample_test_run
+
+ version = await ConfigBase.filter(key=ConfigKeys.version).first()
+ assert int(version.value) == 3
+
+ for _ in range(3):
+ await create_session(entityName="chrome", test_id=test_run.testID)
+
+ script = scripts / "bump-v3.sql"
+ assert script.exists()
+ await assertEntityNameType(connection, "varchar(10)")
+
+ assert not migration(db_path), "Migration failed"
+
+ await assertEntityNameType(connection, "varchar(30)")
+
+ version = await ConfigBase.filter(key=ConfigKeys.version).first()
+ assert int(version.value) == 4
+
+ entities = await SessionBase.all().values_list("entityName", flat=True)
+ assert len(entities) == 3
+
+ for entity in entities:
+ assert entity == "chrome", "Data changed"
+
+ async def test_version_command(self, root_dir):
+ result = run(f'handshake db-version "{root_dir}"', shell=True, stderr=PIPE)
+ assert result.returncode == 0
+ assert "Currently at: v4." in result.stderr.decode()
diff --git a/__test__/test_regression/test_patch_jobs/test_patch_jobs.py b/__test__/test_regression/test_patch_jobs/test_patch_jobs.py
index ea817df8..9f7d3cb9 100644
--- a/__test__/test_regression/test_patch_jobs/test_patch_jobs.py
+++ b/__test__/test_regression/test_patch_jobs/test_patch_jobs.py
@@ -1,15 +1,15 @@
from pytest import mark
-from graspit.services.DBService.models import (
+from handshake.services.DBService.models import (
SuiteBase,
RollupBase,
RunBase,
SessionBase,
RetriedBase,
)
-from graspit.services.DBService.models.enums import Status, AttachmentType
-from graspit.services.SchedularService.modifySuites import patchTestSuite
-from graspit.services.SchedularService.completeTestRun import patchTestRun
-from graspit.services.SchedularService.register import (
+from handshake.services.DBService.models.enums import Status, AttachmentType
+from handshake.services.SchedularService.modifySuites import patchTestSuite
+from handshake.services.SchedularService.completeTestRun import patchTestRun
+from handshake.services.SchedularService.register import (
register_patch_suite,
register_patch_test_run,
)
diff --git a/__test__/test_regression/test_save_endpoints.py b/__test__/test_regression/test_save_endpoints.py
index 62272e30..ed89fb33 100644
--- a/__test__/test_regression/test_save_endpoints.py
+++ b/__test__/test_regression/test_save_endpoints.py
@@ -1,8 +1,9 @@
import datetime
+import json
from typing import Coroutine, Any
from pytest import mark
-from graspit.services.DBService.models import RunBase, SessionBase, SuiteBase
-from graspit.services.DBService.models.enums import SuiteType, Status
+from handshake.services.DBService.models import RunBase, SessionBase, SuiteBase
+from handshake.services.DBService.models.enums import SuiteType, Status
from sanic import Sanic
@@ -36,8 +37,10 @@ async def test_we_have_pydantic_in_place(self, client, sample_test_run, app):
"sessionID",
}
- assert len(result) == len(required)
- for missing in result:
+ reasons = json.loads(result["reason"])
+ assert len(reasons) == len(required)
+
+ for missing in reasons:
assert missing["type"] == "missing"
assert missing["loc"][0] in required
assert missing["msg"] == "Field required"
diff --git a/__test__/test_regression/test_utils.py b/__test__/test_regression/test_utils.py
index c7fff060..f4db0146 100644
--- a/__test__/test_regression/test_utils.py
+++ b/__test__/test_regression/test_utils.py
@@ -1,10 +1,10 @@
import pathlib
-from graspit.services.SchedularService.completeTestRun import (
+from handshake.services.SchedularService.completeTestRun import (
simplify_file_paths,
fetch_key_from_status,
)
-from graspit.services.DBService.models.config_base import ConfigKeys, ConfigBase
-from graspit.services.SchedularService.modifySuites import Status
+from handshake.services.DBService.models.config_base import ConfigKeys, ConfigBase
+from handshake.services.SchedularService.modifySuites import Status
from pathlib import Path
from tempfile import mkdtemp
from shutil import rmtree
@@ -108,12 +108,18 @@ def test_status_from_values():
@mark.usefixtures("clean_close")
class TestSetConfigCommand:
- async def test_set_config_with_one_para(self, root_dir, force=None):
- result = run(
- f'graspit config "{root_dir}" -mr 3',
- cwd=force if force else root_dir,
- shell=True,
- )
+ async def test_set_config_with_one_para(self, root_dir, force=None, max_runs=3):
+ if force is None:
+ result = run(
+ f'handshake config "{root_dir}" -mr {max_runs}',
+ cwd=root_dir,
+ shell=True,
+ )
+ else:
+ result = run(
+ [force, "config", str(root_dir), "-mr", f"{max_runs}"],
+ cwd=root_dir,
+ )
assert result.returncode == 0
config_record = await ConfigBase.filter(key=ConfigKeys.maxRuns).first()
- assert int(config_record.value) == 3
+ assert int(config_record.value) == max_runs
diff --git a/__test__/test_sanity/conftest.py b/__test__/test_sanity/conftest.py
index 34dafdc1..8d263210 100644
--- a/__test__/test_sanity/conftest.py
+++ b/__test__/test_sanity/conftest.py
@@ -1,42 +1,13 @@
-from pytest import fixture, mark
-from pathlib import Path
-from graspit.services.DBService.shared import db_path as shared_db_path
-from graspit.services.DBService.lifecycle import init_tortoise_orm, close_connection
-from graspit.services.DBService.models import RunBase, SessionBase
-from datetime import datetime, timedelta
+from pytest import fixture
+from handshake.services.DBService.lifecycle import init_tortoise_orm, close_connection
+from handshake.services.DBService.models import RunBase
from subprocess import call
-from sanic_testing.testing import SanicASGITestClient
-from graspit.services.Endpoints.core import service_provider
-
-
-pytestmark = mark.asyncio
-
-testNames = "pyTestForOurProject"
-
-
-@fixture()
-def root_dir():
- return Path(__file__).parent.parent.parent / "TestResults"
-
-
-@fixture()
-def db_path(root_dir):
- return shared_db_path(root_dir)
-
-
-@fixture()
-def dist(root_dir):
- return root_dir.parent / "dist"
-
-
-@fixture()
-def patch(root_dir, dist):
- return lambda: call(f'graspit patch "{root_dir}"', shell=True, cwd=dist)
+from __test__.conftest import testNames
@fixture()
-def init_db(root_dir, dist):
- return lambda: call(f'graspit config "{root_dir}"', shell=True, cwd=dist)
+def patch(root_dir, dist, dist_name):
+ return lambda: call(f'{dist_name} patch "{root_dir}"', shell=True, cwd=dist)
@fixture(autouse=True)
diff --git a/__test__/test_sanity/test_cli.py b/__test__/test_sanity/test_cli.py
index 10b1c8f9..f9641cd3 100644
--- a/__test__/test_sanity/test_cli.py
+++ b/__test__/test_sanity/test_cli.py
@@ -1,5 +1,7 @@
import platform
-
+from handshake.services.DBService.models import ConfigBase
+from handshake.services.DBService.models.enums import ConfigKeys
+from subprocess import run
from pytest import mark
from __test__.test_regression.test_utils import TestSetConfigCommand
@@ -8,19 +10,33 @@
class TestCli:
def test_dist_existence(self, dist):
path = dist
-
target = platform.system()
if target == "Windows":
- path /= f"graspit-{target}.exe"
+ path /= f"handshake-{target}.exe"
elif target == "Linux" or target == "Darwin":
- path /= f"graspit-{target}"
+ path /= f"handshake-{target}"
else:
assert False, f"{target} is not supported"
assert path.exists() is True, "Exe was not found"
- async def test_set_config_with_one_para(self, root_dir, dist):
+ async def test_set_config_with_one_para(self, root_dir, dist, dist_name):
return await TestSetConfigCommand().test_set_config_with_one_para(
- root_dir, dist
+ root_dir, dist / dist_name, 30
)
+
+
+class TestMigration:
+ async def test_migration(self, dist_name, root_dir, dist, get_v3_connection):
+ version = await ConfigBase.filter(key=ConfigKeys.version).first()
+ assert int(version.value) == 3
+
+ result = run(
+ [dist / dist_name, "migrate", root_dir.name],
+ cwd=root_dir.parent,
+ )
+ assert result.returncode == 0
+
+ version = await ConfigBase.filter(key=ConfigKeys.version).first()
+ assert int(version.value) == 4
diff --git a/graspit-reporters/README.md b/graspit-reporters/README.md
deleted file mode 100644
index bc389a06..00000000
--- a/graspit-reporters/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Turborepo starter
-
-This is an official starter Turborepo.
-
-## Using this example
-
-Run the following command:
-
-```sh
-npx create-turbo@latest
-```
-
-## What's inside?
-
-This Turborepo includes the following packages/apps:
-
-### Apps and Packages
-
-- `docs`: a [Next.js](https://nextjs.org/) app
-- `web`: another [Next.js](https://nextjs.org/) app
-- `ui`: a stub React component library shared by both `web` and `docs` applications
-- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
-- `tsconfig`: `tsconfig.json`s used throughout the monorepo
-
-Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
-
-### Utilities
-
-This Turborepo has some additional tools already setup for you:
-
-- [TypeScript](https://www.typescriptlang.org/) for static type checking
-- [ESLint](https://eslint.org/) for code linting
-- [Prettier](https://prettier.io) for code formatting
-
-### Build
-
-To build all apps and packages, run the following command:
-
-```
-cd my-turborepo
-pnpm build
-```
-
-### Develop
-
-To develop all apps and packages, run the following command:
-
-```
-cd my-turborepo
-pnpm dev
-```
-
-### Remote Caching
-
-Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
-
-By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
-
-```
-cd my-turborepo
-npx turbo login
-```
-
-This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
-
-Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
-
-```
-npx turbo link
-```
-
-## Useful Links
-
-Learn more about the power of Turborepo:
-
-- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
-- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
-- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
-- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
-- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
-- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
diff --git a/graspit-reporters/apps/graspit-docs/pages/components/preview.tsx b/graspit-reporters/apps/graspit-docs/pages/components/preview.tsx
deleted file mode 100644
index 6a7d7169..00000000
--- a/graspit-reporters/apps/graspit-docs/pages/components/preview.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import GalleryOfImages, {
- CardForAImage,
-} from "graspit/src/components/utils/ImagesWithThumbnails";
-import type { Attachment } from "graspit/src/types/testEntityRelated";
-
-import type { ReactNode } from "react";
-import React from "react";
-
-export default function PreviewForMotivation(props: {
- images: Array<{ title: string; url: string }>;
-}): ReactNode {
- const imagesToAttachments: Attachment[] = props.images.map((image) => ({
- attachmentValue: JSON.stringify({
- title: image.title,
- value: image.url,
- }),
- description: "",
- entity_id: "",
- type: "CUSTOM",
- }));
-
- return (
-
- {imagesToAttachments.map((image, index) => (
-
- ))}
-
- );
-}
diff --git a/graspit-reporters/apps/graspit-docs/pages/server.mdx b/graspit-reporters/apps/graspit-docs/pages/server.mdx
deleted file mode 100644
index aa7979a1..00000000
--- a/graspit-reporters/apps/graspit-docs/pages/server.mdx
+++ /dev/null
@@ -1,68 +0,0 @@
-import SetupSteps from "pages/components/setupSteps";
-import Alert from "antd/lib/alert/Alert";
-import Tag from "antd/lib/tag/index";
-import Space from "antd/lib/space/index";
-
-<>
-
- Important
- Python
-
-
->
-
-## Getting Started:
-
-In this step, we would be setting up python venv in our project, if you have python **3.11** installed, you can skip the jump to second step.
-This particular step is required regardless of the test framework used.
-
-- Install [Python 3.11](https://www.python.org/downloads/release/python-3110/)
-
-- Move to the root directory, and execute this command `python -m venv venv`
-
-
-
-- After the venv creation, create a file `requirements.txt`
-
- ```text filename="requirements.txt"
- graspit>=0.8.1
- ```
-
-
-
-- Activate the venv, If in **windows**, `venv\Scripts\activate`, else On **Unix or MacOS**, run: `source venv/bin/activate`
-
-- Now Install packages through: `pip install -r requiremnts.txt`
-
-- `graspit --help`
- you would see the below text (may not be exact) as the output.
-
- ```cmd
- Usage: graspit [OPTIONS] COMMAND [ARGS]...
- Options:
- --help Show this message and exit.
- Commands:
- display
- export
- patch
- run-app
- ```
-
-## Past Setup
-
-Now that we have setup graspit package on python,
-Please download [PyPI Assistant](https://marketplace.visualstudio.com/items?itemName=twixes.pypi-assistant), a VSCode Extension, or similar one in your IDE. so we can update to the latest version.
-
-That's all for this step.
-
-## Reference
-
-- [Invoking Python](https://docs.python.org/3.11/tutorial/interpreter.html#invoking-the-interpreter)
-- [Creating Venv](https://docs.python.org/3.11/library/venv.html#creating-virtual-environments)
-- [Invoking Venv](https://docs.python.org/3.11/library/venv.html#creating-virtual-environments)
diff --git a/graspit-reporters/apps/test-wdio-cucumber/package.json b/graspit-reporters/apps/test-wdio-cucumber/package.json
deleted file mode 100644
index 3e9ad071..00000000
--- a/graspit-reporters/apps/test-wdio-cucumber/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "test-wdio-cucumber",
- "version": "1.0.0",
- "private": true,
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1",
- "sanity": "wdio run ./wdio.conf.js"
- },
- "author": "",
- "license": "ISC",
- "description": "",
- "devDependencies": {
- "@wdio/cucumber-framework": "^8.24.4",
- "@wdio/local-runner": "^8.24.4",
- "@wdio/spec-reporter": "^8.24.2"
- },
- "dependencies": {
- "@wdio/cli": "^8.24.4",
- "wdio-graspit-reporter": "^3.4.4"
- }
-}
diff --git a/graspit-reporters/packages/graspit-commons/.version b/graspit-reporters/packages/graspit-commons/.version
deleted file mode 100644
index ed4bd1a4..00000000
--- a/graspit-reporters/packages/graspit-commons/.version
+++ /dev/null
@@ -1 +0,0 @@
-[{"url":"https://api.github.com/repos/RahulARanger/graspit/releases/assets/138078032","id":138078032,"node_id":"RA_kwDOKgpJeM4IOudQ","name":"graspit-Darwin","label":"","content_type":"application/octet-stream","state":"uploaded","size":17639248,"download_count":0,"created_at":"2023-11-29T18:57:26Z","updated_at":"2023-11-29T18:57:27Z","browser_download_url":"https://github.com/RahulARanger/graspit/releases/download/0.12.6/graspit-Darwin"},{"url":"https://api.github.com/repos/RahulARanger/graspit/releases/assets/138078030","id":138078030,"node_id":"RA_kwDOKgpJeM4IOudO","name":"graspit-Linux","label":"","content_type":"application/octet-stream","state":"uploaded","size":31709912,"download_count":0,"created_at":"2023-11-29T18:57:26Z","updated_at":"2023-11-29T18:57:28Z","browser_download_url":"https://github.com/RahulARanger/graspit/releases/download/0.12.6/graspit-Linux"},{"url":"https://api.github.com/repos/RahulARanger/graspit/releases/assets/138078031","id":138078031,"node_id":"RA_kwDOKgpJeM4IOudP","name":"graspit-Windows.exe","label":"","content_type":"application/octet-stream","state":"uploaded","size":17044766,"download_count":0,"created_at":"2023-11-29T18:57:26Z","updated_at":"2023-11-29T18:57:27Z","browser_download_url":"https://github.com/RahulARanger/graspit/releases/download/0.12.6/graspit-Windows.exe"}]
diff --git a/graspit-reporters/packages/graspit-commons/CHANGELOG.md b/graspit-reporters/packages/graspit-commons/CHANGELOG.md
deleted file mode 100644
index 5e37c20b..00000000
--- a/graspit-reporters/packages/graspit-commons/CHANGELOG.md
+++ /dev/null
@@ -1,291 +0,0 @@
-# graspit-commons
-
-## 3.4.4
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.4.4
-
-## 3.4.3
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.4.3
-
-## 3.4.2
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.4.2
-
-## 3.4.1
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.4.1
-
-## 3.4.0
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.4.0
-
-## 3.3.1
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.3.1
-
-## 3.3.0
-
-### Minor Changes
-
-- feat: migrated to echarts
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.3.0
-
-## 3.2.0
-
-### Minor Changes
-
-- added support for links and assertions
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.2.0
-
-## 3.1.6
-
-### Patch Changes
-
-- handled permission and attached links
-- Updated dependencies
- - graspit@3.1.6
-
-## 2.1.18
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.1.5
-
-## 2.1.17
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.1.4
-
-## 2.1.16
-
-### Patch Changes
-
-- support server-build 0.12.4
-- Updated dependencies
- - graspit@3.1.3
-
-## 2.1.15
-
-### Patch Changes
-
-- support server patch for exporting results
-- Updated dependencies
- - graspit@3.1.2
-
-## 2.1.14
-
-### Patch Changes
-
-- patched required things
-
-## 2.1.13
-
-### Patch Changes
-
-- script for feeding exe args
-
-## 2.1.12
-
-### Patch Changes
-
-- edit for the feed.cjs
-
-## 2.1.11
-
-### Patch Changes
-
-- added feeder script for the exe file
-
-## 2.1.10
-
-### Patch Changes
-
-- fix: test items
-
-## 2.1.9
-
-### Patch Changes
-
-- fix: relative path in preinstall script
-
-## 2.1.8
-
-### Patch Changes
-
-- fix the script for preinstall
-
-## 2.1.7
-
-### Patch Changes
-
-- fix the path for preinstall script
-
-## 2.1.6
-
-### Patch Changes
-
-- removed files part
-
-## 2.1.5
-
-### Patch Changes
-
-- fix files
-
-## 2.1.4
-
-### Patch Changes
-
-- preinstall -> postinstallation of build
-
-## 2.1.3
-
-### Patch Changes
-
-- download file path
-
-## 2.1.2
-
-### Patch Changes
-
-- fix installatiom
-
-## 2.1.1
-
-### Patch Changes
-
-- bump package version
-- Updated dependencies
- - graspit@3.1.1
-
-## 2.1.0
-
-### Minor Changes
-
-- test e2e
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@3.1.0
-
-## 1.5.0
-
-### Minor Changes
-
-- e02741a: added some helper functions for registering and marking session or test entity
-
-### Patch Changes
-
-- a526144: Revamped wdio-graspit-reporter, reusing the helper function from graspit-commons
-
-## 1.4.3
-
-### Patch Changes
-
-- 0fb98cf: Moved some of the common methods from wdio-graspit-reporter to graspit-commons, add tests for graspit-commons and planned a custom report for jest.
-
-## 1.4.1
-
-### Patch Changes
-
-- updated dependant packages, skipping mark session if the session id is undefined which would happen if a spec file was missed [observed in webdriverio]
-
-## 1.4.0
-
-### Minor Changes
-
-- renamed browser to entity in the sessionbase, made changes to replicate the same on UI side and we have moved sending the details reg. session from register to mark in webdriverio
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@2.2.0
-
-## 1.3.2
-
-### Patch Changes
-
-- Registering a test case which was skipped expliclity, minor improvements for the dashboard
-- Updated dependencies
- - graspit@2.1.0
-
-## 1.3.1
-
-### Patch Changes
-
-- e6055a0: Revert the line in package.json for graspit package
-
-## 1.3.0
-
-### Minor Changes
-
-- Added cross env way of activating venv created
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@2.0.1
-
-## 1.2.0
-
-### Minor Changes
-
-- Added Export Command for the graspit dashboard now we do not lint the export files at the time of export and also do not generate the css file on production, this can save some time for report generation.
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@2.0.0
-
-## 1.1.0
-
-### Minor Changes
-
-- Improved the Import paths and types for the reporter for webdriverio
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@1.1.0
-
-## 1.0.0
-
-### Major Changes
-
-- Merged tsconfig with graspit-commons and moved certain methods to graspit commons so we can avoid replicating few things for creating a nodejs based plugins
-
-### Patch Changes
-
-- Updated dependencies
- - graspit@1.0.0
diff --git a/graspit-reporters/packages/graspit-commons/downloadBuild.cjs b/graspit-reporters/packages/graspit-commons/downloadBuild.cjs
deleted file mode 100644
index 5cb7a47c..00000000
--- a/graspit-reporters/packages/graspit-commons/downloadBuild.cjs
+++ /dev/null
@@ -1,60 +0,0 @@
-const {
- createWriteStream, readFileSync, chmodSync, mkdirSync, existsSync,
-} = require('node:fs');
-const superagent = require('superagent');
-const { platform } = require('node:os');
-const { exit } = require('node:process');
-const { join, dirname } = require('node:path');
-
-/**
- * @typedef {{url: string;
- * id: number; name: 'Windows.exe' | 'Darwin';
- * label: string; content_type: string; state: 'uploaded'; size: number; download_count: number;
-* created_at: string;
-* updated_at: string;
-* browser_download_url: string;}} Asset
- * @type {Record}
- */
-const versionFromNames = {};
-
-const root = join(dirname(__filename), 'bin');
-
-if (!existsSync(root)) {
- mkdirSync(root);
-}
-
-(JSON.parse(readFileSync(join(dirname(__filename), '.version')).toString())).forEach(
- (dist) => { versionFromNames[dist.name] = dist; },
-);
-
-let interest;
-let exeName = 'graspit';
-
-switch (platform()) {
- case 'win32': {
- interest = 'graspit-Windows.exe';
- exeName = 'graspit.exe'; // removing .exe makes its unusable
- break;
- }
- case 'darwin': {
- interest = 'graspit-Darwin';
- break;
- }
- case 'linux': {
- interest = 'graspit-Linux';
- break;
- }
- default: {
- console.warn(`yet to supported for: ${platform()}`);
- exit(0);
- }
-}
-
-const exe = join(root, exeName);
-const stream = createWriteStream(exe);
-
-superagent
- .get(versionFromNames[interest].browser_download_url)
- .pipe(stream).on('close', () => {
- if (!exe.endsWith('.exe')) chmodSync(exe, 755);
- });
diff --git a/graspit-reporters/packages/graspit-commons/feed.cjs b/graspit-reporters/packages/graspit-commons/feed.cjs
deleted file mode 100644
index 521a610f..00000000
--- a/graspit-reporters/packages/graspit-commons/feed.cjs
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-const { spawnSync } = require('child_process');
-const { join } = require('path');
-const { platform } = require('os');
-
-const args = process.argv.slice(2);
-const executable = platform() === 'win32' ? 'graspit.exe' : 'graspit';
-spawnSync(join(__dirname, 'bin', executable), args, { stdio: 'inherit', env: process.env });
diff --git a/graspit-reporters/packages/graspit-commons/jest.config.cjs b/graspit-reporters/packages/graspit-commons/jest.config.cjs
deleted file mode 100644
index 03c56d3a..00000000
--- a/graspit-reporters/packages/graspit-commons/jest.config.cjs
+++ /dev/null
@@ -1,41 +0,0 @@
-/** @type {import('ts-jest').JestConfigWithTsJest} */
-module.exports = {
- preset: 'ts-jest',
- testEnvironment: 'node',
- // All imported modules in your tests should be mocked automatically
- // automock: false,
-
- // Stop running tests after `n` failures
- // bail: 0,
-
- // The directory where Jest should store its cached dependency information
- // cacheDirectory: "C:\\Users\\Rahul\\AppData\\Local\\Temp\\jest",
-
- // Automatically clear mock calls, instances, contexts and results before every test
- clearMocks: true,
-
- // Indicates whether the coverage information should be collected while executing the test
- collectCoverage: true,
-
- // An array of glob patterns indicating a set of files for which coverage
- // information should be collected
- // collectCoverageFrom: undefined,
-
- // The directory where Jest should output its coverage files
- coverageDirectory: 'coverage',
- // [...]
- extensionsToTreatAsEsm: ['.ts'],
- moduleNameMapper: {
- '^(\\.{1,2}/.*)\\.js$': '$1',
- },
- transform: {
- // '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
- // '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
- '^.+\\.tsx?$': [
- 'ts-jest',
- {
- useESM: true,
- },
- ],
- },
-};
diff --git a/graspit-reporters/packages/graspit-commons/package.json b/graspit-reporters/packages/graspit-commons/package.json
deleted file mode 100644
index 5b1e9d48..00000000
--- a/graspit-reporters/packages/graspit-commons/package.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "graspit-commons",
- "version": "3.4.4",
- "types": "./dist/index.d.ts",
- "main": "./dist/index.cjs",
- "module": "./dist/index.js",
- "type": "module",
- "private": false,
- "license": "MIT",
- "readme": "../../README.md",
- "description": "This package has some common functions or constants required for interacting with graspit-server",
- "bin": {
- "graspit": "./feed.cjs"
- },
- "scripts": {
- "lint": "eslint src/**",
- "test": "jest",
- "build": "rimraf -g ./dist && tsup src/index.ts --format esm,cjs --dts",
- "install": "node ./downloadBuild.cjs"
- },
- "dependencies": {
- "async-lock": "^1.4.0",
- "cross-env": "^7.0.3",
- "graspit": "3.4.4",
- "log4js": "^6.9.1",
- "superagent": "^8.1.2"
- },
- "devDependencies": {
- "@jest/globals": "^29.7.0",
- "@tsconfig/node18": "^18.2.2",
- "@types/async-lock": "^1.4.2",
- "@types/jest": "^29.5.10",
- "@types/mocha": "^10.0.6",
- "@types/node": "^20.10.0",
- "@types/superagent": "^4.1.24",
- "@types/supertest": "^2.0.16",
- "babel-jest": "^29.7.0",
- "jest": "^29.7.0",
- "ts-jest": "^29.1.1",
- "typescript": "^5.3.2"
- }
-}
diff --git a/graspit-reporters/packages/graspit-commons/src/dialPad.ts b/graspit-reporters/packages/graspit-commons/src/dialPad.ts
deleted file mode 100644
index f45744a1..00000000
--- a/graspit-reporters/packages/graspit-commons/src/dialPad.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-export default class DialPad {
- port: number;
-
- exePath?: string;
-
- constructor(port: number, exePath?:string) { this.port = port; this.exePath = exePath; }
-
- get url(): string {
- return `http://127.0.0.1:${this.port}`;
- }
-
- get saveUrl(): string {
- return `${this.url}/save`;
- }
-
- get writeUrl(): string {
- return `${this.url}/write`;
- }
-}
diff --git a/graspit-reporters/packages/graspit-commons/src/reporter.ts b/graspit-reporters/packages/graspit-commons/src/reporter.ts
deleted file mode 100644
index 93f65aa6..00000000
--- a/graspit-reporters/packages/graspit-commons/src/reporter.ts
+++ /dev/null
@@ -1,266 +0,0 @@
-import AsyncLock from 'async-lock';
-import log4js from 'log4js';
-import superagent from 'superagent';
-import DialPad from './dialPad';
-import {
- RegisterSession,
- MarkTestEntity, MarkTestSession, RegisterTestEntity, Assertion,
-} from './payload';
-
-const logger = log4js.getLogger('graspit-commons');
-
-log4js.configure({
- appenders: { console: { type: 'console' } },
- categories: { default: { appenders: ['console'], level: 'info' } },
-});
-
-export type IdMappedType = Record & { session?: string };
-
-export class ReporterDialPad extends DialPad {
- idMapped: IdMappedType = {};
-
- lockString = 'common-lock';
-
- lock: AsyncLock;
-
- constructor(port: number, timeout?:number) {
- super(port);
- this.lock = new AsyncLock({
- timeout: 60e3,
- maxExecutionTime: timeout ?? 60e3,
- maxPending: 1000,
- });
- }
-
- get registerSession(): string {
- return `${this.saveUrl}/registerSession`;
- }
-
- get registerSuite(): string {
- return `${this.saveUrl}/registerSuite`;
- }
-
- get updateSuite(): string {
- return `${this.saveUrl}/updateSuite`;
- }
-
- get updateSession(): string {
- return `${this.saveUrl}/updateSession`;
- }
-
- get addAttachmentForEntity(): string {
- return `${this.saveUrl}/addAttachmentForEntity`;
- }
-
- get writeAttachmentForEntity(): string {
- return `${this.writeUrl}/addAttachmentForEntity`;
- }
-
- feed(
- feedURL: string,
- feedJSON: object | null,
- keyToBeStored?: null | string,
- dynamicKeys?: () => object,
- ) {
- this.lock.acquire(
- this.lockString,
- async () => {
- if (keyToBeStored !== 'session'
- && this.idMapped.session === undefined) {
- logger.warn(
- '๐ We cannot send requests for any register / mark requests before registering a session',
- );
- }
- const payload = feedJSON || (dynamicKeys ? dynamicKeys() : {});
- logger.info(
- `๐ Faxing, ${feedURL} with payload ๐: ${JSON.stringify(
- payload,
- )}`,
- );
- await superagent.put(feedURL)
- .send(JSON.stringify(payload))
- .on('response', (result) => {
- const { text, ok } = result;
- if (!ok) {
- logger.error(
- `Server rejected the request ๐
sent through ${feedURL} with payload ๐: ${JSON.stringify(
- feedJSON,
- )} and attached a note: ${text}`,
- );
- return;
- }
-
- logger.info(`Server accepted ๐ the request and attached a note: ${text}`);
- if (keyToBeStored) {
- logger.info(
- `Storing received response key [${keyToBeStored}] ๐ซ as ${text}`,
- );
- this.idMapped[keyToBeStored] = String(text);
- }
- });
- },
- ).catch((reason) => {
- logger.error(
- `๐ Failed to send or read the request send through URL: ${feedURL} with payload ๐: ${JSON.stringify(
- feedJSON,
- )} because of ${reason?.message ?? reason}`,
- );
- });
- }
-
- requestRegisterSession(sessionPayload: RegisterSession) {
- this.feed(this.registerSession, sessionPayload, 'session');
- }
-
- requestRegisterTestEntity(
- entityID: string,
- payload: RegisterTestEntity | (() => RegisterTestEntity),
- ) {
- const isCallable = typeof payload === 'function';
- this.feed(
- this.registerSuite,
- isCallable ? null : payload,
- entityID,
- isCallable ? payload : undefined,
- );
- }
-
- markTestEntity(entityID: string, payload: MarkTestEntity | (() => MarkTestEntity)) {
- const isCallable = typeof payload === 'function';
- this.feed(
- this.updateSuite,
- isCallable ? null : payload,
- entityID,
- isCallable ? payload : undefined,
- );
- }
-
- markTestSession(entityID: string, payload: MarkTestSession | (() => MarkTestSession)) {
- const isCallable = typeof payload === 'function';
- this.feed(
- this.updateSession,
- isCallable ? null : payload,
- entityID,
- isCallable ? payload : undefined,
- );
- }
-
- async attachScreenshot(
- title: string,
- content: string, // can be base64 encoded string
- entity_id: string,
- description?:string,
- ) {
- if (!entity_id) {
- logger.warn('๐ Skipping!, we have not attached a screenshot for unknown entity');
- return false;
- }
- const payload = JSON.stringify({
- description,
- title,
- value: content,
- type: 'PNG',
- entityID: entity_id,
- });
-
- const resp = await superagent
- .put(this.writeAttachmentForEntity)
- .send(payload)
- .on('response', (result) => {
- if (result.ok) {
- logger.info(`๐ธ Attached a screenshot [PNG], id: ${result.text} for: ${entity_id}`);
- } else {
- logger.error(`๐ Failed to attach screenshot for ${entity_id}, because of ${result?.text}`);
- }
- });
-
- return resp.text;
- }
-
- async addDescription(
- content: string,
- entity_id: string,
- ) {
- if (!entity_id) {
- logger.warn('๐ Skipping!, we have not added a description for unknown entity');
- return false;
- }
- const payload = JSON.stringify({
- value: content,
- type: 'DESC',
- entityID: entity_id,
- });
-
- const resp = await superagent
- .put(this.addAttachmentForEntity)
- .send(payload)
- .on('response', (result) => {
- if (result.ok) {
- logger.info(`๐ Added Description for ${entity_id}`);
- } else {
- logger.error(`๐ Failed to add description for ${entity_id}, because of ${result?.text}`);
- }
- });
-
- return resp?.ok;
- }
-
- async addLink(
- url: string,
- title: string,
- entity_id: string,
- ) {
- if (!entity_id) {
- logger.warn('๐ Skipping!, we have not added a link for unknown entity');
- return false;
- }
- const payload = JSON.stringify({
- title,
- value: url,
- type: 'LINK',
- entityID: entity_id,
- });
-
- const resp = await superagent
- .put(this.addAttachmentForEntity)
- .send(payload)
- .on('response', (result) => {
- if (result.ok) {
- logger.info(`Attached a ๐ Link for ${entity_id}`);
- } else {
- logger.error(`๐ Failed to attach a link: ${url} for ${entity_id}, because of ${result?.text}`);
- }
- });
-
- return resp?.ok;
- }
-
- async addAssertion(
- assertion: Assertion,
- entity_id: string,
- ) {
- if (!entity_id) {
- logger.warn('๐ Skipping!, we have not added a link for unknown entity');
- return false;
- }
- const payload = JSON.stringify({
- type: 'ASSERT',
- value: JSON.stringify(assertion),
- entityID: entity_id,
- title: assertion.matcherName,
- });
-
- const resp = await superagent
- .put(this.addAttachmentForEntity)
- .send(payload)
- .on('response', (result) => {
- if (result.ok) {
- logger.info(`Added an ๐งช assertion: ${assertion.matcherName} for ${entity_id}`);
- } else {
- logger.error(`๐ Failed to attach an assertion; ${assertion.matcherName} for ${entity_id}, because of ${result?.text}`);
- }
- });
-
- return resp?.ok;
- }
-}
diff --git a/graspit-reporters/packages/graspit-commons/tests/graspit.test.ts b/graspit-reporters/packages/graspit-commons/tests/graspit.test.ts
deleted file mode 100644
index 2142c043..00000000
--- a/graspit-reporters/packages/graspit-commons/tests/graspit.test.ts
+++ /dev/null
@@ -1,228 +0,0 @@
-import {
- describe,
- expect,
- beforeAll,
- test,
- afterAll,
- jest,
-} from '@jest/globals';
-import { type ChildProcess } from 'node:child_process';
-import {
- setTimeout,
- setInterval,
- clearTimeout,
- clearInterval,
-} from 'node:timers';
-import { existsSync, rmSync } from 'node:fs';
-import { join, dirname } from 'node:path';
-import { ReporterDialPad, ServiceDialPad } from '../src';
-
-const port = 6969;
-const root = dirname(dirname(dirname(process.cwd())));
-const service = new ServiceDialPad(port);
-describe('Asserting the scenario when the server was not started yet', () => {
- jest.setTimeout(3e3);
-
- it('ping now', async () => {
- await expect(await service.ping()).toBe(false);
- });
-
- it('expect for failure message when the server has not started yet.', async () => {
- // so when this throws error, you will go forward.
- await expect(async () => service.waitUntilItsReady(1e3)).rejects.toThrow('Not able to connect with graspit-server within');
- });
-});
-
-// HERE our aim is to test the common service and any helper functions provided
-// we assume that if a valid request is sent to the graspit server
-// it would do what it was supposed to
-// (like saving to db or adding relevant task or calculate some info).
-
-describe('verifying if we are able to start graspit server', () => {
- jest.setTimeout(10e3);
- const testResults = join(root, 'jest-init-tests');
- const results = join(root, 'test-jest-reports');
- let pyProcess: ChildProcess;
-
- // for terminating the server if things do downhill
- async function safeSide() {
- await service.terminateServer();
- if (existsSync(testResults)) {
- rmSync(testResults, {
- recursive: true,
- retryDelay: 200,
- maxRetries: 3,
- });
- }
- if (existsSync(results)) {
- rmSync(results, {
- recursive: true,
- retryDelay: 200,
- maxRetries: 3,
- });
- }
- }
-
- afterAll(safeSide);
- process.on('exit', safeSide);
-
- // starting the python service
- beforeAll(async () => {
- expect(service.exePath).not.toBeUndefined();
-
- pyProcess = service.startService('jest-test', testResults, root);
- expect(service.pyProcess).not.toBeUndefined();
-
- await service.waitUntilItsReady();
- });
-
- describe('Verifying the functionality of the service', () => {
- test('test the save url', () => {
- expect(service.saveUrl).toEqual(`http://127.0.0.1:${port}/save`);
- });
-
- test("assert the process's pid", () => {
- expect(typeof pyProcess.pid).toBe('number');
- });
-
- test('valid ping', async () => {
- await expect(await service.ping()).toBeTruthy();
- });
-
- test('testing the presence of the database', () => {
- expect(existsSync(testResults)).toBeTruthy();
- expect(
- existsSync(join(testResults, 'TeStReSuLtS.db')),
- ).toBeTruthy();
- });
- });
-
- describe('Verifying the functionality of the reporter', () => {
- const reporter = new ReporterDialPad(port, 10e3);
- const testKey = 'dummy-test';
-
- async function waitForLock(key: string) {
- await new Promise((resolve, reject) => {
- let timer: NodeJS.Timeout;
-
- const bomb = setTimeout(() => {
- clearInterval(timer);
- reject(new Error('Failed to register session in time'));
- }, 10e3);
-
- timer = setInterval(async () => {
- const isOnline = reporter.idMapped[key]?.length > 0;
- if (isOnline) {
- clearTimeout(bomb);
- clearInterval(timer);
- resolve({});
- }
- }, 3e3);
- });
- }
-
- test('verifying the save url for the reporter', () => {
- expect(reporter.saveUrl).toBe(`http://127.0.0.1:${port}/save`);
- });
-
- test('verifying endpoint for registering session', async () => {
- expect(reporter.idMapped.session).toBeUndefined();
- reporter.requestRegisterSession({
- retried: 0,
- started: new Date().toISOString(),
- specs: ['test.spec.ts'],
- });
- expect(reporter.idMapped.session).toBeUndefined();
- expect(reporter.lock.isBusy()).toBeTruthy();
- await waitForLock('session');
-
- expect(reporter.lock.isBusy()).toBeFalsy();
- });
- test('creating dummy test', async () => {
- expect(reporter.idMapped[testKey]).toBeUndefined();
- reporter.requestRegisterTestEntity(testKey, {
- title: 'sample-test',
- description: 'dummy-test',
- suiteType: 'TEST',
- parent: '',
- session_id: reporter.idMapped.session as string,
- file: 'test.spec.ts',
- started: new Date().toISOString(),
- retried: 0,
- tags: [],
- });
-
- await waitForLock(testKey);
-
- expect(reporter.idMapped[testKey]).not.toBeUndefined();
- });
-
- test.failing(
- 'test for acceptance of ISO string for date-time not UTC ones',
- async () => {
- const failedKey = `${testKey}-failed`;
- reporter.feed(
- reporter.registerSuite,
- {
- title: 'sample-test',
- description: 'dummy-test',
- suiteType: 'TEST',
- parent: '',
- retried: 0,
- started: new Date().toUTCString(),
- session_id: reporter.idMapped.session,
- file: 'test.spec.ts',
- standing: 'PENDING',
- tags: [],
- },
- failedKey,
- );
- await waitForLock(failedKey);
- },
- );
-
- test('verifying additional Requests if no entity id was provided', async () => {
- expect(await reporter.addDescription('test-description', '')).toBe(
- false,
- );
- expect(
- await reporter.attachScreenshot('test-attach', '', '', ''),
- ).toBe(false);
- });
-
- test('verifying additional Requests if entity id was provided', async () => {
- expect(
- await reporter.addDescription(
- 'test-description',
- reporter.idMapped[testKey],
- ),
- ).toBe(true);
- const raw = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQW7H8AAAAwUlEQVR42mL8/9/v1n7mJ6yoaGhq...';
- const attachmentId = (await reporter.attachScreenshot(
- 'test-attach',
- raw,
- reporter.idMapped[testKey],
- 'test-description',
- )) as string;
- expect(attachmentId.length).toBeGreaterThan(2);
- });
- });
-
- describe('verifying report generation', () => {
- it('test mark test completion', async () => {
- await service.markTestRunCompletion();
- // aim is to not observe if this request fails / passes
- // but to check if it doesn't fail due to server termination
- // because we are expecting server to be online even at this point
- });
- it('skipping the patch would also skip the report generation', () => {
- service.generateReport(testResults, root, results, 2, true);
- expect(existsSync(results)).toBe(false);
- });
-
- it('test patch only', () => {
- service.generateReport(testResults, root, undefined, 1, false, 1e3);
- expect(existsSync(results)).toBe(false);
- });
- });
-});
diff --git a/graspit-reporters/packages/graspit-dashboard/CHANGELOG.md b/graspit-reporters/packages/graspit-dashboard/CHANGELOG.md
deleted file mode 100644
index 736a03a2..00000000
--- a/graspit-reporters/packages/graspit-dashboard/CHANGELOG.md
+++ /dev/null
@@ -1,181 +0,0 @@
-# graspit
-
-## 3.4.4
-
-### Patch Changes
-
-- fixed styling issues
-
-## 3.4.3
-
-### Patch Changes
-
-- fix chart folder name
-
-## 3.4.2
-
-### Patch Changes
-
-- fix: eslint issues
-
-## 3.4.1
-
-### Patch Changes
-
-- build before publish
-
-## 3.4.0
-
-### Minor Changes
-
-- refractor: eslint fixes
-
-## 3.3.1
-
-### Patch Changes
-
-- fix type issues in gantt charts
-
-## 3.3.0
-
-### Minor Changes
-
-- feat: migrated to echarts
-
-## 3.2.0
-
-### Minor Changes
-
-- added support for links and assertions
-
-## 3.1.6
-
-### Patch Changes
-
-- handled permission and attached links
-
-## 3.1.5
-
-### Patch Changes
-
-- added built antd script
-
-## 3.1.4
-
-### Patch Changes
-
-- fix: query for fetching related runs, sorted it
-
-## 3.1.3
-
-### Patch Changes
-
-- support server-build 0.12.4
-
-## 3.1.2
-
-### Patch Changes
-
-- support server patch for exporting results
-
-## 3.1.1
-
-### Patch Changes
-
-- bump package version
-
-## 3.1.0
-
-### Minor Changes
-
-- test e2e
-
-## 3.0.6
-
-### Patch Changes
-
-- planned tests for graspit installation
-
-## 3.0.5
-
-### Patch Changes
-
-- fix the way we would name the downloaded executable for windows
-
-## 3.0.4
-
-### Patch Changes
-
-- take 4 for package installation
-
-## 3.0.3
-
-### Patch Changes
-
-- take 3 for installation test
-
-## 3.0.2
-
-### Patch Changes
-
-- Minor Patch for pre-build installation
-
-## 3.0.1
-
-### Patch Changes
-
-- ignoring the build
-
-## 3.0.0
-
-### Major Changes
-
-- working on the release
-
-## 2.2.2
-
-### Patch Changes
-
-- replaced the sv icons with the png ones
-
-## 2.2.1
-
-### Patch Changes
-
-- updated dependant packages, skipping mark session if the session id is undefined which would happen if a spec file was missed [observed in webdriverio]
-
-## 2.2.0
-
-### Minor Changes
-
-- renamed browser to entity in the sessionbase, made changes to replicate the same on UI side and we have moved sending the details reg. session from register to mark in webdriverio
-
-## 2.1.0
-
-### Minor Changes
-
-- Registering a test case which was skipped expliclity, minor improvements for the dashboard
-
-## 2.0.1
-
-### Patch Changes
-
-- Added cross env way of activating venv created
-
-## 2.0.0
-
-### Major Changes
-
-- Added Export Command for the graspit dashboard now we do not lint the export files at the time of export and also do not generate the css file on production, this can save some time for report generation.
-
-## 1.1.0
-
-### Minor Changes
-
-- Improved the Import paths and types for the reporter for webdriverio
-
-## 1.0.0
-
-### Major Changes
-
-- Merged tsconfig with graspit-commons and moved certain methods to graspit commons so we can avoid replicating few things for creating a nodejs based plugins
diff --git a/graspit-reporters/packages/graspit-dashboard/public/favicon.ico b/graspit-reporters/packages/graspit-dashboard/public/favicon.ico
deleted file mode 100644
index 718d6fea..00000000
Binary files a/graspit-reporters/packages/graspit-dashboard/public/favicon.ico and /dev/null differ
diff --git a/graspit-reporters/packages/graspit-dashboard/src/styles/globals.css b/graspit-reporters/packages/graspit-dashboard/src/styles/globals.css
deleted file mode 100644
index 1ce87bd3..00000000
--- a/graspit-reporters/packages/graspit-dashboard/src/styles/globals.css
+++ /dev/null
@@ -1,55 +0,0 @@
-@import url('./antd.min.css');
-
-:root {
- --card-color: #121212;
- --background-color: #262626;
- color-scheme: dark;
- --bg: oklch(35% 0.3 var(--hue));
- --text: oklch(85% 0.1 var(--hue));
- --shadow: oklch(25% 0.2 var(--hue));
- --highlight: oklch(98% 0.05 var(--hue));
-}
-
-* {
- box-sizing: border-box;
- padding: 0;
- margin: 0;
-}
-
-::selection {
- color: lightyellow;
- background-color: orangered;
-}
-
-::-moz-selection {
- color: lightyellow;
- background-color: orangered;
-}
-::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
- border-radius: 10px;
- background-color: transparent;
-}
-
-div#__next,
-main,
-html,
-body {
- max-width: 100vw;
- height: 100%;
- overflow: hidden;
-}
-/* div.ant-tabs {
- background-image: radial-gradient(rgb(236, 236, 236) 1px, transparent 0);
- background-size: 20px 20px;
- background-position: -19px -19px;
-} */
-
-::-webkit-scrollbar {
- width: 6px; /* Width of the scrollbar track */
-}
-
-::-webkit-scrollbar-thumb {
- background-color: #888; /* Color of the scrollbar thumb */
- border-radius: 6px; /* Rounded corners for the thumb */
-}
diff --git a/graspit-reporters/packages/graspit-dashboard/src/styles/highChartExternal.module.css b/graspit-reporters/packages/graspit-dashboard/src/styles/highChartExternal.module.css
deleted file mode 100644
index 9d2b58dd..00000000
--- a/graspit-reporters/packages/graspit-dashboard/src/styles/highChartExternal.module.css
+++ /dev/null
@@ -1 +0,0 @@
-@import url(https://code.highcharts.com/7.0.0/css/themes/dark-unica.css);
diff --git a/graspit-reporters/packages/graspit-dashboard/test-export.ps1 b/graspit-reporters/packages/graspit-dashboard/test-export.ps1
deleted file mode 100644
index 540626f4..00000000
--- a/graspit-reporters/packages/graspit-dashboard/test-export.ps1
+++ /dev/null
@@ -1 +0,0 @@
-python -m http.server -d ./dist
\ No newline at end of file
diff --git a/graspit-reporters/packages/wdio-graspit-reporter/package.json b/graspit-reporters/packages/wdio-graspit-reporter/package.json
deleted file mode 100644
index 5a8bcce5..00000000
--- a/graspit-reporters/packages/wdio-graspit-reporter/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "wdio-graspit-reporter",
- "version": "3.4.4",
- "types": "./dist/index.d.ts",
- "main": "./dist/index.cjs",
- "module": "./dist/index.js",
- "type": "module",
- "private": false,
- "license": "MIT",
- "readme": "../../README.md",
- "description": "This package is a reporter that sends the test data from your webdriverIO test run to your local graspit server which is then displayed by our graspit-dashboard",
- "scripts": {
- "lint": "eslint src/**",
- "build": "rimraf -g ./dist && tsup src/index.ts --format esm,cjs --dts && node build.cjs"
- },
- "dependencies": {
- "@wdio/reporter": "^8.24.2",
- "@wdio/types": "^8.24.2",
- "log4js": "^6.9.1",
- "superagent": "^8.1.2",
- "graspit-commons": "3.4.4"
- },
- "devDependencies": {
- "@types/async-lock": "^1.4.2",
- "@types/superagent": "^4.1.24",
- "@types/node": "^20.10.0"
- }
-}
diff --git a/graspit-reporters/packages/wdio-graspit-reporter/src/index.ts b/graspit-reporters/packages/wdio-graspit-reporter/src/index.ts
deleted file mode 100644
index 33583d4f..00000000
--- a/graspit-reporters/packages/wdio-graspit-reporter/src/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import GraspItService from './service';
-import GraspItReporter from './reporter';
-
-export default GraspItReporter;
-export * from './types';
-export const launcher = GraspItService;
-export * from './helpers';
diff --git a/graspit/services/CommandLine/migrate.py b/graspit/services/CommandLine/migrate.py
deleted file mode 100644
index 62676641..00000000
--- a/graspit/services/CommandLine/migrate.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# @handle_cli.group()
-# def db_version():
-# pass
-
-
-# @db_version.command()
-# @argument("path", nargs=1, type=C_Path(exists=True, dir_okay=True), required=True)
-# def check(path: str):
-# return check_version(db_path(Path(path)))
-#
-#
-# @db_version.command()
-# @argument("path", nargs=1, type=C_Path(exists=True, dir_okay=True), required=True)
-# def migrate(path: str):
-# return initiate_migration(db_path(Path(path)))
diff --git a/graspit/services/DBService/__init__.py b/graspit/services/DBService/__init__.py
deleted file mode 100644
index ec399c4f..00000000
--- a/graspit/services/DBService/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-DB_VERSION = 3
diff --git a/graspit/services/DBService/migration.py b/graspit/services/DBService/migration.py
deleted file mode 100644
index b1e04d20..00000000
--- a/graspit/services/DBService/migration.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from sqlite3.dbapi2 import Connection
-
-
-# 2
-def revert_v3(connection: Connection):
- connection.executescript(
- "ALTER TABLE sessionbase DELETE COLUMN previous;"
- "ALTER TABLE suitebase DELETE COLUMN previous;"
- )
-
-
-def v3(connection: Connection):
- connection.executescript(
- "ALTER TABLE sessionbase ADD COLUMN previous TEXT;"
- "ALTER TABLE suitebase ADD COLUMN previous TEXT;"
- )
diff --git a/graspit/services/DBService/migrator.py b/graspit/services/DBService/migrator.py
deleted file mode 100644
index 412ced50..00000000
--- a/graspit/services/DBService/migrator.py
+++ /dev/null
@@ -1,102 +0,0 @@
-from sqlite3 import connect
-from graspit.services.DBService import DB_VERSION
-from sqlite3.dbapi2 import Connection
-from typing import Optional, Tuple
-from pathlib import Path
-from loguru import logger
-
-
-def check_version(
- path: Path, connection: Optional[Connection] = None
-) -> Tuple[Optional[str], Connection]:
- connection = connection if connection else connect(path)
- query = "select value from configbase where key = 'VERSION'"
-
- result = connection.execute(query).fetchone()
-
- if not result:
- logger.warning(
- "Could not find the version, please either the delete the DB or raise an issue if required."
- )
- else:
- satisfied = int(result[0]) == DB_VERSION
- logger.log(
- "INFO" if satisfied else "WARNING",
- "Found version: v{} and required is v{}",
- result[0],
- DB_VERSION,
- )
- if not satisfied:
- logger.warning(
- "Requires migration, Please run 'graspit db-version migrate'"
- )
- return result[0] if result else result, connection
-
-
-def initiate_migration(path: Path, aim=DB_VERSION):
- connection = connect(path)
-
- while True:
- _actual_version, _ = check_version(path, connection)
- if not _actual_version:
- return
-
- actual_version = int(_actual_version)
- if actual_version == aim:
- logger.info("Migration completed")
- break
-
- logger.warning(
- "Starting Migration as we found the version to be of v{} but required is v{}",
- actual_version,
- DB_VERSION,
- )
- new_version = actual_version + (-1 if aim < actual_version else 1)
-
- result = (
- revert(connection, new_version)
- if aim < actual_version
- else bump(connection, new_version)
- )
- if result:
- return
-
- connection.execute(
- "update configbase set value = ? where key = 'VERSION'", (new_version,)
- )
- connection.commit()
-
- logger.info(
- "Migration is successful from v{} to v{}", actual_version, new_version
- )
-
- connection.close()
-
-
-# def revert(connection: Connection, new_version: int) -> bool:
-# match new_version:
-# case 1:
-# revert_v2(connection)
-#
-# case _:
-# logger.error(
-# "Could not revert, Found the version: v{} but this is not a valid version",
-# new_version,
-# )
-# return True
-#
-# return False
-#
-#
-# def bump(connection: Connection, new_version: int) -> bool:
-# match new_version:
-# case 2:
-# v2(connection)
-#
-# case _:
-# logger.error(
-# "Could not bump version, Found the version: v{} but this is not a valid version",
-# new_version,
-# )
-# return True
-# return False
diff --git a/graspit/services/DBService/models/config_base.py b/graspit/services/DBService/models/config_base.py
deleted file mode 100644
index e20dbf57..00000000
--- a/graspit/services/DBService/models/config_base.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from tortoise.models import Model
-from graspit.services.SchedularService.constants import JobType
-from graspit.services.DBService.models.enums import ConfigKeys
-from tortoise.fields import (
- IntField,
- CharEnumField,
- CharField,
- TextField,
- UUIDField,
-)
-
-
-class JobBase(Model):
- table = "JobBase"
- jobID = CharEnumField(
- JobType, null=False, description="Type of job we would like to run"
- )
- interval = IntField(
- null=True,
- default=10,
- description="Interval configured for the job triggered in intervals (s)",
- )
- instances = IntField(
- null=True,
- default=1,
- description="Number of parallel instances to run jobs triggered in intervals",
- )
- name = CharField(max_length=30, description="Any name you wanted to use for a job")
-
-
-class ConfigBase(Model):
- key = CharEnumField(
- ConfigKeys, pk=True, null=False, description="Type of job we would like to run"
- )
- value = TextField(null=False, description="Handling type is upto us")
-
-
-class ExportBase(Model):
- ticketID = UUIDField(pk=True)
- maxTestRuns = IntField(
- null=True,
- default=10,
- description="Number of test runs to export [recent ones are picked]",
- )
diff --git a/graspit/services/Endpoints/core.py b/graspit/services/Endpoints/core.py
deleted file mode 100644
index 773fcdcc..00000000
--- a/graspit/services/Endpoints/core.py
+++ /dev/null
@@ -1,17 +0,0 @@
-from graspit.services.Endpoints.internalEndpoints import one_liners
-from graspit.services.DBService.getThings import get_service
-from graspit.services.DBService.shared import app_name
-from graspit.services.Endpoints.blueprints.coreEndpoints import service
-from graspit.services.Endpoints.blueprints.writeServices import writeServices
-from graspit.services.Endpoints.errorHandling import handle_validation_error
-from sanic import Sanic
-from pydantic import ValidationError
-
-service_provider = Sanic(app_name)
-service_provider.config.TOUCHUP = False
-service_provider.blueprint(one_liners)
-service_provider.blueprint(service)
-service_provider.blueprint(writeServices)
-service_provider.blueprint(get_service)
-
-service_provider.error_handler.add(ValidationError, handle_validation_error)
diff --git a/graspit-reporters/.changeset/README.md b/handshake-nodejs-reporters/.changeset/README.md
similarity index 100%
rename from graspit-reporters/.changeset/README.md
rename to handshake-nodejs-reporters/.changeset/README.md
diff --git a/graspit-reporters/.changeset/config.json b/handshake-nodejs-reporters/.changeset/config.json
similarity index 76%
rename from graspit-reporters/.changeset/config.json
rename to handshake-nodejs-reporters/.changeset/config.json
index b7d3b650..cf7c1dda 100644
--- a/graspit-reporters/.changeset/config.json
+++ b/handshake-nodejs-reporters/.changeset/config.json
@@ -3,7 +3,7 @@
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
- "linked": [["wdio-graspit-reporter", "graspit-commons", "graspit"]],
+ "linked": [["wdio-handshake-reporter", "common-handshakes", "handshake-dashboard"]],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
diff --git a/graspit-reporters/.gitignore b/handshake-nodejs-reporters/.gitignore
similarity index 100%
rename from graspit-reporters/.gitignore
rename to handshake-nodejs-reporters/.gitignore
diff --git a/graspit-reporters/.npmrc b/handshake-nodejs-reporters/.npmrc
similarity index 100%
rename from graspit-reporters/.npmrc
rename to handshake-nodejs-reporters/.npmrc
diff --git a/graspit-reporters/apps/graspit-docs/.eslintrc b/handshake-nodejs-reporters/apps/graspit-docs/.eslintrc
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/.eslintrc
rename to handshake-nodejs-reporters/apps/graspit-docs/.eslintrc
diff --git a/graspit-reporters/apps/graspit-docs/.vscode/launch.json b/handshake-nodejs-reporters/apps/graspit-docs/.vscode/launch.json
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/.vscode/launch.json
rename to handshake-nodejs-reporters/apps/graspit-docs/.vscode/launch.json
diff --git a/graspit-reporters/apps/graspit-docs/.vscode/settings.json b/handshake-nodejs-reporters/apps/graspit-docs/.vscode/settings.json
similarity index 91%
rename from graspit-reporters/apps/graspit-docs/.vscode/settings.json
rename to handshake-nodejs-reporters/apps/graspit-docs/.vscode/settings.json
index bbeb3917..6ded02ce 100644
--- a/graspit-reporters/apps/graspit-docs/.vscode/settings.json
+++ b/handshake-nodejs-reporters/apps/graspit-docs/.vscode/settings.json
@@ -8,7 +8,7 @@
"eslint.lintTask.enable": true,
"eslint.enable": true,
"editor.codeActionsOnSave": {
- "source.fixAll": true
+ "source.fixAll": "explicit"
},
"eslint.validate": ["typescript"]
}
diff --git a/graspit-reporters/apps/graspit-docs/next-env.d.ts b/handshake-nodejs-reporters/apps/graspit-docs/next-env.d.ts
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/next-env.d.ts
rename to handshake-nodejs-reporters/apps/graspit-docs/next-env.d.ts
diff --git a/graspit-reporters/apps/graspit-docs/next.config.js b/handshake-nodejs-reporters/apps/graspit-docs/next.config.js
similarity index 88%
rename from graspit-reporters/apps/graspit-docs/next.config.js
rename to handshake-nodejs-reporters/apps/graspit-docs/next.config.js
index 20b097fb..c809d8d7 100644
--- a/graspit-reporters/apps/graspit-docs/next.config.js
+++ b/handshake-nodejs-reporters/apps/graspit-docs/next.config.js
@@ -6,7 +6,7 @@ const withNextra = require('nextra')({
/** @type {import('next').NextConfig} */
const nextConfig = {
- transpilePackages: ['graspit'],
+ transpilePackages: ['handshake'],
typescript: {
tsconfigPath: "./tsconfig.json"
}
diff --git a/graspit-reporters/apps/graspit-docs/package.json b/handshake-nodejs-reporters/apps/graspit-docs/package.json
similarity index 73%
rename from graspit-reporters/apps/graspit-docs/package.json
rename to handshake-nodejs-reporters/apps/graspit-docs/package.json
index 6896782a..d128eca1 100644
--- a/graspit-reporters/apps/graspit-docs/package.json
+++ b/handshake-nodejs-reporters/apps/graspit-docs/package.json
@@ -13,21 +13,21 @@
"author": "",
"license": "ISC",
"dependencies": {
- "@mdx-js/loader": "^2.3.0",
- "@mdx-js/react": "^2.3.0",
- "@next/mdx": "^13.5.4",
- "antd": "^5.9.4",
- "graspit": "*",
- "highcharts": "^11.1.0",
+ "@mdx-js/loader": "^3.0.0",
+ "@mdx-js/react": "^3.0.0",
+ "@next/mdx": "^14.0.3",
+ "antd": "^5.11.5",
+ "graspit": "3.4.6",
+ "highcharts": "^11.2.0",
"highcharts-react-official": "^3.2.1",
- "next": "^13.5.4",
+ "next": "^14.0.3",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
- "@types/mdx": "^2.0.8",
+ "@types/mdx": "^2.0.10",
"eslint-plugin-mdx": "^2.2.0"
}
}
diff --git a/graspit-reporters/apps/graspit-docs/pages/Advanced/_meta.json b/handshake-nodejs-reporters/apps/graspit-docs/pages/Advanced/_meta.json
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Advanced/_meta.json
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Advanced/_meta.json
diff --git a/graspit-reporters/apps/graspit-docs/pages/Advanced/configuration.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/Advanced/configuration.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Advanced/configuration.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Advanced/configuration.mdx
diff --git a/graspit-reporters/apps/graspit-docs/pages/Contribution/_meta.json b/handshake-nodejs-reporters/apps/graspit-docs/pages/Contribution/_meta.json
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Contribution/_meta.json
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Contribution/_meta.json
diff --git a/graspit-reporters/apps/graspit-docs/pages/Contribution/branches.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/Contribution/branches.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Contribution/branches.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Contribution/branches.mdx
diff --git a/graspit-reporters/apps/graspit-docs/pages/Contribution/monorepo.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/Contribution/monorepo.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Contribution/monorepo.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Contribution/monorepo.mdx
diff --git a/graspit-reporters/apps/graspit-docs/pages/Supported/_meta.json b/handshake-nodejs-reporters/apps/graspit-docs/pages/Supported/_meta.json
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Supported/_meta.json
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Supported/_meta.json
diff --git a/graspit-reporters/apps/graspit-docs/pages/Supported/webdriverio.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/Supported/webdriverio.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/Supported/webdriverio.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/Supported/webdriverio.mdx
diff --git a/graspit-reporters/apps/graspit-docs/pages/_app.tsx b/handshake-nodejs-reporters/apps/graspit-docs/pages/_app.tsx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/_app.tsx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/_app.tsx
diff --git a/graspit-reporters/apps/graspit-docs/pages/_meta.json b/handshake-nodejs-reporters/apps/graspit-docs/pages/_meta.json
similarity index 88%
rename from graspit-reporters/apps/graspit-docs/pages/_meta.json
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/_meta.json
index 3a575f9e..e839f965 100644
--- a/graspit-reporters/apps/graspit-docs/pages/_meta.json
+++ b/handshake-nodejs-reporters/apps/graspit-docs/pages/_meta.json
@@ -1,6 +1,6 @@
{
"index": "Introduction",
- "server": "",
+ "check": "",
"plugins": "",
"dashboard": "",
"Advanced": "",
diff --git a/handshake-nodejs-reporters/apps/graspit-docs/pages/check.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/check.mdx
new file mode 100644
index 00000000..2cc6c379
--- /dev/null
+++ b/handshake-nodejs-reporters/apps/graspit-docs/pages/check.mdx
@@ -0,0 +1,17 @@
+import SetupSteps from "pages/components/setupSteps";
+import Alert from "antd/lib/alert/Alert";
+import Tag from "antd/lib/tag/index";
+import Space from "antd/lib/space/index";
+
+<>
+
+ Important
+ Pre-requisite
+
+
+>
+
+## Intro
+
+**Graspit** relies on the executable released on [graspit repo](https://github.com/RahulARanger/graspit/releases).
+It might have covered your system too. but do let us know if you face any problems.
diff --git a/graspit-reporters/apps/graspit-docs/pages/components/branch.tsx b/handshake-nodejs-reporters/apps/graspit-docs/pages/components/branch.tsx
similarity index 96%
rename from graspit-reporters/apps/graspit-docs/pages/components/branch.tsx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/components/branch.tsx
index 4da979c2..e6f8865b 100644
--- a/graspit-reporters/apps/graspit-docs/pages/components/branch.tsx
+++ b/handshake-nodejs-reporters/apps/graspit-docs/pages/components/branch.tsx
@@ -31,7 +31,7 @@ export default function BranchStructure() {
events: {
click: function (event: PointClickEventObject) {
window.open(
- `https://github.com/RahulARanger/graspit/tree/${event.point.options.id}`,
+ `https://github.com/RahulARanger/handshake/tree/${event.point.options.id}`,
"_blank"
);
},
diff --git a/handshake-nodejs-reporters/apps/graspit-docs/pages/components/preview.tsx b/handshake-nodejs-reporters/apps/graspit-docs/pages/components/preview.tsx
new file mode 100644
index 00000000..e0f345f7
--- /dev/null
+++ b/handshake-nodejs-reporters/apps/graspit-docs/pages/components/preview.tsx
@@ -0,0 +1,23 @@
+import GalleryOfImages, {
+ CardForAImage,
+} from "graspit/src/components/utils/images-with-thumbnails";
+
+import type { ReactNode } from "react";
+import React from "react";
+
+export default function PreviewForMotivation(props: {
+ images: Array<{ title: string; url: string }>;
+}): ReactNode {
+ return (
+
+ {props.images.map((image, index) => (
+
+ ))}
+
+ );
+}
diff --git a/graspit-reporters/apps/graspit-docs/pages/components/setupSteps.tsx b/handshake-nodejs-reporters/apps/graspit-docs/pages/components/setupSteps.tsx
similarity index 77%
rename from graspit-reporters/apps/graspit-docs/pages/components/setupSteps.tsx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/components/setupSteps.tsx
index d0b2d33b..5680b4ca 100644
--- a/graspit-reporters/apps/graspit-docs/pages/components/setupSteps.tsx
+++ b/handshake-nodejs-reporters/apps/graspit-docs/pages/components/setupSteps.tsx
@@ -4,11 +4,8 @@ import Link from "antd/lib/typography/Link";
function stepStatus(forThis: number, current?: number) {
if (current == null) return "wait";
- return current === forThis
- ? "process"
- : current < forThis
- ? "wait"
- : "finish";
+ if (current === forThis) return "process";
+ return current < forThis ? "wait" : "finish";
}
export default function SetupSteps(props: { current?: number }) {
@@ -18,8 +15,9 @@ export default function SetupSteps(props: { current?: number }) {
current={props.current}
items={[
{
- title: Graspit Server,
- description: "Downloading Python & graspit package",
+ title: Check,
+ description:
+ "Check if there's direct reporter available for your framework",
status: stepStatus(0, props.current),
},
{
diff --git a/graspit-reporters/apps/graspit-docs/pages/dashboard.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/dashboard.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/dashboard.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/dashboard.mdx
diff --git a/graspit-reporters/apps/graspit-docs/pages/index.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/index.mdx
similarity index 52%
rename from graspit-reporters/apps/graspit-docs/pages/index.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/index.mdx
index f750ae4a..62c52245 100644
--- a/graspit-reporters/apps/graspit-docs/pages/index.mdx
+++ b/handshake-nodejs-reporters/apps/graspit-docs/pages/index.mdx
@@ -1,23 +1,12 @@
import SetupSteps from "pages/components/setupSteps";
-import PreviewForMotivation from "pages/components/Preview";
+import PreviewForMotivation from "pages/components/preview";
# Welcome to Graspit
-**Graspit** offers a service for saving your test results and creating a dashboard.
-This dashboard is generated using Next.js and Ant Design (antd),
-while our Python server, spun by Sanic, handles the storage and management of your test data.
-Your test results are stored in an SQLite3 database, and the dashboard is a static export of our Next.js project.
-
-## Quick Start
-
-For Getting Started with the setup, we could shorten it with three steps, please go through them one by one.
-
-
+**Graspit** makes it easy for you by saving your test results and creating a user-friendly dashboard.
## Gallery
-Some of the Screenshots from Dashboard
-
diff --git a/graspit-reporters/apps/graspit-docs/pages/plugins.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/plugins.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/plugins.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/plugins.mdx
diff --git a/graspit-reporters/apps/graspit-docs/pages/plugins/_meta.json b/handshake-nodejs-reporters/apps/graspit-docs/pages/plugins/_meta.json
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/plugins/_meta.json
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/plugins/_meta.json
diff --git a/graspit-reporters/apps/graspit-docs/pages/plugins/webdriverio.mdx b/handshake-nodejs-reporters/apps/graspit-docs/pages/plugins/webdriverio.mdx
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/pages/plugins/webdriverio.mdx
rename to handshake-nodejs-reporters/apps/graspit-docs/pages/plugins/webdriverio.mdx
diff --git a/graspit-reporters/apps/graspit-docs/public/db.png b/handshake-nodejs-reporters/apps/graspit-docs/public/db.png
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/public/db.png
rename to handshake-nodejs-reporters/apps/graspit-docs/public/db.png
diff --git a/graspit-reporters/apps/graspit-docs/public/grid.png b/handshake-nodejs-reporters/apps/graspit-docs/public/grid.png
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/public/grid.png
rename to handshake-nodejs-reporters/apps/graspit-docs/public/grid.png
diff --git a/graspit-reporters/apps/graspit-docs/public/overview.png b/handshake-nodejs-reporters/apps/graspit-docs/public/overview.png
similarity index 100%
rename from graspit-reporters/apps/graspit-docs/public/overview.png
rename to handshake-nodejs-reporters/apps/graspit-docs/public/overview.png
diff --git a/graspit-reporters/apps/graspit-docs/theme.config.jsx b/handshake-nodejs-reporters/apps/graspit-docs/theme.config.jsx
similarity index 51%
rename from graspit-reporters/apps/graspit-docs/theme.config.jsx
rename to handshake-nodejs-reporters/apps/graspit-docs/theme.config.jsx
index 75341481..3036a6d0 100644
--- a/graspit-reporters/apps/graspit-docs/theme.config.jsx
+++ b/handshake-nodejs-reporters/apps/graspit-docs/theme.config.jsx
@@ -1,9 +1,9 @@
import React from "react"
export default {
- logo: Graspit,
+ logo: Handshake,
project: {
- link: 'https://github.com/RahulARanger/graspit'
+ link: 'https://github.com/RahulARanger/handshake'
}
// ... other theme options
}
\ No newline at end of file
diff --git a/graspit-reporters/apps/graspit-docs/tsconfig.json b/handshake-nodejs-reporters/apps/graspit-docs/tsconfig.json
similarity index 86%
rename from graspit-reporters/apps/graspit-docs/tsconfig.json
rename to handshake-nodejs-reporters/apps/graspit-docs/tsconfig.json
index 5d9cdc6d..3e35fd55 100644
--- a/graspit-reporters/apps/graspit-docs/tsconfig.json
+++ b/handshake-nodejs-reporters/apps/graspit-docs/tsconfig.json
@@ -16,6 +16,6 @@
"jsx": "preserve",
"rootDir": "pages"
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "graspit/src"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "handshake/src"],
"exclude": ["node_modules"]
}
diff --git a/graspit-reporters/apps/test-wdio-cucumber/.vscode/settings.json b/handshake-nodejs-reporters/apps/test-wdio-cucumber/.vscode/settings.json
similarity index 100%
rename from graspit-reporters/apps/test-wdio-cucumber/.vscode/settings.json
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/.vscode/settings.json
diff --git a/graspit-reporters/apps/test-wdio-mocha/babel.config.js b/handshake-nodejs-reporters/apps/test-wdio-cucumber/babel.config.js
similarity index 81%
rename from graspit-reporters/apps/test-wdio-mocha/babel.config.js
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/babel.config.js
index e0412d22..64ebb4d6 100644
--- a/graspit-reporters/apps/test-wdio-mocha/babel.config.js
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/babel.config.js
@@ -4,7 +4,7 @@ module.exports = {
"@babel/preset-env",
{
"targets": {
- "node": 18
+ "node": "current"
}
}
]
diff --git a/graspit-reporters/apps/test-wdio-cucumber/features/login.feature b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/login.feature
similarity index 100%
rename from graspit-reporters/apps/test-wdio-cucumber/features/login.feature
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/features/login.feature
diff --git a/graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/login.page.js b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/login.page.ts
similarity index 71%
rename from graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/login.page.js
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/login.page.ts
index cbba788c..6ea47aed 100644
--- a/graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/login.page.js
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/login.page.ts
@@ -1,5 +1,5 @@
-const { $ } = require('@wdio/globals')
-const Page = require('./page');
+import { $ } from '@wdio/globals'
+import Page from './page.js';
/**
* sub page containing specific selectors and methods for a specific page
@@ -8,15 +8,15 @@ class LoginPage extends Page {
/**
* define selectors using getter methods
*/
- get inputUsername () {
+ public get inputUsername () {
return $('#username');
}
- get inputPassword () {
+ public get inputPassword () {
return $('#password');
}
- get btnSubmit () {
+ public get btnSubmit () {
return $('button[type="submit"]');
}
@@ -24,7 +24,7 @@ class LoginPage extends Page {
* a method to encapsule automation code to interact with the page
* e.g. to login using username and password
*/
- async login (username, password) {
+ public async login (username: string, password: string) {
await this.inputUsername.setValue(username);
await this.inputPassword.setValue(password);
await this.btnSubmit.click();
@@ -33,9 +33,9 @@ class LoginPage extends Page {
/**
* overwrite specific options to adapt it to page object
*/
- open () {
+ public open () {
return super.open('login');
}
}
-module.exports = new LoginPage();
+export default new LoginPage();
diff --git a/graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/page.js b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/page.ts
similarity index 75%
rename from graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/page.js
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/page.ts
index e522bd00..6a20f1ce 100644
--- a/graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/page.js
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/page.ts
@@ -1,15 +1,15 @@
-const { browser } = require('@wdio/globals')
+import { browser } from '@wdio/globals'
/**
* main page object containing all methods, selectors and functionality
* that is shared across all page objects
*/
-module.exports = class Page {
+export default class Page {
/**
* Opens a sub page of the page
* @param path path of the sub page (e.g. /path/to/page.html)
*/
- open (path) {
+ public open (path: string) {
return browser.url(`https://the-internet.herokuapp.com/${path}`)
}
}
diff --git a/graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/secure.page.js b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/secure.page.ts
similarity index 62%
rename from graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/secure.page.js
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/secure.page.ts
index 27d16269..3db02f43 100644
--- a/graspit-reporters/apps/test-wdio-cucumber/features/pageobjects/secure.page.js
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/pageobjects/secure.page.ts
@@ -1,5 +1,5 @@
-const { $ } = require('@wdio/globals')
-const Page = require('./page');
+import { $ } from '@wdio/globals'
+import Page from './page.js';
/**
* sub page containing specific selectors and methods for a specific page
@@ -8,9 +8,9 @@ class SecurePage extends Page {
/**
* define selectors using getter methods
*/
- get flashAlert () {
+ public get flashAlert () {
return $('#flash');
}
}
-module.exports = new SecurePage();
+export default new SecurePage();
diff --git a/graspit-reporters/apps/test-wdio-cucumber/features/step-definitions/steps.js b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/step-definitions/steps.ts
similarity index 66%
rename from graspit-reporters/apps/test-wdio-cucumber/features/step-definitions/steps.js
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/features/step-definitions/steps.ts
index 1a9767aa..dee4ebfa 100644
--- a/graspit-reporters/apps/test-wdio-cucumber/features/step-definitions/steps.js
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/features/step-definitions/steps.ts
@@ -1,8 +1,8 @@
-const { Given, When, Then } = require('@wdio/cucumber-framework');
-const { expect, $ } = require('@wdio/globals')
+import { Given, When, Then } from '@wdio/cucumber-framework';
+import { expect, $ } from '@wdio/globals'
-const LoginPage = require('../pageobjects/login.page');
-const SecurePage = require('../pageobjects/secure.page');
+import LoginPage from '../pageobjects/login.page.js';
+import SecurePage from '../pageobjects/secure.page.js';
const pages = {
login: LoginPage
diff --git a/handshake-nodejs-reporters/apps/test-wdio-cucumber/package.json b/handshake-nodejs-reporters/apps/test-wdio-cucumber/package.json
new file mode 100644
index 00000000..8ebf1c81
--- /dev/null
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "test-wdio-cucumber",
+ "version": "1.0.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "wdio": "npx wdio run ./wdio.conf.ts",
+ "sanity": "cross-env SANITY=true npm run wdio"
+ },
+ "author": "",
+ "license": "ISC",
+ "description": "",
+ "devDependencies": {
+ "@wdio/cucumber-framework": "^8.26.2",
+ "@wdio/local-runner": "^8.26.2",
+ "@wdio/spec-reporter": "^8.26.2",
+ "ts-node": "^10.9.2",
+ "typescript": "^5.3.3"
+ },
+ "dependencies": {
+ "@wdio/cli": "^8.26.2",
+ "wdio-handshake-reporter": "0.3.2"
+ }
+}
diff --git a/handshake-nodejs-reporters/apps/test-wdio-cucumber/tsconfig.json b/handshake-nodejs-reporters/apps/test-wdio-cucumber/tsconfig.json
new file mode 100644
index 00000000..f6adda0a
--- /dev/null
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/tsconfig.json
@@ -0,0 +1,30 @@
+{
+ "compilerOptions": {
+ "moduleResolution": "node",
+ "module": "ESNext",
+ "target": "es2022",
+ "lib": [
+ "es2022",
+ "dom"
+ ],
+ "types": [
+ "node",
+ "@wdio/globals/types",
+ "expect-webdriverio",
+ "@wdio/cucumber-framework"
+ ],
+ "skipLibCheck": true,
+ "noEmit": true,
+ "allowImportingTsExtensions": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "include": [
+ "test",
+ "wdio.conf.ts"
+ ]
+}
\ No newline at end of file
diff --git a/graspit-reporters/apps/test-wdio-cucumber/wdio.conf.js b/handshake-nodejs-reporters/apps/test-wdio-cucumber/wdio.conf.js
similarity index 100%
rename from graspit-reporters/apps/test-wdio-cucumber/wdio.conf.js
rename to handshake-nodejs-reporters/apps/test-wdio-cucumber/wdio.conf.js
diff --git a/handshake-nodejs-reporters/apps/test-wdio-cucumber/wdio.conf.ts b/handshake-nodejs-reporters/apps/test-wdio-cucumber/wdio.conf.ts
new file mode 100644
index 00000000..e4257e52
--- /dev/null
+++ b/handshake-nodejs-reporters/apps/test-wdio-cucumber/wdio.conf.ts
@@ -0,0 +1,359 @@
+import type { Options } from "@wdio/types";
+import { join, dirname } from "node:path";
+import { attachReporter } from "wdio-handshake-reporter";
+
+const options: Options.Testrunner = {
+ //
+ // ====================
+ // Runner Configuration
+ // ====================
+ // WebdriverIO supports running e2e tests as well as unit and component tests.
+ runner: "local",
+ autoCompileOpts: {
+ autoCompile: true,
+ tsNodeOpts: {
+ project: "./tsconfig.json",
+ transpileOnly: true,
+ },
+ },
+
+ //
+ // ==================
+ // Specify Test Files
+ // ==================
+ // Define which test specs should run. The pattern is relative to the directory
+ // of the configuration file being run.
+ //
+ // The specs are defined as an array of spec files (optionally using wildcards
+ // that will be expanded). The test for each spec file will be run in a separate
+ // worker process. In order to have a group of spec files run in the same worker
+ // process simply enclose them in an array within the specs array.
+ //
+ // If you are calling `wdio` from an NPM script (see https://docs.npmjs.com/cli/run-script),
+ // then the current working directory is where your `package.json` resides, so `wdio`
+ // will be called from there.
+ //
+ specs: ["./features/**/*.feature"],
+ // Patterns to exclude.
+ exclude: [
+ // 'path/to/excluded/files'
+ ],
+ //
+ // ============
+ // Capabilities
+ // ============
+ // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
+ // time. Depending on the number of capabilities, WebdriverIO launches several test
+ // sessions. Within your capabilities you can overwrite the spec and exclude options in
+ // order to group specific specs to a specific capability.
+ //
+ // First, you can define how many instances should be started at the same time. Let's
+ // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
+ // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
+ // files and you set maxInstances to 10, all spec files will get tested at the same time
+ // and 30 processes will get spawned. The property handles how many capabilities
+ // from the same test should run tests.
+ //
+ maxInstances: 10,
+ //
+ // If you have trouble getting all important capabilities together, check out the
+ // Sauce Labs platform configurator - a great tool to configure your capabilities:
+ // https://saucelabs.com/platform/platform-configurator
+ //
+ capabilities: [
+ {
+ browserName: "chrome",
+ "goog:chromeOptions": {
+ args: ["headless", "disable-gpu"],
+ },
+ },
+ ],
+
+ //
+ // ===================
+ // Test Configurations
+ // ===================
+ // Define all options that are relevant for the WebdriverIO instance here
+ //
+ // Level of logging verbosity: trace | debug | info | warn | error | silent
+ logLevel: "info",
+ //
+ // Set specific log levels per logger
+ // loggers:
+ // - webdriver, webdriverio
+ // - @wdio/browserstack-service, @wdio/devtools-service, @wdio/sauce-service
+ // - @wdio/mocha-framework, @wdio/jasmine-framework
+ // - @wdio/local-runner
+ // - @wdio/sumologic-reporter
+ // - @wdio/cli, @wdio/config, @wdio/utils
+ // Level of logging verbosity: trace | debug | info | warn | error | silent
+ // logLevels: {
+ // webdriver: 'info',
+ // '@wdio/appium-service': 'info'
+ // },
+ //
+ // If you only want to run your tests until a specific amount of tests have failed use
+ // bail (default is 0 - don't bail, run all tests).
+ bail: 0,
+ //
+ // Set a base URL in order to shorten url command calls. If your `url` parameter starts
+ // with `/`, the base url gets prepended, not including the path portion of your baseUrl.
+ // If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
+ // gets prepended directly.
+ baseUrl: "http://localhost",
+ //
+ // Default timeout for all waitFor* commands.
+ waitforTimeout: 10000,
+ //
+ // Default timeout in milliseconds for request
+ // if browser driver or grid doesn't send response
+ connectionRetryTimeout: 120000,
+ //
+ // Default request retries count
+ connectionRetryCount: 3,
+ //
+ // Test runner services
+ // Services take over a specific job you don't want to take care of. They enhance
+ // your test setup with almost no effort. Unlike plugins, they don't add new
+ // commands. Instead, they hook themselves up into the test process.
+ // services: [],
+ //
+ // Framework you want to run your specs with.
+ // The following are supported: Mocha, Jasmine, and Cucumber
+ // see also: https://webdriver.io/docs/frameworks
+ //
+ // Make sure you have the wdio adapter package for the specific framework installed
+ // before running any tests.
+ framework: "cucumber",
+
+ //
+ // The number of times to retry the entire specfile when it fails as a whole
+ // specFileRetries: 1,
+ //
+ // Delay in seconds between the spec file retry attempts
+ // specFileRetriesDelay: 0,
+ //
+ // Whether or not retried spec files should be retried immediately or deferred to the end of the queue
+ // specFileRetriesDeferred: false,
+ //
+ // Test reporter for stdout.
+ // The only one supported by default is 'dot'
+ // see also: https://webdriver.io/docs/dot-reporter
+ reporters: ["spec"],
+
+ // If you are using Cucumber you need to specify the location of your step definitions.
+ cucumberOpts: {
+ // (file/dir) require files before executing features
+ require: ["./features/step-definitions/steps.ts"],
+ // show full backtrace for errors
+ backtrace: false,
+ // ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
+ requireModule: [],
+ // invoke formatters without executing steps
+ dryRun: false,
+ // abort the run on first failure
+ failFast: false,
+ // hide step definition snippets for pending steps
+ snippets: true,
+ // hide source uris
+ source: true,
+ // fail if there are any undefined or pending steps
+ strict: false,
+ // (expression) only execute the features or scenarios with tags matching the expression
+ tagExpression: "",
+ // timeout for step definitions
+ timeout: 60000,
+ // Enable this config to treat undefined definitions as warnings.
+ ignoreUndefinedDefinitions: false,
+ },
+
+ //
+ // =====
+ // Hooks
+ // =====
+ // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
+ // it and to build services around it. You can either apply a single function or an array of
+ // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
+ // resolved to continue.
+ /**
+ * Gets executed once before all workers get launched.
+ * @param {object} config wdio configuration object
+ * @param {Array.