snapshot of https://github.com/RocketChat/Rocket.Chat.git (develop, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Code scanning - action / CodeQL-Build (push) Failing after 1s
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Code scanning - action / CodeQL-Build (push) Failing after 1s
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
import type { Page } from '@playwright/test';
|
||||
|
||||
import { createFakeVisitor } from '../../mocks/data';
|
||||
import { createAuxContext } from '../fixtures/createAuxContext';
|
||||
import { Users } from '../fixtures/userStates';
|
||||
import { HomeOmnichannel } from '../page-objects';
|
||||
import { OmnichannelLiveChat } from '../page-objects/omnichannel';
|
||||
import { test, expect } from '../utils/test';
|
||||
|
||||
test.describe('Omnichannel chat history', () => {
|
||||
let poLiveChat: OmnichannelLiveChat;
|
||||
let newVisitor: { email: string; name: string };
|
||||
|
||||
let agent: { page: Page; poHomeOmnichannel: HomeOmnichannel };
|
||||
|
||||
test.beforeAll(async ({ api, browser }) => {
|
||||
newVisitor = createFakeVisitor();
|
||||
|
||||
// Set user user 1 as manager and agent
|
||||
await api.post('/livechat/users/agent', { username: 'user1' });
|
||||
await api.post('/livechat/users/manager', { username: 'user1' });
|
||||
|
||||
const { page } = await createAuxContext(browser, Users.user1);
|
||||
agent = { page, poHomeOmnichannel: new HomeOmnichannel(page) };
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page, api }) => {
|
||||
poLiveChat = new OmnichannelLiveChat(page, api);
|
||||
});
|
||||
|
||||
test.afterAll(async ({ api }) => {
|
||||
await api.delete('/livechat/users/agent/user1');
|
||||
await api.delete('/livechat/users/manager/user1');
|
||||
await agent.page.close();
|
||||
|
||||
await api.post('/permissions.update', { permissions: [{ _id: 'preview-c-room', roles: ['admin', 'owner', 'moderator', 'user'] }] });
|
||||
});
|
||||
|
||||
test('Receiving a message from visitor', async ({ api }) => {
|
||||
await test.step('Expect send a message as a visitor', async () => {
|
||||
await poLiveChat.goto();
|
||||
await poLiveChat.openLiveChat();
|
||||
await poLiveChat.sendMessage(newVisitor, false);
|
||||
await poLiveChat.onlineAgentMessage.type('this_a_test_message_from_visitor');
|
||||
await poLiveChat.btnSendMessageToOnlineAgent.click();
|
||||
});
|
||||
|
||||
await test.step('Expect to have 1 omnichannel assigned to agent 1', async () => {
|
||||
await agent.poHomeOmnichannel.navbar.openChat(newVisitor.name);
|
||||
});
|
||||
|
||||
await test.step('expect to be able to edit room info', async () => {
|
||||
await agent.poHomeOmnichannel.roomInfo.btnEdit.click();
|
||||
await agent.poHomeOmnichannel.editRoomInfo.inputTopic.fill('any_topic');
|
||||
await agent.poHomeOmnichannel.editRoomInfo.btnSave.click();
|
||||
|
||||
await expect(agent.poHomeOmnichannel.roomInfo.root).toContainText('any_topic');
|
||||
});
|
||||
|
||||
await test.step('Expect to be able to close an omnichannel to conversation', async () => {
|
||||
await agent.poHomeOmnichannel.quickActionsRoomToolbar.closeChat();
|
||||
});
|
||||
|
||||
await test.step('Expect send a message as a visitor again to reopen chat', async () => {
|
||||
await poLiveChat.goto();
|
||||
await poLiveChat.openLiveChat();
|
||||
await poLiveChat.onlineAgentMessage.type('this_a_test_message_from_visitor');
|
||||
await poLiveChat.btnSendMessageToOnlineAgent.click();
|
||||
});
|
||||
|
||||
await test.step('Expect to have 1 omnichannel assigned to agent 1', async () => {
|
||||
await agent.poHomeOmnichannel.navbar.openChat(newVisitor.name);
|
||||
});
|
||||
|
||||
await test.step('Expect to be able to see conversation history', async () => {
|
||||
await agent.poHomeOmnichannel.btnContactInfo.click();
|
||||
await agent.poHomeOmnichannel.contacts.contactInfo.tabHistory.click();
|
||||
await expect(agent.poHomeOmnichannel.contacts.contactInfo.historyItem).toBeVisible();
|
||||
|
||||
await agent.poHomeOmnichannel.contacts.contactInfo.historyItem.click();
|
||||
await expect(agent.poHomeOmnichannel.contacts.contactInfo.historyMessage).toBeVisible();
|
||||
});
|
||||
|
||||
await api.post('/permissions.update', { permissions: [{ _id: 'preview-c-room', roles: [] }] });
|
||||
|
||||
await test.step('Expect agent to see conversation history, but not join room', async () => {
|
||||
await agent.page.reload();
|
||||
|
||||
await agent.poHomeOmnichannel.contacts.contactInfo.historyItem.click();
|
||||
await agent.poHomeOmnichannel.contacts.contactInfo.historyMessage.click();
|
||||
await agent.poHomeOmnichannel.contacts.contactInfo.btnOpenChat.click();
|
||||
|
||||
// Should not show the NoSubscribedRoom.tsx component on livechat rooms
|
||||
await expect(agent.page.locator('div >> text=This conversation is already closed.')).toBeVisible();
|
||||
await expect(agent.page.locator('div >> text="this_a_test_message_from_visitor"')).toBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user