Skip to content

Commit

Permalink
Merge pull request #814 from CSCfi/patch-0.13.1
Browse files Browse the repository at this point in the history
Patch 0.13.1
  • Loading branch information
hannyle authored May 31, 2022
2 parents 024d4bc + 0527c7e commit 3962e47
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/e2etests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/__tests__/FormAutocompleteField.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)) }))
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1313,7 +1312,11 @@ const FormTagField = ({ name, label, required, description }: FormFieldBaseProps

return (
<div className={classes.divBaseline}>
<input hidden={true} {...field} />
<input
{...field}
required={required}
style={{ width: 0, opacity: 0, transform: "translate(8rem, 2rem)" }}
/>
<ValidationTagField
InputProps={{
startAdornment:
Expand All @@ -1340,14 +1343,12 @@ const FormTagField = ({ name, label, required, description }: FormFieldBaseProps
onKeyDown={handleKeyDown}
onBlur={handleOnBlur}
/>

{description && (
<FieldTooltip title={description} placement="top" arrow>
<HelpOutlineIcon className={classes.fieldTip} />
</FieldTooltip>
)}
{required && formState.isSubmitted && !formState.isValid && tags.length === 0 && (
<FormHelperText error>must have at least 1 keyword</FormHelperText>
)}
</div>
)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/services/rorAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<APIResponse> => {
Expand Down

0 comments on commit 3962e47

Please sign in to comment.