Skip to content

Instantly share code, notes, and snippets.

@cs3b
Last active April 14, 2017 16:59
Show Gist options
  • Save cs3b/a1a436874bd18aba869d2cbfae753a2d to your computer and use it in GitHub Desktop.
Save cs3b/a1a436874bd18aba869d2cbfae753a2d to your computer and use it in GitHub Desktop.
import { describe, it } from 'mocha';
import { expect } from 'chai';
import page from 'cl-app/tests/pages/mail-logs';
describe('Acceptance | mail logs', function() {
it('can visit /mail-logs', async function() {
await page.visit();
// ADD
await page.formNew()
.fillExternalNumber('200-212-123')
.selectCompany('selleo')
.selectCategory('office')
.submit();
expect(page.mailLogs().count).to.equal(11);
expect(page.mailLogs(10).text).to.include('200-212-123');
// EDIT
await page.mailLogs(1).click().formEdit()
.fillExternalNumber('300-323-234')
.submit();
expect(page.mailLogs(1).text).to.include('300-323-234');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment