Skip to content

Commit

Permalink
Fix faulty test "saves a new variant"
Browse files Browse the repository at this point in the history
Hypothesis: Broken test isolation in online mode leads to loading wrong scenario on reload
  • Loading branch information
LeonBein committed Aug 27, 2024
1 parent 5cd639c commit 297b041
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/cypress/e2e/application.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ describe('LCA Configuration Tests', () => {
cy.get('div[id^="mapping"]').should('have.length', 0);
});

it('saves a new variant', () => {
it.only('saves a new variant', () => {
const newVariantName = 'NewVariant';
cy.findByRole('textbox', { placeholder: /Variant Name/i }).type(newVariantName);
cy.findByText('Add Driver Concretization').click();
Expand All @@ -550,6 +550,7 @@ describe('LCA Configuration Tests', () => {
cy.get('input[id="variantFrequencyInput"').should('have.value', '15%');
cy.visit('http://localhost:3000/'); // Click away to ensure data is actually saved and not just displayed
cy.visit('http://localhost:3000/lcavariants');
cy.get('select').select(lcaTestScenarioData.scenarioName);
cy.get('button.chakra-accordion__button').should('have.length', 1);
cy.get('button.chakra-accordion__button').findByText(newVariantName).should('exist');
});
Expand Down

0 comments on commit 297b041

Please sign in to comment.