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

VUU-31 Layout Server POC #39

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f75a8aa
VUU-17: Save Layout panel
pling-scottlogic Aug 9, 2023
19d91de
VUU-17: Add index to lists
pling-scottlogic Aug 25, 2023
828a995
VUU-17: Remove unused CSS property
pling-scottlogic Aug 29, 2023
e7dfc52
VUU-17: Disable screenshot in CSS
pling-scottlogic Aug 29, 2023
2e35c11
VUU21: Add screenshot functionality to save layout dialog
cfisher-scottlogic Aug 14, 2023
9ac4952
VUU21: Configure Cypress for e2e testing
cfisher-scottlogic Aug 18, 2023
c2b2327
VUU21: Create e2e test for screenshot functionality
cfisher-scottlogic Aug 18, 2023
650972b
VUU21: Refactor Cypress directory structure to separate component/e2e
cfisher-scottlogic Aug 18, 2023
2d5b702
VUU21: Add unit test for screenshot-utils.ts
cfisher-scottlogic Aug 23, 2023
314902e
VUU21: Add ticket number to TODO comments
cfisher-scottlogic Aug 25, 2023
1bd9fff
VUU21: Revert aggressive formatting
cfisher-scottlogic Aug 25, 2023
ba5b5fb
VUU21: Remove unnecessary iframe ID as no longer used in e2e test
cfisher-scottlogic Aug 25, 2023
7250cc5
VUU-17: Sort Vuu icons
pling-scottlogic Aug 30, 2023
2c20084
VUU-17: Make RadioValue required
pling-scottlogic Aug 30, 2023
120c7d3
VUU-17: Default ChevronDownIcon to pointer cursor
pling-scottlogic Aug 30, 2023
667f07f
VUU-17: Give ChevronIcon configurable direction
pling-scottlogic Aug 30, 2023
e48a4a1
VUU-17: Move dialog header properties to Dialog.css
pling-scottlogic Aug 30, 2023
94d2654
VUU-17: Remove unnecessary class names
pling-scottlogic Aug 30, 2023
b055230
VUU-17: Reformat Dialog.tsx
pling-scottlogic Aug 30, 2023
9380d5c
VUU-17: Remove RadioIconProps interface
pling-scottlogic Aug 30, 2023
fae6582
VUU-17: Prefix class names with "saveLayoutPanel"
pling-scottlogic Aug 30, 2023
e2bc0f4
VUU-17: Remove headerProps
pling-scottlogic Aug 30, 2023
aa898c2
VUU21: Use associated component ID for screenshot node
heswell Aug 29, 2023
0c94ea8
VUU21: Revert HTML indentation
cfisher-scottlogic Aug 31, 2023
7af9ecc
VUU-17: Adjust radio icon styling
pling-scottlogic Aug 31, 2023
7f66f86
Merge pull request #29 from ScottLogic/feature/VUU-17-layoutSave
pling-scottlogic Sep 1, 2023
0d5af74
VUU-18 LayoutsLIst Component
vferraro-scottlogic Aug 30, 2023
fd8f7af
VUU-18 correct list source
vferraro-scottlogic Aug 30, 2023
887577e
VUU-18 remove unneeded styling
vferraro-scottlogic Sep 4, 2023
955e8c8
VUU-18 move type in own file and better naming for item
vferraro-scottlogic Sep 4, 2023
165872e
VUU-18 improve readability
vferraro-scottlogic Sep 4, 2023
0b5f264
VUU-18 use layoutMetadata id for key
vferraro-scottlogic Sep 4, 2023
0e3974e
VUU-33 add context for layouts
vferraro-scottlogic Sep 4, 2023
872ee5c
VUU-33 update LayoutList example
vferraro-scottlogic Sep 4, 2023
d8d0d3a
VUU-33 add click handler on List items
vferraro-scottlogic Sep 4, 2023
36edaed
Merge branch 'feature/layout-management/layout-management-feature' of…
vferraro-scottlogic Sep 4, 2023
9fc85d7
Merge branch 'feature/layout-management/VUU21-save-layout-screenshot'…
vferraro-scottlogic Sep 5, 2023
4409203
VUU-18 add classBase
vferraro-scottlogic Sep 5, 2023
620d116
Merge branch 'feature/VUU-18-browse-layouts' of https://github.com/Sc…
vferraro-scottlogic Sep 5, 2023
48caa96
VUU-18 allow to pass HTMLAttributes props to LayoutList
vferraro-scottlogic Sep 6, 2023
8909696
Merge pull request #23 from ScottLogic/feature/layout-management/VUU2…
vferraro-scottlogic Sep 6, 2023
5c5fc6c
Merge pull request #32 from ScottLogic/feature/VUU-18-browse-layouts
vferraro-scottlogic Sep 6, 2023
602b557
Merge branch 'feature/layout-management/layout-management-feature' of…
vferraro-scottlogic Sep 6, 2023
584be28
VUU-17: Style form fields with flex
pling-scottlogic Sep 4, 2023
3095bc4
VUU-17: Adjust font weight on labels
pling-scottlogic Sep 5, 2023
cb3c13b
VUU-17: Add styling for input text
pling-scottlogic Sep 5, 2023
82f0107
VUU-33 use componentId for screenshot
vferraro-scottlogic Sep 6, 2023
f7ceec0
Merge pull request #35 from ScottLogic/feature/VUU-33-Layout-Manager-…
vferraro-scottlogic Sep 6, 2023
90532e7
VUU-17: Refactor CSS
pling-scottlogic Sep 6, 2023
ab1e31d
VUU-17: Reorder CSS
pling-scottlogic Sep 6, 2023
e96ccf5
VUU-17: Use font variants in Dialog header
pling-scottlogic Sep 6, 2023
4ca634d
VUU-17: Replace TTF with WOFF
pling-scottlogic Sep 6, 2023
9dd148b
VUU-17: Refactor fonts
pling-scottlogic Sep 7, 2023
737bed8
Merge pull request #37 from ScottLogic/feature/layout-management/VUU1…
pling-scottlogic Sep 7, 2023
a4ddbeb
VUU-31 Layout Server POC
vferraro-scottlogic Sep 11, 2023
5aaed55
VUU-31 remove default layout from client
vferraro-scottlogic Sep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vuu-ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
"plugin:react-hooks/recommended",
"plugin:cypress/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down Expand Up @@ -39,8 +40,7 @@
},
"overrides": [
{
"files": ["*.cy.tsx"],
"extends": ["plugin:cypress/recommended"]
"files": ["*.cy.tsx"]
}
]
}
19 changes: 12 additions & 7 deletions vuu-ui/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { defineConfig } from "cypress";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
// import IstanbulPlugin from "vite-plugin-istanbul";
import { isCI } from "ci-info";
import path from "path";
import { mergeConfig, UserConfig } from "vite";
import { UserConfig } from "vite";
import { version as reactVersion } from "react";
// @ts-ignore
// import installCoverageTask from "@cypress/code-coverage/task";

