diff --git a/dockerfiles/Dockerfile-gui-tests b/dockerfiles/Dockerfile-gui-tests index 4e4108d2d..9f0440331 100644 --- a/dockerfiles/Dockerfile-gui-tests +++ b/dockerfiles/Dockerfile-gui-tests @@ -61,9 +61,9 @@ RUN apt-get install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain nightly --no-modify-path --profile minimal ENV PATH="/root/.cargo/bin:${PATH}" -RUN curl -sL https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz | tar -xJ -ENV PATH="/node-v14.4.0-linux-x64/bin:${PATH}" -ENV NODE_PATH="/node-v14.4.0-linux-x64/lib/node_modules/" +RUN curl -sL https://nodejs.org/dist/v22.13.1/node-v22.13.1-linux-x64.tar.xz | tar -xJ +ENV PATH="/node-v22.13.1-linux-x64/bin:${PATH}" +ENV NODE_PATH="/node-v22.13.1-linux-x64/lib/node_modules/" WORKDIR /build @@ -74,7 +74,7 @@ RUN mkdir out # https://github.com/puppeteer/puppeteer/issues/375 # # We also specify the version in case we need to update it to go around cache limitations. -RUN npm install -g browser-ui-test@0.16.10 --unsafe-perm=true +RUN npm install -g browser-ui-test@0.20.1 --unsafe-perm=true EXPOSE 3000 diff --git a/gui-tests/long-crate-name.goml b/gui-tests/long-crate-name.goml new file mode 100644 index 000000000..43ffb9b2e --- /dev/null +++ b/gui-tests/long-crate-name.goml @@ -0,0 +1,16 @@ +// Checks that the crate name in release list doesn't overflow when hovered. + +go-to: |DOC_PATH| +// We reduce the width to 800px because the text will be on 3 different lines. Meaning +// that if it overflows, the height will be smaller than expected since it will only take +// 2 lines. +set-window-size: (1200, 600) +set-text: ("ul a.release .name", "blabla_under_something_longname_right-0.7.0") +move-cursor-to: "ul a.release .name" +assert-css: ("ul a.release .name:hover", { "line-height": "22.4px" }) +// 45 / 2 = 22.5, so it's on 2 lines +assert-size: ("ul a.release .name:hover", { "height": 45 }) +// We reduce the width to it should now take 3 lines. +set-window-size: (800, 600) +// 67 / 2 = 33.5, so it's more than 2 lines +assert-size: ("ul a.release .name:hover", { "height": 67 }) diff --git a/gui-tests/tester.js b/gui-tests/tester.js index 4ab8d0187..147498de4 100644 --- a/gui-tests/tester.js +++ b/gui-tests/tester.js @@ -122,9 +122,7 @@ async function main(argv) { const options = new Options(); try { // This is more convenient that setting fields one by one. - const args = [ - "--no-sandbox", - ]; + const args = []; if (typeof process.env.SERVER_URL !== "undefined") { args.push("--variable", "DOC_PATH", process.env.SERVER_URL); } else { diff --git a/gui-tests/topbar-resize.goml b/gui-tests/topbar-resize.goml index 252baa813..62282a071 100644 --- a/gui-tests/topbar-resize.goml +++ b/gui-tests/topbar-resize.goml @@ -4,7 +4,7 @@ store-value: (window_height, 1000) define-function: ( "check-topbar", - (width, text_display, search_display, search_max_width), + [width, text_display, search_display, search_max_width], block { set-window-size: (|width|, |window_height|) wait-for-css: (".nav-container > .container a > .title", {"display": |text_display|}) @@ -24,7 +24,7 @@ define-function: ( define-function: ( "check-topbar-sizes", - (), + [], block { set-window-size: (1100, |window_height|) store-size: ("body > .nav-container", {"height": top_navbar_height}) @@ -92,7 +92,7 @@ define-function: ( ) go-to: |DOC_PATH| + "/sysinfo" -call-function: ("check-topbar-sizes", ()) +call-function: ("check-topbar-sizes", {}) go-to: |DOC_PATH| + "/releases/search?query=sysinfo" -call-function: ("check-topbar-sizes", ()) +call-function: ("check-topbar-sizes", {}) diff --git a/templates/core/home.html b/templates/core/home.html index 1e3cb0247..1e2d60cc3 100644 --- a/templates/core/home.html +++ b/templates/core/home.html @@ -36,7 +36,7 @@