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

Mnes 468 create an automatic testing strategy #91

Merged
merged 63 commits into from
Sep 18, 2024

Conversation

fleanegan
Copy link

@fleanegan fleanegan commented Sep 16, 2024

Description

Please include a summary of the changes and link the related github issue.
Please include relevant motivation and context.

Fixes # (Issue)

Type of change

Please delete options that are not relevant.

  • Minor change (non-breaking change, e.g. documentation adaption)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have added tests that prove my fix or my feature works
  • New and existing tests pass locally with my changes
  • My changes contain no console logs

NilsXitaso and others added 30 commits June 27, 2024 15:20
Small bug fix in the README
…view (#64)

# Description

new <QrScanner /> component:
Clicking on the QR scanner logo will open the camera.
It will continuously scan for a qr code and execute the onScan callback
if a valid one was found:
- Dashboard: Will open the page with the specific ID
- Compare: Will add the AAS to the compare list

Fixes # (MNES-1175)

## Type of change

Please delete options that are not relevant.

-   [x] New feature (non-breaking change which adds functionality)

# Checklist:

-   [x] I have performed a self-review of my code
-   [x] I have commented my code, particularly in hard-to-understand areas
-   [x] I have made corresponding changes to the documentation
-   [x] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [x] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs
# Description

Added SQLite database and schema + seeding with prisma.

## Type of change

Please delete options that are not relevant.

-   [ ] New feature (non-breaking change which adds functionality)

# Checklist:

-   [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [ ] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [ ] New and existing tests pass locally with my changes
-   [ ] My changes contain no console logs
…nto feat(repositry-settings)

# Conflicts:
#	yarn.lock
# Description

Added form for editing the repository list

## Type of change

Please delete options that are not relevant.

-   [ ] New feature (non-breaking change which adds functionality)

# Checklist:

-   [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [ ] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [ ] New and existing tests pass locally with my changes
-   [ ] My changes contain no console logs

---------

Co-authored-by: Milo Franke <milo.franke@xitaso.com>
#73)

# Description

Please include a summary of the changes and link the related github
issue.
Please include relevant motivation and context.

Fixes # (Issue)

## Type of change

Please delete options that are not relevant.

-   [ ] Minor change (non-breaking change, e.g. documentation adaption)
-   [ ] Bug fix (non-breaking change which fixes an issue)
-   [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality
to not work as expected)

# Checklist:

-   [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [ ] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [ ] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs

---------

Co-authored-by: melanie.gail <melanie.gail@xitaso.com>
Co-authored-by: milo.franke <milo.franke@xitaso.com>
# Description

Refactoring of the IdSettings to match the new layout.

## Type of change

Please delete options that are not relevant.

-   [ ] New feature (non-breaking change which adds functionality)

# Checklist:

-   [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [ ] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [ ] New and existing tests pass locally with my changes
-   [ ] My changes contain no console logs
Co-authored-by: melanie.gail <melanie.gail@xitaso.com>
…ocker image (#62)

# Description

The github runner was pulling all images and was overwriting the freshly
build mnestix-browser image.
Because each action is started with a blank slate, the pull command is
not required. docker compose up will pull the missing images .

Fixes # (MNES-1168)

## Type of change

-   [x] Bug fix (non-breaking change which fixes an issue)

# Checklist:

-   [x] I have performed a self-review of my code
-   [x] My changes generate no new warnings
-   [x] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs
#66)

# Description

Previously, the version number was not displayed when turning off the
authentication due to a small logic error.

## Type of change

Please delete options that are not relevant.

-   [ ] Minor change (non-breaking change, e.g. documentation adaption)
-   [x] Bug fix (non-breaking change which fixes an issue)
-   [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality
to not work as expected)
Co-authored-by: melanie.gail <melanie.gail@xitaso.com>
Co-authored-by: Milo Franke <milo.franke@xitaso.com>
Co-authored-by: Jonathan Sigrist <jonathan.sigrist@xitaso.com>
# Description

Please include a summary of the changes and link the related github
issue.
Please include relevant motivation and context.

Fixes # (Issue)

## Type of change

Please delete options that are not relevant.

-   [x] Minor change (non-breaking change, e.g. documentation adaption)
-   [ ] Bug fix (non-breaking change which fixes an issue)
-   [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality
to not work as expected)

# Checklist:

-   [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [x] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [ ] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs
…del repository (#68)

# Description

The change enables users to configure a separate aas repository and
submodel repository

Fixes # (Issue)

## Type of change

Please delete options that are not relevant.

-   [x] Minor change (non-breaking change, e.g. documentation adaption)
-   [ ] Bug fix (non-breaking change which fixes an issue)
-   [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality
to not work as expected)

# Checklist:

-   [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [x] I have made corresponding changes to the documentation
-   [x] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [ ] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs
…v2 (#76)

# Description

Please include a summary of the changes and link the related github
issue.
Please include relevant motivation and context.

Fixes # (Issue)

## Type of change

Please delete options that are not relevant.

-   [ ] Minor change (non-breaking change, e.g. documentation adaption)
-   [ ] Bug fix (non-breaking change which fixes an issue)
-   [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality
to not work as expected)

# Checklist:

-   [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [x] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [x] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs
…78)

# Description

Enable QR scanner in dashboard and compare view

## Type of change

-   [x] New feature (non-breaking change which adds functionality)

# Checklist:

-   [x] I have performed a self-review of my code
-   [x] I have commented my code, particularly in hard-to-understand areas
-   [x] I have made corresponding changes to the documentation
-   [x] My changes generate no new warnings
-   [x] I have added tests that prove my fix or my feature works
-   [x] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs
# Description

Please include a summary of the changes and link the related github
issue.
Please include relevant motivation and context.

Fixes # (Issue)

## Type of change

Please delete options that are not relevant.

-   [x] Minor change (non-breaking change, e.g. documentation adaption)

# Checklist:

-   [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
-   [ ] I have made corresponding changes to the documentation
-   [x] My changes generate no new warnings
-   [ ] I have added tests that prove my fix or my feature works
-   [x] New and existing tests pass locally with my changes
-   [x] My changes contain no console logs

---------

Co-authored-by: NilsXitaso <nils.rothamel@xitaso.com>
…NES-468-create-an-automatic-testing-strategy
When there is an AAS with the same AAS ID in multiple repos, after
searching, we want to display a result list of all encountered AAS with
the same ID, and then let the user select which AAS to display in the
detail view.

---------

Co-authored-by: NilsXitaso <nils.rothamel@xitaso.com>
Co-authored-by: milo.franke <milo.franke@xitaso.com>
# Description

Allows to configure multiple submodel repositories ( only in setting -
search not included in this PR)

---------

Co-authored-by: Milo Franke <milo.franke@xitaso.com>
…NES-468-create-an-automatic-testing-strategy
cypress.config.ts Show resolved Hide resolved
cypress/e2e/compareViewTest.spec.js Outdated Show resolved Hide resolved
cypress/e2e/listAasPageComparisonTest.spec.js Outdated Show resolved Hide resolved
cypress/support/commands.ts Outdated Show resolved Hide resolved
src/lib/services/searchUtilActions/AasSearcher.ts Outdated Show resolved Hide resolved
src/lib/services/searchUtilActions/AasSearcher.ts Outdated Show resolved Hide resolved
src/lib/services/searchUtilActions/AasSearcher.ts Outdated Show resolved Hide resolved
src/lib/services/searchUtilActions/AasSearcher.ts Outdated Show resolved Hide resolved
src/lib/services/searchUtilActions/searchServer.ts Outdated Show resolved Hide resolved
fleanegan and others added 6 commits September 18, 2024 08:46
Co-authored-by: Milo Franke <milo.franke@xitaso.com>
Co-authored-by: Milo Franke <milo.franke@xitaso.com>
Co-authored-by: Milo Franke <milo.franke@xitaso.com>
Co-authored-by: Milo Franke <milo.franke@xitaso.com>
@@ -0,0 +1,58 @@
import { prisma } from 'lib/database/prisma';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put the PrismaConnector* files in the lib/database folder since the connection to the db is used in multiple places (and will be used for more than Repositroy Urls in the future). But it's fine for me if we tackle this in the API Refactoring Mob Programming.

@fleanegan fleanegan merged commit fd1e550 into dev Sep 18, 2024
2 checks passed
@fleanegan fleanegan deleted the MNES-468-create-an-automatic-testing-strategy branch September 18, 2024 10:05
Comment on lines 17 to 22
cy.screenshot('list-selected.png');
cy.getByTestId('compare-button').click();
cy.wait(100);
cy.url().should('contain', '/compare');
cy.wait(60000);
cy.getByTestId('compare-aas-0').should('be.visible');
cy.getByTestId('compare-aas-1').should('be.visible');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debug calls

Comment on lines 7 to +8
cy.visit('/list');
cy.setResolution(resolutions[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why switch? for me the resolution is part of the setup and shoud be set first

});

Cypress.Commands.add('getByTestId', (dataTestId) => {
cy.get('[data-testid=' + dataTestId + ']');
cy.get('[data-testid=' + dataTestId + ']', { timeout: 20000 });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use cy.getByTestId()
is explicit timeout necessary here?

cypress.config.ts Show resolved Hide resolved
return searcher.getSubmodelFromAllRepos(searchInput);
}

export async function performgetAasThumbnailFromAllRepos(searchInput: string): Promise<Blob> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Suggested change
export async function performgetAasThumbnailFromAllRepos(searchInput: string): Promise<Blob> {
export async function performGetAasThumbnailFromAllRepos(searchInput: string): Promise<Blob> {

cy.url().should('contain', '/compare');
cy.wait(60000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debug wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants