Skip to content

Commit

Permalink
Merge master into feat/filter-error-files
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsSmets committed Jan 12, 2024
2 parents 9c830bc + c83a768 commit 6d053c4
Show file tree
Hide file tree
Showing 75 changed files with 8,253 additions and 6,568 deletions.
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

82 changes: 41 additions & 41 deletions .github/workflows/testing.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,37 @@ jobs:
with:
path: ladybug-frontend
- name: Fetch all tags
if: ${{ github.event.inputs.frontendCommitToCheckout }}
if: ${{ github.event.inputs.frontendCommitToCheckout }}
run: git fetch --all --tags
working-directory: 'ladybug-frontend'
working-directory: "ladybug-frontend"
- name: Checkout required version
if: ${{ github.event.inputs.frontendCommitToCheckout }}
run: git checkout ${{ github.event.inputs.frontendCommitToCheckout }}
working-directory: 'ladybug-frontend'
- name: Use Node.js 16.x
working-directory: "ladybug-frontend"
- name: Use Node.js 20.x
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: 'change version'
node-version: 20.x
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: "change version"
uses: reedyuk/[email protected]
with:
version: '8.1.2'
package: 'ladybug-frontend'
version: "8.1.2"
package: "ladybug-frontend"

- name: Update yarn
run: corepack enable
working-directory: 'ladybug-frontend'
working-directory: "ladybug-frontend"
- name: Show npm version
run: npm -v
working-directory: 'ladybug-frontend'
working-directory: "ladybug-frontend"
- name: Show node version
run: node -v
working-directory: 'ladybug-frontend'
working-directory: "ladybug-frontend"
- name: Show yarn version
run: yarn -v
working-directory: 'ladybug-frontend'
working-directory: "ladybug-frontend"

- name: Install packages
run: yarn install --immutable
Expand Down Expand Up @@ -112,17 +112,17 @@ jobs:
repository: wearefrank/ladybug
path: ladybug
- name: Fetch all tags of ladybug
if: ${{ github.event.inputs.backendCommitToCheckout }}
if: ${{ github.event.inputs.backendCommitToCheckout }}
run: git fetch --all --tags
working-directory: 'ladybug'
working-directory: "ladybug"
- name: Checkout required version of ladybug
if: ${{ github.event.inputs.backendCommitToCheckout }}
run: git checkout ${{ github.event.inputs.backendCommitToCheckout }}
working-directory: 'ladybug'
working-directory: "ladybug"
- name: Merge backend with its master
if: ${{ github.event.inputs.mergeMasterToBranch == 'true' }}
run: git merge master
working-directory: 'ladybug'
working-directory: "ladybug"
- name: Checkout ladybug-test-webapp
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -166,44 +166,44 @@ jobs:

- name: Run cypress with chrome browser
if: ${{ github.event.inputs.useRealFrontend != 'true' }}
uses: cypress-io/github-action@v2.9.7
uses: cypress-io/github-action@v6.6.0
with:
working-directory: ladybug-frontend
start: |
yarn run startCicd
wait-on: 'http://localhost:8090, http://localhost:4200'
wait-on: "http://0.0.0.0:8090, http://0.0.0.0:4200"
wait-on-timeout: 240
browser: chrome
# - name: Run cypress with firefox browser
# if: ${{ github.event.inputs.useRealFrontend != 'true' }}
# uses: cypress-io/[email protected]
# with:
# working-directory: ladybug-frontend
# start: |
# yarn run startCicd
# wait-on: 'http://localhost:8090, http://localhost:4200'
# wait-on-timeout: 240
# browser: firefox
# config: screenshotsFolder=cypress/firefox/screenshots,videosFolder=cypress/firefox/videos
# - name: Run cypress with firefox browser
# if: ${{ github.event.inputs.useRealFrontend != 'true' }}
# uses: cypress-io/[email protected]
# with:
# working-directory: ladybug-frontend
# start: |
# yarn run startCicd
# wait-on: 'http://localhost:8090, http://localhost:4200'
# wait-on-timeout: 240
# browser: firefox
# config: screenshotsFolder=cypress/firefox/screenshots,videosFolder=cypress/firefox/videos

