diff --git a/.github/workflows/e2etests.yml b/.github/workflows/e2etests.yml index 0cdb6280..ec6cda9c 100644 --- a/.github/workflows/e2etests.yml +++ b/.github/workflows/e2etests.yml @@ -18,8 +18,7 @@ jobs: npm run build --production - name: Set up branch run: | - BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') - if [[ $BRANCH == master ]]; then + if [[ "${{github.base_ref}}" == "master" ]]; then echo "VERSION=master" >> $GITHUB_ENV else echo "VERSION=develop" >> $GITHUB_ENV @@ -41,15 +40,15 @@ jobs: browser: ${{ matrix.browser }} headless: true env: port=5430 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: cypress-screenshots path: cypress/screenshots retention-days: 5 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() - with: + with: name: cypress-videos path: cypress/videos retention-days: 5 diff --git a/src/__tests__/FormAutocompleteField.test.tsx b/src/__tests__/FormAutocompleteField.test.tsx index 8a14b9ec..84373afe 100644 --- a/src/__tests__/FormAutocompleteField.test.tsx +++ b/src/__tests__/FormAutocompleteField.test.tsx @@ -19,7 +19,7 @@ const mockStore = configureStore([]) const mockOrganisations = [{ name: "Test Organisation" }, { name: "Mock Org" }] const server = setupServer( - rest.get("http://api.ror.org/organizations", (req, res, ctx) => { + rest.get("https://api.ror.org/organizations", (req, res, ctx) => { const searchTerm = req.url.searchParams.get("query") as string return res(ctx.json({ items: mockOrganisations.filter(item => item.name.toLowerCase().includes(searchTerm)) })) }) diff --git a/src/components/NewDraftWizard/WizardForms/WizardJSONSchemaParser.tsx b/src/components/NewDraftWizard/WizardForms/WizardJSONSchemaParser.tsx index 6623a228..a6f7f321 100644 --- a/src/components/NewDraftWizard/WizardForms/WizardJSONSchemaParser.tsx +++ b/src/components/NewDraftWizard/WizardForms/WizardJSONSchemaParser.tsx @@ -1276,8 +1276,7 @@ const FormTagField = ({ name, label, required, description }: FormFieldBaseProps name={name} control={control} defaultValue={defaultValue} - rules={{ required: true }} - render={({ field, formState }) => { + render={({ field }) => { const handleKeywordAsTag = (keyword: string) => { // newTags with unique values const newTags = !tags.includes(keyword) ? [...tags, keyword] : tags @@ -1313,7 +1312,11 @@ const FormTagField = ({ name, label, required, description }: FormFieldBaseProps return (
- + + {description && ( )} - {required && formState.isSubmitted && !formState.isValid && tags.length === 0 && ( - must have at least 1 keyword - )}
) }} diff --git a/src/services/rorAPI.ts b/src/services/rorAPI.ts index b1d6b9ce..3c018b86 100644 --- a/src/services/rorAPI.ts +++ b/src/services/rorAPI.ts @@ -4,7 +4,7 @@ import { errorMonitor } from "./errorMonitor" import { APIResponse } from "types" -const api = create({ baseURL: "http://api.ror.org" }) +const api = create({ baseURL: "https://api.ror.org" }) api.addMonitor(errorMonitor) const getOrganisations = async (searchTerm: string): Promise => {