let viteConfig: UserConfig = {
const viteConfig: UserConfig = {
plugins: [react(), tsconfigPaths() /*, IstanbulPlugin()*/],
server: {
watch: {
Expand Down Expand Up @@ -75,4 +70,14 @@ export default defineConfig({
},
specPattern: "packages/**/src/**/*.cy.{js,ts,jsx,tsx}",
},

e2e: {
baseUrl: "http://127.0.0.1:5173/",
// eslint-disable-next-line @typescript-eslint/no-unused-vars
setupNodeEvents(on, config) {
// implement node event listeners here
},
chromeWebSecurity: false,
defaultCommandTimeout: 10000,
},
});
29 changes: 29 additions & 0 deletions vuu-ui/cypress/e2e/layout-management/screenshot.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import "cypress-iframe";
import { SHELL_WITH_NEW_THEME_URL } from "../../support/e2e/constants";

context("Screenshot", () => {
beforeEach(() => {
cy.visit(SHELL_WITH_NEW_THEME_URL);
});

// TODO (#VUU24): Improve test alignment with the user flow
it("Takes a screenshot of the current layout and displays it in the save layout dialog", () => {
// TODO (#VUU24): Improve selector
cy.findByRole("tab", { name: "My Instruments" }).then((tab) => {
cy.wrap(tab).findByRole("button").click();
});

// TODO (#VUU24): Improve selector
cy.findByRole("menuitem", { name: "Save Layout" }).click();

// TODO (#VUU24): Don't find by classname, use an accessible selector
cy.get(".vuuSaveLayoutPanel").then((dialog) => {
cy.wrap(dialog)
.find("img")
.should("be.visible")
.and(($img) => {
expect($img[0].naturalWidth).to.be.greaterThan(0);
});
});
});
});
8 changes: 4 additions & 4 deletions vuu-ui/cypress/support/component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import "cypress-real-events";
// import "@cypress/code-coverage/support";
import "./assertions";
import "./commands";
import "./component/assertions";
import "./component/commands";

import "./cypress.css";
import "./index.css";
import "./component/cypress.css";
import "./component/index.css";

beforeEach(() => {
cy.window({ log: false }).focus({ log: false });
Expand Down
20 changes: 20 additions & 0 deletions vuu-ui/cypress/support/e2e.ts
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.ts using ES2015 syntax:
// import "./commands";

// Add support for testing library commands
import "@testing-library/cypress/add-commands";
2 changes: 2 additions & 0 deletions vuu-ui/cypress/support/e2e/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const SHELL_WITH_NEW_THEME_URL =
"/Apps/ShellWithNewTheme?standalone&theme=vuu";
5 changes: 4 additions & 1 deletion vuu-ui/cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["cypress"]
"types": ["cypress", "@testing-library/cypress"],
"typeRoots": [
"./support"
]
},
"include": ["**/*.tsx", "../cypress.d.ts"]
}
Loading