Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve visyn app with context, store awareness, ... #824

Merged
merged 10 commits into from
Feb 9, 2023
Merged
11 changes: 9 additions & 2 deletions cypress/component/component-health-check.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import * as React from 'react';
import { mount } from 'cypress/react';
import { MainApp } from '../../src/demo/MainApp';
import { VisynAppProvider } from '../../src/visynApp';
// Load the phovea_registry to ensure all extension points (like locales) are loaded.
import '../../src/phovea_registry';

describe('Health check for Cypress component test', () => {
it('should mount MainApp', () => {
mount(<MainApp />);
cy.get('body').should('include.text', 'Visualization type');
mount(
<VisynAppProvider appName="Demo App">
<MainApp />
</VisynAppProvider>,
);
cy.get('body').should('include.text', 'Demo App');
});
});
12 changes: 12 additions & 0 deletions cypress/e2e/health-check.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
describe('Health check for Cypress e2e test', () => {
it('should visit the home page', () => {
cy.visit('/');
// Login first using the new modal
cy.get('[data-testid="visyn-login-modal"]').should('include.text', 'Demo App');
cy.get('input[name="username"]').type('admin');
cy.get('input[name="password"]').type('admin');
cy.get('button[type="submit"]').click();
// Assert the content is now visible
cy.get('body').should('include.text', 'Visualization type');
// Check the user avatar, and then log out again
cy.get('[data-testid="visyn-user-avatar"]').should('include.text', 'A').click().parent().contains('Logout').click();
// Assert the login modal to be shown again
cy.get('[data-testid="visyn-login-modal"]').should('be.visible');
// Assert the content to be invisible again
cy.get('body').should('not.include.text', 'Visualization type');
});
});
22 changes: 1 addition & 21 deletions dist/ATDPApplication.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ATDPApplication.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions dist/ATDPApplication.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ATDPApplication.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/datavisyn_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions dist/base/LoginUtils.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/base/LoginUtils.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/base/LoginUtils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading