dna.js Semantic Templates

Specification Runner

dna.jsswitch

Specification: #01

Add 3 items and delete 1 item

Actual
Title: ~~title~~
Author: ~~author~~
Expected
Title: The DOM
Author: Jan
Title: Howdy HTML5
Author: Ed

Specification: #02

Add 2 items, empty, and add 1 item (with mustache)

Actual


Title: {{title}}
Author: {{author}}

Expected

Title: The One
Author: Lee

Specification: #03

Add 3 items with fade (1st one blue) and top set to true

Actual

Title: ~~title~~
Author: ~~author~~

Expected

Title: 3rd
Author: Jan
Title: 2nd
Author: Jan
Title: 1st
Author: Jan

Specification: #04

Add 1 items with an image

Actual
Title: ~~title~~
Author: ~~author~~
Cover: cover
Expected
Title: <b>Text</b>&bull;
Author: Lee
Cover: cover

Specification: #05

Add 2 items in an array twice

Actual
Expected
Title: 1st
Author: Lee
Code: 11
Title: 2st
Author: Jan
Code: 9
Title: 1st
Author: Lee
Code: 11
Title: 2st
Author: Jan
Code: 9

Specification: #06

Add 1 item with attributes

Actual
Title: ~~title~~
Expected
Title: Les Attributs

Specification: #07

Embedded template with array of data

Actual
Author: ~~author.name~~
Chapter: ~~header~~~~author.name~~
Expected
Author: Ed
Author: Jan
Chapter: Preface
Chapter: Index
Author: Lee

Specification: #08

Add 2 items and refresh

Actual

Authors (1): ~~[value]~~

Authors (2): ~~[value]~~

Authors (3): ~~[value]~~

Title: ~~title~~
Authors: *~~[value]~~
Score: ~~score~~
On Sale: ~~sale~~
Expected

Authors (1): Jan

Authors (2): Jan and Bo

Authors (3): Jan, Bo and Ed

Title: The New DOM
Authors: *Jan II *Bo
Score: 81
On Sale: true
Title: Howdy HTML5
Authors: *Ed II
Score: 97
On Sale: false

Specification: #09

Add 2 items ( and ) loaded from REST call

Actual
Title: ~~title~~
Author: ~~author~~
Expected
Title: Go JavaScript
Author: Jake
Title: Styling CSS3
Author: Abby

Specification: #10

Add 1 item and apply callback function

Actual
~~title~~
Expected
Background

Specification: #11

Add 2 items with missing fields

Actual
Title: ~~title~~ [Gone with the Wind]
Author: ~~author~~
[no author]
Available
Out of stock
ON SALE!
Regular price
Expected
Title: [Gone with the Wind]
Author: Jan
Available
ON SALE!
Title: Howdy HTML5
[no author]
Out of stock
Regular price

Specification: #12

Array field (sub-template)

Actual
Title: ~~title~~
Authors: (~~[count]~~) ~~[value]~~
~~type~~: ~~header~~
Expected
Title: The DOM
Authors: (1) Bo I (2) Bo II
Title: Howdy HTML5
Authors: (1) Ed (2) Jake (3) Abby
front: Preface &star;
back: Index
Title: Styling CSS3
Authors:
Title: Howdy HTML5
Authors: (1) Ed (2) Jake (3) Abby
front: Preface ☆
back: Index
back: Bio
back: Bio 3

Specification: #13

Security

Actual
Title: ~~[value]~~
Expected
Title: <script>alert(1);</script>
Title: <script>alert(2);</script>
Title: 3

Specification: #14

Simple array with rearrange and delete

Actual
Book #~~[count]~~: ~~[value]~~
Placeholder
Expected
Book #1: The DOM
Book #2: Howdy HTML5
Book #3: Styling CSS3
Placeholder

Specification: #15

Events

Actual

~~[count]~~: ~~[value]~~
No more clones!
Expected



3: Howdy HTML5
5: Styling CSS3










Specification: #16

Input tag properties (minimized attributes)

Actual

Title:

Options:
Cover:
Purpose:
~~category~~
Tags:

~~code~~

Secret:

~~secret~~

Published:

Cover Color:

Note:


~~note~~

Check js console for smart updates
Expected

Title:

Options:
Cover:
Purpose:
computers
Tags:

tech color

Secret:

Signed!

Published:

Cover Color:

Note:


Award winning

Check js console for smart updates

Specification: #17

Reusable component

Actual

Bookshelf

Title: ~~title~~
Author: ~~author~~
Expected

Bookshelf

Title: Go JavaScript
Author: Jake
Title: Styling CSS
Author: Abby
Title: Howdy HTML5
Author: Ed

Specification: #18

Panels - nav buttons

Actual

~~title~~

~~author~~

~~displayPrice~~

On SALE

Expected

Styling CSS3

Abby

$19.99

On SALE

Specification: #19

Panels - nested

Actual
  • Web
    • Technologies
    • Organizations
  • Networking

HTML!

CSS!

W3C!

Protocals!

Equipment!

Expected
  • Web
    • Technologies
      1. HTML
      2. CSS
    • Organizations
      1. W3C
  • Networking
    1. Protocols
    2. Equipment

W3C!

Specification: #20

Panels - drop-down

Actual

Author: ~~author~~

Language: ~~language~~

Expected

Author: Abby

Language: fr