PHP Classes

File: tests/js/app-anchor.test.js

Recommend this page to a friend!
  Packages of Alberto Arena   Laravel Truss   tests/js/app-anchor.test.js   Download  
File: tests/js/app-anchor.test.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Truss
View a diagram of a Laravel application models
Author: By
Last change:
Date: 9 days ago
Size: 768 bytes
 

Contents

Class file image Download
import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { describe, it, expect } from 'vitest'; const css = readFileSync( fileURLToPath(new URL('../../resources/css/truss.css', import.meta.url)), 'utf8' ); const appRule = css.match(/#truss-app\s*\{[^}]*\}/)?.[0] ?? ''; // The legend and the other absolutely-positioned overlays anchor to #truss-app, // so it must establish a positioning context. Without one they fall back to the // viewport and land over the toolbar when the dashboard is embedded below other // chrome (e.g. an iframe or the docs demo's site bar). describe('#truss-app positioning context', () => { it('is a positioned container', () => { expect(appRule).toMatch(/position\s*:\s*relative/); }); });