From 7ff729e1ce6e7aa505c63760f42d65b9f66116b8 Mon Sep 17 00:00:00 2001 From: Martin Middel Date: Tue, 3 Oct 2023 16:45:00 +0200 Subject: [PATCH] Add test for url overwrite demo --- cypress.config.ts | 1 + cypress/e2e/submission-url-overwrite.cy.ts | 7 +++++++ cypress/tsconfig.json | 8 ++++++++ package.json | 4 ++-- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 cypress/e2e/submission-url-overwrite.cy.ts create mode 100644 cypress/tsconfig.json diff --git a/cypress.config.ts b/cypress.config.ts index 828c0a38..a42e1e8b 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -3,6 +3,7 @@ import { defineConfig } from "cypress"; export default defineConfig({ e2e: { baseUrl: 'http://localhost:8090/demo/', + experimentalStudio: true, setupNodeEvents(on, config) { // implement node event listeners here diff --git a/cypress/e2e/submission-url-overwrite.cy.ts b/cypress/e2e/submission-url-overwrite.cy.ts new file mode 100644 index 00000000..1c47e805 --- /dev/null +++ b/cypress/e2e/submission-url-overwrite.cy.ts @@ -0,0 +1,7 @@ +describe('submission-url-overwrite demo', () => { + it('passes', () => { + cy.visit('localhost:8090/demo/submission-url-overwrite.html') + cy.get('.widget').type('some data{enter}'); + cy.get('fx-output').shadow().find('#value').should('have.text', 'some data'); + }) +}) diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 00000000..18edb199 --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["es5", "dom"], + "types": ["cypress", "node"] + }, + "include": ["**/*.ts"] +} diff --git a/package.json b/package.json index c3100cde..7443fcc9 100644 --- a/package.json +++ b/package.json @@ -86,8 +86,8 @@ "start": "es-dev-server --app-index doc/index.html --node-resolve --watch --open", "preversion": "npm run test", "version": "npm run build && git add -A dist", - "postversion": "git nppush && git push --tags && rm -rf build/", - "install-demos": "cd demo && npm i", + "postversion": "git nppush && git push --tags && rm -rf build/", + "install-demos": "cd demo && npm i", "start-cypress": "es-dev-server --app-index doc/index.html --node-resolve" }, "keywords": [