Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const {assert} = require('chai');
- const {jsdom} = require('jsdom');
- const parseTextFromHTML = (htmlAsString, selector) => {
- const selectedElement = jsdom(htmlAsString).querySelector(selector);
- if (selectedElement !== null) {
- return selectedElement.textContent;
- } else {
- throw new Error(`No element with selector ${selector} found in HTML string`);
- }
- };
- describe('User visits Quick Add Task', () => {
- it('starts with a blank task', () => {
- browser.url('http://localhost:8080/');
- const elem = $('#inbox-clickable');
- console.log(elem.getText());
- assert.equal(elem.getText(), 'Inbox');
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement