Fix E2E test issues with duplicate projects #1428
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A couple different things were causing duplicate E2E projects to be created with the same projectCode:
import { Project } from 'projects-settings'
lineThe
import
line was causing the project settings file to be re-executed, including itstest.describe()
calls, so that its beforeAll() was getting called twice. By moving the definition of that type into a separate file, we avoid that issue. And by removing the duplicate test file, we avoid the other place where duplicate projects with the same project code were being created.Type of Change
Only keep lines below that describe this change, then delete the rest.
Screenshots
Please provide screenshots / animations for any change that involves the UI. Please provide animations to demonstrate user interaction / behavior changes
Testing on your branch
Please describe how to test and/or verify your changes. Provide instructions so we can reproduce. Please also provide relevant test data as necessary. These instructions will be used for QA testing below.
make; make playwright-tests
Checklist
qa.languageforge.org testing
Reviewers: add/replace your name below and check the box to sign-off/attest the feature works as expected on qa.languageforge.org