Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const PatternsInfo = ({ channels }: PatternsInfoProps) => {

return (
<div className={styles.patternsContainer}>
<EuiText color="subdued" size="s" data-testid="messages-count">Patterns:&nbsp;{getChannelsCount()} </EuiText>
<EuiText color="subdued" size="s" data-testid="patterns-count">Patterns:&nbsp;{getChannelsCount()} </EuiText>
<AppendInfo title={<>{channels?.trim().split(' ').map((ch) => <p>{ch}</p>)}</>} />
</div>
)
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/pageObjects/pub-sub-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export class PubSubPage extends InstancePage {
messageInput = Selector('[data-testid=field-message]');
channelsSubscribeInput = Selector('[data-testid=channels-input]');

patternsCount = Selector('[data-testid=patterns-count]');
messageCount = Selector('[data-testid=messages-count]');

/**
* Publish message in pubsub
* @param channel The name of channel
Expand Down
10 changes: 8 additions & 2 deletions tests/e2e/tests/web/regression/pub-sub/pub-sub-oss-cluster-7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,19 @@ test

test.meta({ rte: rte.ossCluster })('Verify that PSUBSCRIBE works, that user can specify channel name to subscribe', async t => {
const channelsName = 'first second third';
const namesList = channelsName.split(' ');

await t.expect(pubSubPage.channelsSubscribeInput.value).eql('*', 'the default value is not set');
await t.typeText(pubSubPage.channelsSubscribeInput, channelsName, { replace: true });
await t.click(pubSubPage.subscribeButton);
await t.expect(pubSubPage.channelsSubscribeInput.hasAttribute('disabled')).ok('the field is not disabled after subscribe');
await pubSubPage.publishMessage(channelsName.split(' ')[0], 'published message');
await pubSubPage.publishMessage(namesList[0], 'published message');
await verifyMessageDisplayingInPubSub('published message', true);
await pubSubPage.publishMessage(channelsName.split(' ')[1], 'second message');
await pubSubPage.publishMessage(namesList[1], 'second message');
await verifyMessageDisplayingInPubSub('second message', true);
await pubSubPage.publishMessage('not exist', 'not exist message');
await verifyMessageDisplayingInPubSub('not exist message', false);

await t.expect(pubSubPage.patternsCount.textContent).contains(namesList.length.toString(), 'patterns count is not calculated correctly');
await t.expect(pubSubPage.messageCount.textContent).contains('2', 'message count is not calculated correctly');
});