diff --git a/README.md b/README.md index 4e4fde4..2b28c4c 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,11 @@ An npm package that publishes test results object from testResultsProcessor(eg. Firstly, client will need to install Test Results Collector package -```npm install --save-dev @agoda-com/test-metrics``` +```npm install --save-dev agoda-test-metrics``` Next, user will require to add `testResultsProcessor` key to jest config -`testResultsProcessor: '@agoda-com/test-metrics'` +`testResultsProcessor: 'agoda-test-metrics'` Note: Jest config could be in either **package.json** OR **standalone file** (jest.config.js). @@ -38,13 +38,13 @@ If there is jest section in `package.json`, simply add: ```{ "name": "my-project", "jest": { - "testResultsProcessor": "@agoda-com/test-metrics", + "testResultsProcessor": "agoda-test-metrics", } } ``` or if there is `jest.config.js`, simply add: -```"testResultsProcessor": "@agoda-com/test-metrics"``` +```"testResultsProcessor": "agoda-test-metrics"``` ## API @@ -95,7 +95,7 @@ After that, the data will be processed on API (and then this can be able to inje For testing, the idea is you can publish the beta version in the `release-beta` job on CI, and install the desired version to your repository using following command -` npm install @agoda-com/test-metrics@<> --force` +` npm install agoda-test-metrics@<> --force` if the version is not updated, delete node_modules folder and reinstall diff --git a/doc/PLAYWRIGHT.md b/doc/PLAYWRIGHT.md index 3b3b84a..6577021 100644 --- a/doc/PLAYWRIGHT.md +++ b/doc/PLAYWRIGHT.md @@ -3,7 +3,7 @@ In case your client package.json has playwright like this ``` "devDependencies": { - "@agoda-com/test-metrics": "0.0.20", + "agoda-test-metrics": "0.0.21", "@axe-core/playwright": "^4.4.5", "@playwright/test": "^1.30.1", "dotenv": "^16.0.1", diff --git a/doc/VITEST.md b/doc/VITEST.md index 01108b9..d2ba9e5 100644 --- a/doc/VITEST.md +++ b/doc/VITEST.md @@ -11,7 +11,7 @@ This package also supports collecting the test data of projects that are using V If you use **Vitest**, you can add the following to your `vitest.config.js` file: ```javascript -import { VitestTestDataPlugin } from '@agoda-com/test-metrics' +import { VitestTestDataPlugin } from 'agoda-test-metrics' export default defineConfig({ ..., diff --git a/doc/playwright.config.ts b/doc/playwright.config.ts index bffed62..1e97d03 100644 --- a/doc/playwright.config.ts +++ b/doc/playwright.config.ts @@ -11,7 +11,7 @@ const junit: ReporterDescription = [ : path.join(__dirname,'playwright-report/junit.results.xml') } ] -const testMetrics: ReporterDescription = ['@agoda-com/test-metrics/playwright'] +const testMetrics: ReporterDescription = ['agoda-test-metrics/playwright'] /** * Read environment variables from file. * https://github.com/motdotla/dotenv diff --git a/package-lock.json b/package-lock.json index a3d58b3..dc0e9bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@agoda-com/test-metrics", + "name": "agoda-test-metrics", "version": "0.0.21", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@agoda-com/test-metrics", + "name": "agoda-test-metrics", "version": "0.0.21", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index f55cc22..2f8edd5 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@agoda-com/test-metrics", + "name": "agoda-test-metrics", "description": "Library to collect test metrics", "version": "0.0.21", "repository": "https://github.com/agoda-com/testresults-collector.git", diff --git a/src/jest/publishJestMetrics.ts b/src/jest/publishJestMetrics.ts index d5fb5f5..b352c69 100644 --- a/src/jest/publishJestMetrics.ts +++ b/src/jest/publishJestMetrics.ts @@ -20,7 +20,7 @@ function publishJestMetrics(result: any) { }).then(_ => { console.log(`Jest Test results successfully posted to ${JEST_TESTDATA_API_URL}`); }).catch(error => { - console.error(`Failed posting Jest test Results to ${JEST_TESTDATA_API_URL} from @agoda-com/test-metrics`); + console.error(`Failed posting Jest test Results to ${JEST_TESTDATA_API_URL} from agoda-test-metrics`); }); return result; } diff --git a/src/playwright/publishPlaywrightMetrics.ts b/src/playwright/publishPlaywrightMetrics.ts index 3300693..4682069 100644 --- a/src/playwright/publishPlaywrightMetrics.ts +++ b/src/playwright/publishPlaywrightMetrics.ts @@ -42,7 +42,7 @@ class PublishLocalPlaywrightMetrics implements Reporter { }); console.log(`Playwright Test results from ${this.junitOutputFile} successfully posted to ${PLAYWRIGHT_TESTDATA_API_URL}`); } catch (error) { - console.error(`Failed posting Playwright test Results - ${this.junitOutputFile} to ${PLAYWRIGHT_TESTDATA_API_URL} from @agoda-com/test-metrics`); + console.error(`Failed posting Playwright test Results - ${this.junitOutputFile} to ${PLAYWRIGHT_TESTDATA_API_URL} from agoda-test-metrics`); } } }