Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
docs(all): improve readme structure and examples (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
clebert committed Apr 24, 2018
1 parent 707b7b5 commit 99aa824
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 40 deletions.
4 changes: 2 additions & 2 deletions @pageobject/todomvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can find the **complete code** of all test cases [here](https://github.com/c
### Creating todos

```js
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'), 30);
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'));

test
.assert(app.newTodoInput.hasFocus(), is(true), 'newTodoInput has focus (1)')
Expand All @@ -46,7 +46,7 @@ test
### Completing a todo

```js
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'), 30);
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'));

test
.assert(app.newTodoInput.hasFocus(), is(true), 'newTodoInput has focus')
Expand Down
2 changes: 1 addition & 1 deletion @pageobject/todomvc/src/tests/completing-a-todo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {jestTest} from './jestTest';
const {is} = Predicate;

jestTest('Completing a todo', (test, app) => {
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'), 30);
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'));

test
.assert(app.newTodoInput.hasFocus(), is(true), 'newTodoInput has focus')
Expand Down
2 changes: 1 addition & 1 deletion @pageobject/todomvc/src/tests/creating-todos.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {jestTest} from './jestTest';
const {is} = Predicate;

jestTest('Creating todos', (test, app) => {
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'), 30);
test.perform(app.page.goto('http://todomvc.com/examples/react/#/'));

test
.assert(app.newTodoInput.hasFocus(), is(true), 'newTodoInput has focus (1)')
Expand Down
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,37 +103,31 @@ function example(test, app) {
}
```

**For further examples, please consult the list of [example projects](#example-projects).**
## Further examples

## API documentation
### [@pageobject/todomvc][internal-api-todomvc]

### Foundation
An exemplary test suite for the popular TodoMVC application.

## Packages

#### [@pageobject/base][internal-api-base]
### [@pageobject/base][internal-api-base]

A declarative API as a **basis** for platform- and framework-independent UI test automation.

#### [@pageobject/web][internal-api-web]
### [@pageobject/web][internal-api-web]

A declarative API for framework-independent **web** UI test automation.

### Example projects

#### [@pageobject/todomvc][internal-api-todomvc]

An exemplary test suite for the popular TodoMVC application.

### Adapter implementations

#### [@pageobject/protractor][internal-api-protractor]
### [@pageobject/protractor][internal-api-protractor]

A web API adapter for Protractor.

#### [@pageobject/puppeteer][internal-api-puppeteer]
### [@pageobject/puppeteer][internal-api-puppeteer]

A web API adapter for Puppeteer.

#### [@pageobject/selenium-webdriver][internal-api-selenium-webdriver]
### [@pageobject/selenium-webdriver][internal-api-selenium-webdriver]

A web API adapter for Selenium.

Expand Down
4 changes: 2 additions & 2 deletions docs/api/todomvc/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ <h2 id="introduction">Introduction</h2>
<h2 id="test-cases">Test cases</h2>
<p>You can find the <strong>complete code</strong> of all test cases <a href="https://github.com/clebert/pageobject/blob/master/@pageobject/todomvc/src/tests/">here</a>.</p>
<h3 id="creating-todos">Creating todos</h3>
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>), <span class="hljs-number">30</span>);
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>));

test
.assert(app.newTodoInput.hasFocus(), is(<span class="hljs-literal">true</span>), <span class="hljs-string">'newTodoInput has focus (1)'</span>)
Expand All @@ -963,7 +963,7 @@ <h3 id="creating-todos">Creating todos</h3>
</code></pre>
<p><img src="../../images/creating-todos.png" alt="Creating todos"></p>
<h3 id="completing-a-todo">Completing a todo</h3>
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>), <span class="hljs-number">30</span>);
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>));

test
.assert(app.newTodoInput.hasFocus(), is(<span class="hljs-literal">true</span>), <span class="hljs-string">'newTodoInput has focus'</span>)
Expand Down
4 changes: 2 additions & 2 deletions docs/api/todomvc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ <h2 id="introduction">Introduction</h2>
<h2 id="test-cases">Test cases</h2>
<p>You can find the <strong>complete code</strong> of all test cases <a href="https://github.com/clebert/pageobject/blob/master/@pageobject/todomvc/src/tests/">here</a>.</p>
<h3 id="creating-todos">Creating todos</h3>
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>), <span class="hljs-number">30</span>);
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>));

test
.assert(app.newTodoInput.hasFocus(), is(<span class="hljs-literal">true</span>), <span class="hljs-string">'newTodoInput has focus (1)'</span>)
Expand All @@ -963,7 +963,7 @@ <h3 id="creating-todos">Creating todos</h3>
</code></pre>
<p><img src="../../images/creating-todos.png" alt="Creating todos"></p>
<h3 id="completing-a-todo">Completing a todo</h3>
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>), <span class="hljs-number">30</span>);
<pre><code class="lang-js">test.perform(app.page.goto(<span class="hljs-string">'http://todomvc.com/examples/react/#/'</span>));

test
.assert(app.newTodoInput.hasFocus(), is(<span class="hljs-literal">true</span>), <span class="hljs-string">'newTodoInput has focus'</span>)
Expand Down
26 changes: 10 additions & 16 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,37 +103,31 @@ function example(test, app) {
}
```

**For further examples, please consult the list of [example projects](#example-projects).**
## Further examples

## API documentation
### [@pageobject/todomvc][internal-api-todomvc]

### Foundation
An exemplary test suite for the popular TodoMVC application.

## Packages

#### [@pageobject/base][internal-api-base]
### [@pageobject/base][internal-api-base]

A declarative API as a **basis** for platform- and framework-independent UI test automation.

#### [@pageobject/web][internal-api-web]
### [@pageobject/web][internal-api-web]

A declarative API for framework-independent **web** UI test automation.

### Example projects

#### [@pageobject/todomvc][internal-api-todomvc]

An exemplary test suite for the popular TodoMVC application.

### Adapter implementations

#### [@pageobject/protractor][internal-api-protractor]
### [@pageobject/protractor][internal-api-protractor]

A web API adapter for Protractor.

#### [@pageobject/puppeteer][internal-api-puppeteer]
### [@pageobject/puppeteer][internal-api-puppeteer]

A web API adapter for Puppeteer.

#### [@pageobject/selenium-webdriver][internal-api-selenium-webdriver]
### [@pageobject/selenium-webdriver][internal-api-selenium-webdriver]

A web API adapter for Selenium.

Expand Down

0 comments on commit 99aa824

Please sign in to comment.