-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Dockerfile, Cypress, code generation
- Loading branch information
Showing
10 changed files
with
219 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { defineConfig } from 'cypress'; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:3001', | ||
retries: { | ||
runMode: 1, | ||
openMode: 1, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
const isV2 = false; | ||
const isV3 = true; | ||
|
||
/* Testing commented hovers is impossible even with `cypress-real-events` so | ||
testing of these hovers is postponed until either Cypress has better support for | ||
`mouseover`/`mouseenter` events or the architecture of `Studio` is changed to | ||
allow testing those. */ | ||
|
||
describe('Studio UI spec', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
}); | ||
|
||
it('Logo should be visible in the UI', () => { | ||
cy.get('[data-test="logo"]').should('be.visible'); | ||
}); | ||
|
||
// it('Logo should display tooltip "AsyncAPI Logo" on hover', () => { | ||
// cy.get('[data-test="logo"]').trigger('mouseenter'); | ||
// cy.contains('AsyncAPI Logo').should('be.visible'); | ||
// }); | ||
|
||
it('Button "AsyncAPI Website" should be visible in the UI', () => { | ||
cy.get('[data-test="button-website"]').should('be.visible'); | ||
}); | ||
|
||
// it('Button "AsyncAPI Website" should display tooltip "AsyncAPI Website" on hover', () => { | ||
// cy.get('[data-test="button-website"]').trigger('mouseenter'); | ||
// cy.contains('AsyncAPI Website').should('be.visible'); | ||
// }); | ||
|
||
it('Button "AsyncAPI Github Organization" should be visible in the UI', () => { | ||
cy.get('[data-test="button-github"]').should('be.visible'); | ||
}); | ||
|
||
// it('Button "AsyncAPI Github Organization" should display tooltip "AsyncAPI Github Organization" on hover', () => { | ||
// cy.get('[data-test="button-github"]').trigger('mouseenter'); | ||
// cy.contains('AsyncAPI Github Organization').should('be.visible'); | ||
// }); | ||
|
||
it('Button "AsyncAPI Slack Workspace" should be visible in the UI', () => { | ||
cy.get('[data-test="button-slack"]').should('be.visible'); | ||
}); | ||
|
||
// it('Button "AsyncAPI Slack Workspace" should display tooltip "AsyncAPI Slack Workspace" on hover', () => { | ||
// cy.get('[data-test="button-slack"]').trigger('mouseenter'); | ||
// cy.contains('AsyncAPI Slack Workspace').should('be.visible'); | ||
// }); | ||
|
||
it('Button "Navigation" should be visible in the UI', () => { | ||
cy.get('[data-test="button-navigation"]').should('be.visible'); | ||
}); | ||
|
||
it('Button "Navigation" should display tooltip "Navigation" on hover', () => { | ||
cy.get('[data-test="button-navigation"]').trigger('mouseenter'); | ||
cy.contains('Navigation').should('be.visible'); | ||
}); | ||
|
||
it('Button "Editor" should be visible in the UI', () => { | ||
cy.get('[data-test="button-editor"]').should('be.visible'); | ||
}); | ||
|
||
it('Button "Editor" should display tooltip "Editor" on hover', () => { | ||
cy.get('[data-test="button-editor"]').trigger('mouseenter'); | ||
cy.contains('Editor').should('be.visible'); | ||
}); | ||
|
||
it('Button "Template preview" should be visible in the UI', () => { | ||
cy.get('[data-test="button-template-preview"]').should('be.visible'); | ||
}); | ||
|
||
it('Button "Template preview" should display tooltip "Template preview" on hover', () => { | ||
cy.get('[data-test="button-template-preview"]').trigger('mouseenter'); | ||
cy.contains('Template preview').should('be.visible'); | ||
}); | ||
|
||
if (isV2) { | ||
it('Button "Blocks visualiser" should be visible in the UI', () => { | ||
cy.get('[data-test="button-blocks-visualiser"]').should('be.visible'); | ||
}); | ||
|
||
it('Button "Blocks visualiser" should display tooltip "Blocks visualiser" on hover', () => { | ||
cy.get('[data-test="button-blocks-visualiser"]').trigger('mouseenter'); | ||
cy.contains('Blocks visualiser').should('be.visible'); | ||
}); | ||
} | ||
|
||
it('Button "New file" should be visible in the UI', () => { | ||
cy.get('[data-test="button-new-file"]').should('be.visible'); | ||
}); | ||
|
||
it('Button "New file" should display tooltip "New file" on hover', () => { | ||
cy.get('[data-test="button-new-file"]').trigger('mouseenter'); | ||
cy.contains('New file').should('be.visible'); | ||
}); | ||
|
||
it('Button "Studio settings" should be visible in the UI', () => { | ||
cy.get('[data-test="button-studio-settings"]').should('be.visible'); | ||
}); | ||
|
||
it('Button "Studio settings" should display tooltip "Studio settings" on hover', () => { | ||
cy.get('[data-test="button-studio-settings"]').trigger('mouseenter'); | ||
cy.contains('Studio settings').should('be.visible'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters