Skip to content

Commit

Permalink
Move basic A4A amp-bind test to e2e test. (ampproject#26141)
Browse files Browse the repository at this point in the history
  • Loading branch information
lannka authored Dec 23, 2019
1 parent 4c86375 commit 7518119
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 72 deletions.
8 changes: 8 additions & 0 deletions test/e2e/test-amp-bind-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ describes.endtoend(
});

describe('+ amp-state', () => {
it('should update text', async () => {
const text = await controller.findElement('#textDisplay');
await expect(controller.getElementText(text)).to.equal('hello');
const button = await controller.findElement('#changeTextButton');
await controller.click(button);
await expect(controller.getElementText(text)).to.equal('world');
});

// TODO(cvializ, choumx): Update server to have an endpoint that
// would test the infinite-loop blocking behavior
it.skip('should not loop infinitely if updates change its src binding', async () => {
Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/e2e/amp-bind/bind-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
</amp-state>

<button id="setState" on="tap:AMP.setState({})"></button>

<p id="textDisplay" [text]="foo">hello</p>
<button id="changeTextButton" on="tap:AMP.setState({foo: 'world'})">Update Text</button>
</body>
</html>
72 changes: 0 additions & 72 deletions test/integration/test-amp-ad-fake.js

This file was deleted.

0 comments on commit 7518119

Please sign in to comment.