Skip to content

Commit 0a8c86d

Browse files
Merge pull request #214 from amosproj/int
sprint-13-release
2 parents b005c1b + 147b604 commit 0a8c86d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+10844
-3264
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI Test Docker Generator
2+
3+
on:
4+
push:
5+
paths:
6+
- 'Apps/generator/**.*'
7+
- '.github/workflows/test-generator-codecov.yml'
8+
pull_request:
9+
branches:
10+
- "dev"
11+
- "int"
12+
- "main"
13+
14+
jobs:
15+
coverage:
16+
runs-on: ubuntu-latest
17+
env:
18+
CARGO_TERM_COLOR: always
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Install Rust
22+
run: rustup update stable
23+
- name: Install cargo-llvm-cov
24+
uses: taiki-e/install-action@cargo-llvm-cov
25+
- name: Generate code coverage
26+
working-directory: ./Apps/generator
27+
run: cargo llvm-cov --fail-under-lines 70

Apps/frontend/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ dist-ssr
2525
/cypress/fixtures/
2626
/cypress/screenshots/
2727
/cypress/videos/
28+
29+
# Code coverage report
30+
coverage
31+
.nyc_output

Apps/frontend/cypress.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { defineConfig } from "cypress";
2+
import codeCoverage from "@cypress/code-coverage/task.js";
23

34
export default defineConfig({
45
e2e: {
5-
// setupNodeEvents(on, config) {
6-
// // implement node event listeners here
7-
// },
6+
setupNodeEvents(on, config) {
7+
codeCoverage(on, config);
8+
return config;
9+
},
810
},
911
});

Apps/frontend/cypress/e2e/2-control-panel/preset-config.cy.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ describe("everything visible on front page", () => {
99
cy.get('[data-cy="settings-button"]').should("be.visible");
1010
});
1111

12+
it("shows tooltip on hover", () => {
13+
cy.get('[data-cy="settings-button"]').trigger("mouseover");
14+
cy.get('[data-cy="settings-button-tooltip"]').should("be.visible");
15+
});
16+
1217
it("is clickable", () => {
1318
cy.get('[data-cy="settings-button"]').click();
1419
cy.get('[data-cy="preset-config-open-popup"]').should("be.visible");
@@ -17,4 +22,10 @@ describe("everything visible on front page", () => {
1722
cy.get('[data-cy="selected-preset"]').should("be.visible");
1823
cy.get('[data-cy="store-channel-config"]').should("be.visible");
1924
});
25+
26+
it("closes popup on click outside", () => {
27+
cy.get('[data-cy="settings-button"]').click();
28+
cy.get('[data-cy="oscilloscope"]').click();
29+
cy.get('[data-cy="preset-config-open-popup"]').should("not.be.visible");
30+
});
2031
});
Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
1-
describe("indicators", () => {
1+
describe("LineIndicators", () => {
22
beforeEach(() => {
33
cy.visit("http://localhost:5173/");
44
});
55

66
it("is visible", () => {
7-
cy.get('[data-cy="indicators"]').should("be.visible");
7+
cy.get('[data-cy="line-indicators"]').should("be.visible");
8+
});
9+
});
10+
11+
describe("TextIndicators", () => {
12+
beforeEach(() => {
13+
cy.visit("http://localhost:5173/");
14+
});
15+
16+
it("are visible", () => {
17+
cy.get('[data-cy="text-indicators"]').should("be.visible");
18+
});
19+
20+
it("have correct colors", () => {
21+
let expectedColors = [
22+
"rgb(230, 0, 73)",
23+
"rgb(11, 180, 255)",
24+
"rgb(80, 233, 145)",
25+
"rgb(230, 216, 0)",
26+
"rgb(155, 25, 245)",
27+
"rgb(255, 163, 0)",
28+
"rgb(220, 10, 180)",
29+
"rgb(179, 212, 255)",
30+
"rgb(0, 191, 160)",
31+
"rgb(128, 143, 128)",
32+
];
33+
cy.get('[data-cy="text-indicators"]')
34+
.find("tr")
35+
.each((tr, i) => {
36+
cy.wrap(tr).should("have.css", "color").and("equal", expectedColors[i]);
37+
});
838
});
939
});

Apps/frontend/cypress/e2e/3-control-panel-top/distribute-button.cy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ describe("distributeButton", () => {
1313
it("is clickable", () => {
1414
cy.get('[data-cy="distribute-button"]').click();
1515
});
16+
17+
it("shows tooltip on hover", () => {
18+
cy.get('[data-cy="distribute-button"]').trigger("mouseover");
19+
cy.get('[data-cy="distribute-button-tooltip"]').should("be.visible");
20+
});
1621
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference types="cypress" />
2+
3+
describe("GeneralButtons", () => {
4+
beforeEach(() => {
5+
cy.visit("http://localhost:5173/");
6+
});
7+
8+
it("resets on off button when reset button is clicked", () => {
9+
cy.get('[data-cy="on-off-button"]').click();
10+
cy.get('[data-cy="reset-button"]').click();
11+
cy.get('[data-cy="on-off-button"]').should("have.class", "icon--on");
12+
});
13+
});

Apps/frontend/cypress/e2e/3-control-panel-top/gnd-button.cy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ describe("gndButton", () => {
1313
it("is clickable", () => {
1414
cy.get('[data-cy="gnd-button"]').click();
1515
});
16+
17+
it("shows tooltip on hover", () => {
18+
cy.get('[data-cy="gnd-button"]').trigger("mouseover");
19+
cy.get('[data-cy="gnd-button-tooltip"]').should("be.visible");
20+
});
1621
});

Apps/frontend/cypress/e2e/3-control-panel-top/on-off-button.cy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ describe("onOffButton", () => {
1414
cy.get('[data-cy="on-off-button"]').click();
1515
cy.get('[data-cy="on-off-button"]').should("have.class", "icon--off");
1616
});
17+
18+
it("shows tooltip on hover", () => {
19+
cy.get('[data-cy="on-off-button"]').trigger("mouseover");
20+
cy.get('[data-cy="on-off-button-tooltip"]').should("be.visible");
21+
});
1722
});

Apps/frontend/cypress/e2e/3-control-panel-top/reset-button.cy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ describe("resetButton", () => {
1313
it("is clickable", () => {
1414
cy.get('[data-cy="reset-button"]').click();
1515
});
16+
17+
it("shows tooltip on hover", () => {
18+
cy.get('[data-cy="reset-button"]').trigger("mouseover");
19+
cy.get('[data-cy="reset-button-tooltip"]').should("be.visible");
20+
});
1621
});

0 commit comments

Comments
 (0)