Merge branch 'master' into daisyUI
* master: hide netlify on github format netlify hide netlify on github Fix clock Fix clock Update mermaid Fix test Fix test Fix test Fix test remove eslint ignors Fix test Add powered by netlify
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
describe('Check actions', () => {
|
||||
// eslint-disable-next-line mocha/no-hooks-for-single-case
|
||||
beforeEach(() => {
|
||||
cy.clearLocalStorage();
|
||||
cy.visit('/edit');
|
||||
cy.contains('Actions').click();
|
||||
});
|
||||
it('should update markdown code', () => {
|
||||
cy.get('#markdown')
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
describe('Save History', () => {
|
||||
beforeEach(() => {
|
||||
cy.clock();
|
||||
cy.clearLocalStorage();
|
||||
cy.visit('/edit');
|
||||
cy.contains('Actions').click();
|
||||
cy.contains('History').click();
|
||||
});
|
||||
|
||||
it('should save when clicked', () => {
|
||||
cy.get('#historyList').find('li').should('have.length', 0);
|
||||
cy.get('#historyList').contains('No items in History');
|
||||
@@ -43,7 +47,6 @@ describe('Save History', () => {
|
||||
});
|
||||
|
||||
it('should auto save history', () => {
|
||||
cy.clock();
|
||||
cy.get('#editor').type(' C --> HistoryTest');
|
||||
cy.tick(70000);
|
||||
cy.contains('Timeline').click();
|
||||
|
||||
@@ -34,6 +34,7 @@ describe('Site Loads', () => {
|
||||
|
||||
it('should load diagram from gist', () => {
|
||||
cy.visit(`/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a`);
|
||||
cy.contains('History').click();
|
||||
cy.contains('Go shopping!!');
|
||||
cy.contains('Revisions');
|
||||
cy.contains('sidharthv96 v8f8f1e2');
|
||||
@@ -45,6 +46,7 @@ describe('Site Loads', () => {
|
||||
cy.visit(
|
||||
'/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/ec9b4ab0e41e4ff6287326cd3cb47affd7851e19'
|
||||
);
|
||||
cy.contains('History').click();
|
||||
cy.contains('Party');
|
||||
cy.contains('Revisions');
|
||||
cy.contains('sidharthv96 v7851e19');
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@
|
||||
"daisyui": "^1.12.1",
|
||||
"analytics": "^0.7.14",
|
||||
"js-base64": "^3.6.1",
|
||||
"mermaid": "^8.11.4",
|
||||
"mermaid": "^8.12.1",
|
||||
"moment": "^2.29.1",
|
||||
"monaco-editor": "^0.27.0",
|
||||
"random-word-slugs": "^0.0.5"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { browser } from '$app/env';
|
||||
|
||||
import Card from '$lib/components/card/card.svelte';
|
||||
import type { State } from '$lib/types';
|
||||
import { codeStore } from '$lib/util/state';
|
||||
@@ -131,6 +133,10 @@
|
||||
let imagemodeselected = 'auto';
|
||||
let userimagesize = 1080;
|
||||
|
||||
let isNetlify = false;
|
||||
if (browser && ['mermaid.live', 'netlify'].some((path) => window.location.host.includes(path))) {
|
||||
isNetlify = true;
|
||||
}
|
||||
codeStore.subscribe((state: State) => {
|
||||
const stateCopy = JSON.parse(JSON.stringify(state));
|
||||
if (typeof stateCopy.mermaid === 'string') {
|
||||
@@ -208,8 +214,12 @@
|
||||
<button class="btn btn-primary btn-md flex-auto" on:click={loadGist}> Load Gist </button>
|
||||
</label>
|
||||
</div>
|
||||
<div class="w-full flex items-center">
|
||||
<a class="link" href="https://netlify.com">This site is powered by Netlify</a>
|
||||
</div>
|
||||
{#if isNetlify}
|
||||
<div class="w-full flex items-center justify-center">
|
||||
<a class="link underline text-gray-500 text-sm" href="https://netlify.com">
|
||||
This site is powered by Netlify
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user