mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
3 lines
7.4 KiB
JavaScript
3 lines
7.4 KiB
JavaScript
import{_ as s}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as i,a as t,o as a}from"./app-42vVvAb-.js";const n="/assets/grafik-1%20(1)-D9Bz6W0K.png",r="/assets/grafik%20(1)-BTXGtrIV.png",l={};function h(o,e){return a(),i("div",null,e[0]||(e[0]=[t(`<h1 id="end-to-end-testing" tabindex="-1"><a class="header-anchor" href="#end-to-end-testing"><span>End-to-End Testing</span></a></h1><h2 id="setup-with-docker" tabindex="-1"><a class="header-anchor" href="#setup-with-docker"><span>Setup with docker</span></a></h2><p>Are you running everything through docker? You're so lucky you don't have to setup anything!</p><p>Just:</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">$</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> docker-compose</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> up</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><h2 id="setup-without-docker" tabindex="-1"><a class="header-anchor" href="#setup-without-docker"><span>Setup without docker</span></a></h2><p>To start the services that are required for cypress testing manually. You basically need the whole setup to run:</p><ul><li>backend</li><li>webapp</li><li>neo4j</li></ul><p>Navigate to the corresponding folders and start the services.</p><h2 id="install-cypress" tabindex="-1"><a class="header-anchor" href="#install-cypress"><span>Install cypress</span></a></h2><p>Even if the required services for testing run via docker, depending on your setup, the cypress tests themselves run on your host machine. So with our without docker, you would have to install cypress and its dependencies first:</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># in the root folder /</span></span>
|
|
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">$</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> yarn</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> install</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="open-interactive-test-console" tabindex="-1"><a class="header-anchor" href="#open-interactive-test-console"><span>Open Interactive Test Console</span></a></h3><p>The interactive cypress test console allows to run tests and have visual feedback on that. The interactive cypress environment also helps at debugging the tests, you can even time travel between individual steps and see the exact state of the app.</p><p>To use this feature run:</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">$</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> yarn</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> cypress:open</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><figure><img src="`+n+'" alt="Interactive Cypress Environment" tabindex="0" loading="lazy"><figcaption>Interactive Cypress Environment</figcaption></figure><h2 id="run-cypress" tabindex="-1"><a class="header-anchor" href="#run-cypress"><span>Run cypress</span></a></h2><p>To run cypress without the user interface:</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">$</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> yarn</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> cypress:run</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>This is used to run cypress in CI or in console</p><figure><img src="'+r+'" alt="Console output after running cypress test" tabindex="0" loading="lazy"><figcaption>Console output after running cypress test</figcaption></figure><h2 id="write-some-tests" tabindex="-1"><a class="header-anchor" href="#write-some-tests"><span>Write some Tests</span></a></h2><p>Check out the Cypress documentation for further information on how to write tests: <a href="https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Write-a-simple-test" target="_blank" rel="noopener noreferrer">Write-a-simple-test</a></p>',24)]))}const c=s(l,[["render",h],["__file","index.html.vue"]]),u=JSON.parse(`{"path":"/cypress/","title":"End-to-End Testing","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Setup with docker","slug":"setup-with-docker","link":"#setup-with-docker","children":[]},{"level":2,"title":"Setup without docker","slug":"setup-without-docker","link":"#setup-without-docker","children":[]},{"level":2,"title":"Install cypress","slug":"install-cypress","link":"#install-cypress","children":[{"level":3,"title":"Open Interactive Test Console","slug":"open-interactive-test-console","link":"#open-interactive-test-console","children":[]}]},{"level":2,"title":"Run cypress","slug":"run-cypress","link":"#run-cypress","children":[]},{"level":2,"title":"Write some Tests","slug":"write-some-tests","link":"#write-some-tests","children":[]}],"git":{"createdTime":1752750935000,"updatedTime":1752750935000,"contributors":[{"name":"dependabot[bot]","email":"49699333+dependabot[bot]@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":0.79,"words":237},"filePathRelative":"cypress/README.md","localizedDate":"July 17, 2025","excerpt":"\\n<h2>Setup with docker</h2>\\n<p>Are you running everything through docker? You're so lucky you don't have to\\nsetup anything!</p>\\n<p>Just:</p>\\n<div class=\\"language-bash line-numbers-mode\\" data-highlighter=\\"shiki\\" data-ext=\\"bash\\" data-title=\\"bash\\" style=\\"--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34\\"><pre class=\\"shiki shiki-themes one-light one-dark-pro vp-code\\"><code><span class=\\"line\\"><span style=\\"--shiki-light:#4078F2;--shiki-dark:#61AFEF\\">$</span><span style=\\"--shiki-light:#50A14F;--shiki-dark:#98C379\\"> docker-compose</span><span style=\\"--shiki-light:#50A14F;--shiki-dark:#98C379\\"> up</span></span></code></pre>\\n<div class=\\"line-numbers\\" aria-hidden=\\"true\\" style=\\"counter-reset:line-number 0\\"><div class=\\"line-number\\"></div></div></div>"}`);export{c as comp,u as data};
|