mattermost-mobile/detox/e2e/test/messaging/markdown_separator.e2e.js
Joseph Baylon 4270148f7d
MM-35671 Detox/E2E: Add e2e for markdown table, separator, and block quote (#5399)
* MM-35671 Detox/E2E: Add e2e for markdown table, separator, and block quote

* Revert podfile

* Fix markdown block quote comment
2021-05-24 07:20:49 -07:00

46 lines
1.5 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// *******************************************************************
// - [#] indicates a test step (e.g. # Go to a screen)
// - [*] indicates an assertion (e.g. * Check the title)
// - Use element testID when selecting an element. Create one if none.
// *******************************************************************
import {ChannelScreen} from '@support/ui/screen';
import {
Channel,
Post,
Setup,
} from '@support/server_api';
describe('Markdown Separator', () => {
let townSquareChannel;
beforeAll(async () => {
const {team, user} = await Setup.apiInit();
({channel: townSquareChannel} = await Channel.apiGetChannelByName(team.id, 'town-square'));
// # Open channel screen
await ChannelScreen.open(user);
});
afterAll(async () => {
await ChannelScreen.logout();
});
it('MM-T191 should display markdown separator', async () => {
// # Post a markdown separator
const markdownSeparator = '---';
await Post.apiCreatePost({
channelId: townSquareChannel.id,
message: markdownSeparator,
});
// * Verify markdown separator is displayed
const {post} = await Post.apiGetLastPostInChannel(townSquareChannel.id);
const {postListPostItemThematicBreak} = await ChannelScreen.getPostListPostItem(post.id);
await expect(postListPostItemThematicBreak).toBeVisible();
});
});