package com.cottondb.musicimport android.app.Applicationimport androidx.compose.ui.test.junit4.createComposeRuleimport com.cottondb.music.faces.AmpFaceimport com.cottondb.music.faces.MusicMaterialimport com.cottondb.specimen.SPECIMEN_SCREENimport com.cottondb.specimen.cardimport com.cottondb.specimen.specimenimport org.junit.Ruleimport org.junit.Testimport org.junit.runner.RunWithimport org.robolectric.RobolectricTestRunnerimport org.robolectric.annotation.Configimport org.robolectric.annotation.GraphicsMode/** The amp head (SongAmpFace.swift) as Music's APK carries it, the clock held still. */@RunWith(RobolectricTestRunner::class)@GraphicsMode(GraphicsMode.Mode.NATIVE)@Config(sdk = [35], qualifiers = SPECIMEN_SCREEN, application = Application::class)classAmpSpecimenTest { @get:Ruleval compose = createComposeRule()privateval s = PlayerSpecimensprivatefun shot(name: String, json: String, cover: Boolean, playing: Boolean, elapsed: Double, duration: Double) { compose.mainClock.autoAdvance = false compose.specimen("music", name, 360, 520, MusicMaterial.tolex) {AmpFace(card(json), s.lines, if (cover) s.cover() elsenull, s.play(playing, elapsed, duration)) } }/** RULE: playing 2:14 into 4:02: the jewel lit, the knob at the share played, the cover round behind the cloth, the volume at seven tenths. */ @Test fun ampPlaying() = shot("amp-playing", s.harbour("song.amp", volume = true), true, true, 134.0, 242.0)/** RULE: paused: the jewel dark, the record standing where it stopped. */ @Test fun ampPaused() = shot("amp-paused", s.harbour("song.amp", volume = true), true, false, 134.0, 242.0)/** RULE: with no cover the blank label behind the cloth is typed, and the sleeve's typeset blank leans upper left. */ @Test fun ampNoCover() = shot("amp-no-cover", s.harbour("song.amp", volume = true), false, true, 61.0, 242.0)/** RULE: a long name takes two lines in the hand on the top band; no volume carried stands the knob at seven o'clock. */ @Test fun ampLongTitle() = shot("amp-long-title", s.largest("song.amp", 403), false, true, 312.0, 403.0)}