Skip to content

Instantly share code, notes, and snippets.

@jtorreggiani
jtorreggiani / headingtext.spec.js
Last active March 1, 2019 23:51
Introduction test assertion
it('has introduction text', async () => {
// Use the browser selector method to get the heading
// See docs for details https://webdriver.io/docs/selectors.html
const paragraph = await browser.$('p')
await expect(paragraph.getText()).resolves.toEqual('Edit src/App.js and save to reload.')
})
@jtorreggiani
jtorreggiani / Todos.js
Created March 2, 2019 00:44
Basic todos page
import React, { Component } from 'react'
const todosUrl = 'http://localhost:3001/todos'
function Todo ({ number, todo }) {
return (
<li>{number}. { todo.title }</li>
)
}