create(); $url = route('share.download', $share); $svg = app(QrCodeService::class)->svg($url); $response = $this->get(route('share.created', $share)); $response->assertOk() ->assertSee($url, false) ->assertSee('data-test="show-qr-code"', false) ->assertSee('data-test="share-sheet"', false) ->assertSee('share-'.$share->token.'.png') ->assertDontSee('Recipients also need the password.'); // Structure, not the 1.x class string: the `data-qr-code` hook directly wraps the service's own // SVG, which draws its own white field and quiet zone — no colour class or literal colour here. expect($response->getContent()) ->toMatch('#]*\bdata-qr-code\b[^>]*>'.preg_quote($svg, '#').'#'); }); test('the QR code dialog reminds that a protected share also needs its password', function () { $share = Share::factory()->withPassword()->create(); $this->get(route('share.created', $share)) ->assertOk() ->assertSee('Recipients also need the password.'); });