- name: Run cypress with chrome browser - real frontend
if: ${{ github.event.inputs.useRealFrontend == 'true' }}
uses: cypress-io/[email protected]
with:
working-directory: ladybug-frontend
wait-on: 'http://localhost:8090'
wait-on: "http://localhost:8090"
wait-on-timeout: 240
browser: chrome
config: baseUrl=http://localhost:8090/ladybug/
# - name: Run cypress with firefox browser - real frontend
# if: ${{ github.event.inputs.useRealFrontend == 'true' }}
# uses: cypress-io/[email protected]
# with:
# working-directory: ladybug-frontend
# wait-on: 'http://localhost:8090'
# wait-on-timeout: 240
# browser: firefox
# config: baseUrl=http://localhost:8090/ladybug/,screenshotsFolder=cypress/firefox/screenshots,videosFolder=cypress/firefox/videos
# - name: Run cypress with firefox browser - real frontend
# if: ${{ github.event.inputs.useRealFrontend == 'true' }}
# uses: cypress-io/[email protected]
# with:
# working-directory: ladybug-frontend
# wait-on: 'http://localhost:8090'
# wait-on-timeout: 240
# browser: firefox
# config: baseUrl=http://localhost:8090/ladybug/,screenshotsFolder=cypress/firefox/screenshots,videosFolder=cypress/firefox/videos

- name: Show files
run: tree -d -L 5 .
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

ng lint --fix
npx ng lint
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

ng test --watch=false
npx ng test --watch=false
15 changes: 13 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"src/assets",
{
"glob": "**/*",
"input": "node_modules/monaco-editor/min",
"input": "node_modules/monaco-editor",
"output": "/assets/monaco/"
}
],
Expand Down Expand Up @@ -84,7 +84,10 @@
"proxyConfig": "src/proxy.conf.json"
}
},
"defaultConfiguration": "development"
"defaultConfiguration": "development",
"options": {
"host": "127.0.0.1"
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand Down Expand Up @@ -130,5 +133,13 @@
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
17 changes: 17 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from 'cypress';

export default defineConfig({
trashAssetsBeforeRuns: false,
env: {
backendServer: 'http://localhost:80',
FILESEP: '\\',
},
e2e: {
baseUrl: 'http://localhost:4200',
excludeSpecPattern: [
'**/cypress/e2e/1-getting-started/**',
'**/cypress/e2e/2-advanced-examples/**',
],
experimentalRunAllSpecs: true,
},
});
13 changes: 0 additions & 13 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 56 additions & 0 deletions cypress/e2e/debug_filterTable.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
describe("Table size and toggle filter", function () {
beforeEach(() => {
cy.clearDebugStore();
Cypress.Screenshot.defaults({
blackout: [".foo"],
capture: "viewport",
clip: { x: 0, y: 0, width: 200, height: 200 },
scale: false,
disableTimersAndAnimations: true,
screenshotOnRunFailure: true,
onBeforeScreenshot() {},
onAfterScreenshot() {},
});

cy.createReport();
cy.createOtherReport();
cy.visit("");
cy.wait(500);
});

it("Typing in a table size and retyping it", function () {
// We only assume here that the default is two or more.
cy.get(".table-responsive tbody").find("tr").should("have.length", 2);
cy.get("#displayAmount").type("{selectAll}{del}{enter}");
cy.get(".table-responsive tbody").find("tr").should("not.exist");
// From now on, we type one character at a time. Cypress can type very rapidly.
// We do not expect our app to catch up without guards.
cy.get("#displayAmount").type("{selectAll}1{enter}");
cy.get(".table-responsive tbody").find("tr").should("have.length", 1);
cy.get("#displayAmount").type("{backspace}{enter}");
cy.get(".table-responsive tbody").find("tr").should("not.exist");
cy.get("#displayAmount").type("{selectAll}2{enter}");
cy.get(".table-responsive tbody").find("tr").should("have.length", 2);
cy.get("#displayAmount").type("{backspace}{enter}");
cy.get(".table-responsive tbody").find("tr").should("not.exist");
cy.get("#displayAmount").type("{selectAll}9{enter}");
cy.get(".table-responsive tbody").find("tr").should("have.length", 2);
});

it("After clicking filter button, the filters should appear", function () {
cy.get("#filterRow").should("not.exist");
cy.get("#FilterButton").click();
cy.get("#filterRow").should("be.visible");

cy.get("#FilterButton").click();
cy.get("#filterRow").should("not.exist");
});

it("Type in a filter parameter", function () {
cy.get("#FilterButton").click();
cy.get("#filterRow input").eq(3).type("(Simple report){enter}");
cy.get(".table-responsive tbody").find("tr").should("have.length", 1);
cy.get("#filterRow input").eq(3).clear().type("{enter}");
cy.get(".table-responsive tbody").find("tr").should("have.length", 2);
});
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6d053c4

Please sign in to comment.