Skip to content

armgit / cra

Public Imported from GitHub
0

The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.

675 B
Raw Blame
import CraCore
import Testing

/// Arc's "Block Cookie Banners": the consent managers' containers are hidden, nothing else.
struct CookieBannersTests {
    @Test(arguments: ["#onetrust-banner-sdk", "#CybotCookiebotDialog", "#didomi-host", ".qc-cmp2-container", "#usercentrics-root"])
    func hidesTheBigConsentManagers(selector: String) {
        #expect(CookieBanners.css.contains(selector))
    }

    @Test func hidesOnlyIdsClassesAndAttributes() {
        // No bare element selectors: they would hide parts of every page.
        for s in CookieBanners.selectors {
            #expect(s.hasPrefix("#") || s.hasPrefix(".") || s.hasPrefix("["), "\(s)")
        }
    }
}