From 748a763416ff1bf018a4e425f78d01b39f460dd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 30 Jul 2015 22:48:37 +0200 Subject: [PATCH] Assert that the selection is somewhat random --- src/main/resources/static/css/sone.css | 92 ++++++++++++---------- .../sone/template/ListAccessorTest.java | 4 +- 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 557ea46..68c9878 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -353,32 +353,32 @@ textarea { cursor: pointer; } -#sone .post .linked-album { +#sone .linked-album { display: table; margin-top: 1ex; border-collapse: collapse; } -#sone .post .linked-album .album-header { +#sone .linked-album .album-header { display: table-caption; margin-bottom: 1ex; } -#sone .post .linked-album .album-header .album-title { +#sone .linked-album .album-header .album-title { font-size: 150%; font-weight: bold; } -#sone .post .linked-image { +#sone .linked-image { display: table-row; } -#sone .post .linked-image .image-left { +#sone .linked-image .image-left { display: table-cell; padding-bottom: 1ex; } -#sone .post .linked-image .image { +#sone .linked-image .image { width: 160px; height: 90px; overflow: hidden; @@ -387,17 +387,17 @@ textarea { padding: 0px; } -#sone .post .linked-image .about-image { +#sone .linked-image .about-image { display: table-cell; padding-left: 1ex; } -#sone .post .linked-image .about-image .title { +#sone .linked-image .about-image .title { font-size: 110%; font-weight: bold; } -#sone .post .linked-image .about-image .description { +#sone .linked-image .about-image .description { margin-top: 0.5ex; } @@ -726,62 +726,68 @@ textarea { display: inline; } -#sone .album { +#sone .image .edit-image input, #sone .album .edit-album input { + width: 95%; } -#sone .image-row, #sone .album-row { - display: table-row; +#sone .image .edit-image textarea, #sone .album .edit-album textarea { + width: 95%; } -#sone .image-container, #sone .album-container { - width: 250px; - height: 250px; - overflow: hidden; - padding: -1px; +#sone .album-row, #sone .image-row { + display: table-row; + border-collapse: separate; } -#sone .image-container { - border: solid 1px #000; +#sone .album-row .album, #sone .image-row .image-in-album { + display: table-cell; + width: 50%; } -#sone .image, #sone .album { - display: table-cell; - vertical-align: top; - text-align: center; - padding: 0.5ex; +#sone .image-with-information { + position: relative; + margin-top: 1ex; + margin-bottom: 1ex; + height: 120px; } -#sone .single-image img { +#sone .image { + position: absolute; border: solid 1px #000; - background-color: #fff; + width: 160px; + height: 120px; + overflow: hidden; } -#sone .image .edit-image input, #sone .album .edit-album input { - width: 95%; +#sone .image img { + position: absolute; } -#sone .image .edit-image textarea, #sone .album .edit-album textarea { - width: 95%; +#sone .information { + margin-left: 160px; + padding-left: 1ex; } -#sone .album-container .image-container { - position: absolute; +#sone .image-with-information .information .link { + display: inline; + font-size: 80%; } -#sone .album-container .link-to-album { - display: none; +#sone .image-with-information .information .link a { + text-decoration: none; +} + +#sone .image-with-information .information .title { + display: inline; + font-weight: bold; } -#sone .album-container:hover .link-to-album { +#sone .image-with-information .information .author { display: block; - float: right; - z-index: 1; - padding: 0.5ex; - background-color: #eee; - position: relative; - top: 250px; - right: 0.5ex; - margin-top: -2em; +} + +#sone .image-with-information .information .description { + margin-top: 1ex; } #sone .image .album-sone { diff --git a/src/test/java/net/pterodactylus/sone/template/ListAccessorTest.java b/src/test/java/net/pterodactylus/sone/template/ListAccessorTest.java index 0c63aca..e51692d 100644 --- a/src/test/java/net/pterodactylus/sone/template/ListAccessorTest.java +++ b/src/test/java/net/pterodactylus/sone/template/ListAccessorTest.java @@ -1,7 +1,9 @@ package net.pterodactylus.sone.template; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.greaterThanOrEqualTo; +import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.sameInstance; @@ -44,7 +46,7 @@ public class ListAccessorTest { gotFirst++; } } - assertThat(gotFirst, greaterThanOrEqualTo(4000)); + assertThat(gotFirst, allOf(greaterThanOrEqualTo(4000), lessThanOrEqualTo(6000))); } } -- 2.7.4