tests: Refine frontend tests

* Switch from `helper.newPad()` to `helper.aNewPad()`.
  * Promisify.
  * Delete redundant logic.
  * Lint fixes.
This commit is contained in:
Richard Hansen 2021-03-31 21:14:02 -04:00 committed by webzwo0i
parent 3790c0e41c
commit bbf89dfcf9
35 changed files with 697 additions and 842 deletions

View file

@ -2,12 +2,12 @@
describe('strikethrough button', function () {
// create a new pad before each test run
beforeEach(function (cb) {
helper.newPad(cb);
beforeEach(async function () {
this.timeout(60000);
await helper.aNewPad();
});
it('makes text strikethrough', function (done) {
it('makes text strikethrough', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -33,7 +33,5 @@ describe('strikethrough button', function () {
// make sure the text hasn't changed
expect($newFirstTextElement.text()).to.eql($firstTextElement.text());
done();
});
});