Skip to content

Commit

Permalink
feat(3266): fixed unit tests for banner (#3270)
Browse files Browse the repository at this point in the history
  • Loading branch information
VonnyJap authored Jan 25, 2025
1 parent af5fa56 commit d893362
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"screwdriver-config-parser": "^11.0.0",
"screwdriver-coverage-bookend": "^2.0.0",
"screwdriver-coverage-sonar": "^4.1.1",
"screwdriver-data-schema": "^24.1.0",
"screwdriver-data-schema": "^24.2.0",
"screwdriver-datastore-sequelize": "^9.0.0",
"screwdriver-executor-base": "^10.0.0",
"screwdriver-executor-docker": "^7.0.0",
Expand All @@ -118,7 +118,7 @@
"screwdriver-executor-queue": "^5.0.0",
"screwdriver-executor-router": "^4.0.0",
"screwdriver-logger": "^2.0.0",
"screwdriver-models": "^31.0.0",
"screwdriver-models": "^31.1.0",
"screwdriver-notifications-email": "^4.0.0",
"screwdriver-notifications-slack": "^6.0.0",
"screwdriver-request": "^2.0.1",
Expand Down
4 changes: 3 additions & 1 deletion test/plugins/banner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ describe('banner plugin test', () => {
const message = 'Test banner example';
const isActive = true;
const type = 'info';
const scope = 'GLOBAL';

beforeEach(() => {
options = {
Expand All @@ -112,7 +113,8 @@ describe('banner plugin test', () => {
payload: {
message,
isActive,
type
type,
scope
},
auth: {
credentials: {
Expand Down
2 changes: 2 additions & 0 deletions test/plugins/data/banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"message": "Test banner example",
"isActive": true,
"type": "info",
"scope": "GLOBAL",
"scopeId": null,
"createdBy": "jimgrund",
"createTime": "2017-01-06T01:49:50.384359267Z"
}
2 changes: 2 additions & 0 deletions test/plugins/data/banners-active.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"message": "Test banner example",
"type": "info",
"isActive": true,
"scope": "GLOBAL",
"scopeId": null,
"createdBy": "batman123",
"createTime": "2017-01-06T01:49:50.384359267Z"
}
Expand Down
6 changes: 6 additions & 0 deletions test/plugins/data/banners.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"message": "Test banner example",
"type": "info",
"isActive": true,
"scope": "GLOBAL",
"scopeId": null,
"createdBy": "batman123",
"createTime": "2017-01-06T01:49:50.384359267Z"
},
Expand All @@ -12,6 +14,8 @@
"message": "Test banner example again",
"type": "info",
"isActive": false,
"scope": "GLOBAL",
"scopeId": null,
"createdBy": "batman123",
"createTime": "2017-01-07T01:49:50.384359267Z"
},
Expand All @@ -20,6 +24,8 @@
"message": "Test banner example yet again",
"type": "warn",
"isActive": false,
"scope": "GLOBAL",
"scopeId": null,
"createdBy": "batman123",
"createTime": "2017-01-08T01:49:50.384359267Z"
}
Expand Down

0 comments on commit d893362

Please sign in to comment.