Skip to content

update sanity test slack message #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ce13368
Merge pull request #52 from contentstack/main
harshithad0703 Sep 13, 2024
9ecb7d4
updated api test cases
harshithad0703 Sep 18, 2024
4aa32e2
Merge pull request #54 from contentstack/test/dx-693-sanity-test-cases
harshithad0703 Sep 18, 2024
0b6c073
updated test cases to run sanity
harshithad0703 Oct 23, 2024
e7825e2
added slack channel integration for sanity reports
harshithad0703 Oct 23, 2024
8ab67ea
update API test cases to check for defined titles instead of specific…
harshithad0703 Apr 9, 2025
18e1406
add Slack integration for sending sanity report notifications
harshithad0703 Apr 9, 2025
f9513b0
refactor: simplify sanity report test command in package.json
harshithad0703 Apr 9, 2025
22273d9
chore: testing slack notification for sanity report
AniketDev7 Apr 9, 2025
52977a5
chore: message updated
AniketDev7 Apr 9, 2025
ad83ad9
chore: updated the report url
AniketDev7 Apr 9, 2025
889e201
updated slack notif title for TS SDK
AniketDev7 Apr 10, 2025
5af0384
chore: updated slack notif
AniketDev7 Apr 10, 2025
08c3a63
Merge branch 'fix/sanity-test-cases' into test/sanity-update
harshithad0703 Apr 23, 2025
60bc1d0
update packege-lock
harshithad0703 Apr 23, 2025
6820edf
fix: include region in Slack message header
harshithad0703 May 12, 2025
30055b7
fix: update region extraction regex to match CDN instead of API
harshithad0703 May 12, 2025
59e9217
slack msg: set default region to AWS-NA in sanity report
harshithad0703 May 13, 2025
da16f11
Merge branch 'development' into test/sanity-update
harshithad0703 May 19, 2025
47ed3c8
Merge branch 'development' into test/sanity-update
harshithad0703 Jul 1, 2025
ae411b4
Complete previous merge
harshithad0703 Jul 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
export default {
displayName: 'contentstack-delivery',
preset: './jest.preset.js',
displayName: "contentstack-delivery",
preset: "./jest.preset.js",
transform: {
"^.+\\.[tj]s$": [
"ts-jest",
Expand Down
5 changes: 1 addition & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion sanity-report.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ console.log(`Failed Tests: ${failedTests}`);
console.log(`Skipped Tests: ${skippedTests}`);
console.log(`Total Duration: ${totalDurationMinutes}m ${totalDurationSeconds.toFixed(0)}s`);

const host = process.env.HOST || ''
let region = 'AWS-NA'

const match = host.match(/^([^-]+(?:-[^-]+)*)-cdn/)
if (match && match[1]) {
region = match[1].toUpperCase()
}

const slackMessage = `
*Typescript CDA Report*
*Typescript CDA Report - ${region}*
• Total Suites: *${totalSuites}*
• Total Tests: *${totalTests}*
• Passed Tests: *${passedTests}*
Expand Down