From cb20965678959fcf7108889e8deec1af7dea9938 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 14 Apr 2018 20:56:13 -0700 Subject: [PATCH] Add test for mentioning an account (#126) --- tests/spec/019-mention.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/spec/019-mention.js diff --git a/tests/spec/019-mention.js b/tests/spec/019-mention.js new file mode 100644 index 00000000..07b7903b --- /dev/null +++ b/tests/spec/019-mention.js @@ -0,0 +1,19 @@ +import { + accountProfileMoreOptionsButton, closeDialogButton, + getNthDialogOptionsOption, modalDialog +} from '../utils' +import { foobarRole } from '../roles' + +fixture`019-mention.js` + .page`http://localhost:4002` + +test('can mention from account profile', async t => { + await t.useRole(foobarRole) + .navigateTo('/accounts/5') + .click(accountProfileMoreOptionsButton) + .expect(getNthDialogOptionsOption(1).innerText).contains('Mention @baz') + .click(getNthDialogOptionsOption(1)) + .expect(modalDialog.find('.compose-box-input').value).eql('@baz ') + .click(closeDialogButton) + .expect(modalDialog.exists).notOk() +})