-
Notifications
You must be signed in to change notification settings - Fork 13.8k
test: deflake livechat business-hours and room.forward queue tests #41538
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -664,11 +664,14 @@ describe('LIVECHAT - rooms', () => { | |
| expect(body.rooms.some((room: IOmnichannelRoom) => room._id === expectedRoom._id)).to.be.true; | ||
| expect(body.rooms.some((room: IOmnichannelRoom) => room._id === expectedRoom2._id)).to.be.true; | ||
|
|
||
| await closeOmnichannelRoom(expectedRoom._id); | ||
| await closeOmnichannelRoom(expectedRoom2._id); | ||
| await deleteVisitor(expectedVisitor.token); | ||
| await deleteVisitor(expectedVisitor2.token); | ||
| await Promise.all([deleteDepartment(department._id), deleteDepartment(department2._id)]); | ||
| // close both rooms before removing visitors/departments (deleting a department with an open room fails) | ||
| await Promise.all([closeOmnichannelRoom(expectedRoom._id), closeOmnichannelRoom(expectedRoom2._id)]); | ||
| await Promise.all([ | ||
| deleteVisitor(expectedVisitor.token), | ||
| deleteVisitor(expectedVisitor2.token), | ||
| deleteDepartment(department._id), | ||
| deleteDepartment(department2._id), | ||
| ]); | ||
| }); | ||
| (IS_EE ? it : it.skip)('should return only rooms with the given tags', async () => { | ||
| const tag = await saveTags(); | ||
|
|
@@ -1787,10 +1790,12 @@ describe('LIVECHAT - rooms', () => { | |
| expect(inquiry).to.have.property('department', targetDepartment._id); | ||
| expect(inquiry).to.have.property('status', 'queued'); | ||
|
|
||
| // the room ends queued (never taken), so close it as the visitor — room.closeByUser rejects a room that is not being served | ||
| await request.post(api('livechat/room.close')).send({ rid: newRoom._id, token: newVisitor.token }).expect(200); | ||
|
Comment on lines
+1793
to
+1794
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Remove the implementation comment. The API call is correct, but this TypeScript test adds an implementation comment despite the repository guideline to avoid code comments. Remove it and keep the behavior self-documenting through the API call and test structure. 🤖 Prompt for AI AgentsSource: Coding guidelines There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair — a silent The CLI now requires Verified both paths: with the secret exported it creates the admin; with it unset it prints the usage + error and exits 1 without touching the DB.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This thread is specifically about removing the implementation comment above the |
||
|
|
||
| await Promise.all([ | ||
| deleteDepartment(initialDepartment._id), | ||
| deleteDepartment(targetDepartment._id), | ||
| closeOmnichannelRoom(newRoom._id), | ||
| deleteVisitor(newVisitor.token), | ||
| deleteUser(manager), | ||
| updateSetting('Livechat_waiting_queue', false), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.