collage fixes
This commit is contained in:
@@ -22,6 +22,9 @@ test("home page includes single graphic and collage forms", () => {
|
||||
assert.match(page, /name="spacing" type="number" value="48"/);
|
||||
assert.match(page, /name="fade" type="number" value="0"/);
|
||||
assert.match(page, /name="columns" type="number" value="3"/);
|
||||
assert.match(page, /name="repeatDistance" type="number" value="900"/);
|
||||
assert.match(page, /name="hydrateDelay" type="number" value="180"/);
|
||||
assert.match(page, /name="repeat" type="number" value="2"/);
|
||||
assert.match(page, /name="shuffle" value="1" type="checkbox" checked/);
|
||||
assert.match(page, /Open collage/);
|
||||
});
|
||||
@@ -238,6 +241,7 @@ test("renders a vertical scrolling collage page with repeated embed cards", () =
|
||||
spacing: 48,
|
||||
fade: 0,
|
||||
columns: 3,
|
||||
repeatDistance: 900,
|
||||
duration: 360,
|
||||
repeat: 3,
|
||||
shuffle: false,
|
||||
@@ -247,12 +251,17 @@ test("renders a vertical scrolling collage page with repeated embed cards", () =
|
||||
assert.match(page, /--collage-spacing:48px/);
|
||||
assert.match(page, /--collage-fade:0px/);
|
||||
assert.match(page, /--collage-columns:3/);
|
||||
assert.match(page, /--collage-card-width:500px/);
|
||||
assert.match(page, /--collage-card-width:576px/);
|
||||
assert.match(page, /--collage-duration:360s/);
|
||||
assert.equal((page.match(/class="embed collage-card provider-example"/g) || []).length, 12);
|
||||
assert.equal((page.match(/class="collage-group"/g) || []).length, 2);
|
||||
assert.match(page, /--embed-width:500px/);
|
||||
assert.doesNotMatch(page, /collage-card provider-example"[^>]*--embed-height/);
|
||||
assert.match(page, /<div class="collage-track"><\/div>/);
|
||||
assert.match(page, /<script id="collage-data" type="application\/json">/);
|
||||
assert.match(page, /"cardWidth":576/);
|
||||
assert.match(page, /"columns":3/);
|
||||
assert.match(page, /"repeatDistance":900/);
|
||||
assert.match(page, /"hydrateDelay":180/);
|
||||
assert.match(page, /"repeat":3/);
|
||||
assert.match(page, /"shuffle":false/);
|
||||
assert.match(page, /<script src="\/collage\.js"><\/script>/);
|
||||
});
|
||||
|
||||
test("shrinks collage card width to fit the configured screen width", () => {
|
||||
@@ -281,6 +290,5 @@ test("shrinks collage card width to fit the configured screen width", () => {
|
||||
});
|
||||
|
||||
assert.match(page, /--collage-card-width:260px/);
|
||||
assert.match(page, /--embed-width:260px/);
|
||||
assert.doesNotMatch(page, /collage-card provider-example"[^>]*--embed-height/);
|
||||
assert.match(page, /"cardWidth":260/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user