Skip to content

Commit 4274a2e

Browse files
authored
Merge pull request #1254 from webkom/dependabot/npm_and_yarn/nextui-org/react-2.6.8
Bump @nextui-org/react from 2.2.10 to 2.6.8
2 parents 2589166 + c28893a commit 4274a2e

File tree

5 files changed

+1797
-1578
lines changed

5 files changed

+1797
-1578
lines changed

.drone.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ steps:
9393
- yarn start
9494

9595
- name: cypress
96-
image: cypress/included:10.7.0
96+
image: cypress/included:13.17.0
9797
when:
9898
event:
9999
- push

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"dependencies": {
2424
"@emotion/react": "^11.11.4",
2525
"@emotion/styled": "^11.11.5",
26-
"@nextui-org/react": "^2.2.10",
26+
"@nextui-org/react": "^2.6.8",
2727
"final-form": "^4.20.10",
2828
"framer-motion": "^11.11.8",
2929
"next": "^14.1.4",
@@ -51,7 +51,7 @@
5151
"eslint-plugin-react": "^7.37.1",
5252
"postcss": "^8.4.40",
5353
"prettier": "^3.3.3",
54-
"tailwindcss": "^3.4.7",
54+
"tailwindcss": "^3.4.17",
5555
"typescript": "^5.6.3"
5656
}
5757
}

webapp/components/elements/FormInput.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Field, FieldRenderProps } from 'react-final-form';
21
import { Input, InputProps, Textarea, TextAreaProps } from '@nextui-org/react';
2+
import { Field, FieldRenderProps } from 'react-final-form';
3+
import { DataListItem } from 'utils/datalists';
34
import {
45
FieldValidator,
56
requiredValidator,
67
validateField,
78
} from 'utils/validators';
8-
import { DataListItem } from 'utils/datalists';
99

1010
type Props = {
1111
name: string;
@@ -67,7 +67,7 @@ const ReceiptInput: React.FC<Props> = ({
6767
<Textarea
6868
onBlur={(event) =>
6969
props.input.onBlur(
70-
event as React.FocusEvent<HTMLTextAreaElement, Element>
70+
event as React.FocusEvent<HTMLInputElement, Element>
7171
)
7272
}
7373
minRows={2}

webapp/cypress/e2e/index.cy.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1+
const selectItem = (selector, itemValue) => {
2+
cy.get(selector).click();
3+
cy.get("div[data-slot='popover']")
4+
.find(`span:contains(${itemValue})`)
5+
.click();
6+
};
7+
18
describe('Load', () => {
9+
beforeEach(() => cy.visit('/'));
210
it('should navigate to index page', () => {
3-
cy.visit('/');
411
cy.get('h4').contains('Kvitteringsskjema');
512
});
613
});
714

815
describe('Form', () => {
16+
beforeEach(() => cy.visit('/'));
917
it('should be able to fill in basic fields', () => {
1018
cy.get('#name').type('John Doe');
1119
cy.get('#mailFrom').type('jon@doe.com');
12-
cy.get('#mailTo').type('Webkom');
20+
selectItem('#mailTo', 'Webkom');
1321
cy.get('#accountNumber').type('1234 56 78903');
1422
cy.get('#amount').type('1000');
1523
cy.get('#date').type('1970-01-01');
@@ -19,6 +27,7 @@ describe('Form', () => {
1927
});
2028

2129
describe('Uploads', () => {
30+
beforeEach(() => cy.visit('/'));
2231
it('should be able to upload signature', () => {
2332
cy.get('#signature').attachFile('abakus.png');
2433
});
@@ -40,6 +49,7 @@ describe('Uploads', () => {
4049
});
4150

4251
describe('Signature drawing', () => {
52+
beforeEach(() => cy.visit('/'));
4353
it('should be possible to draw the signature', () => {
4454
cy.get('#signButton').click();
4555
cy.get('h3').contains('Signer i feltet under');
@@ -49,8 +59,8 @@ describe('Signature drawing', () => {
4959
});
5060

5161
describe('Submit', () => {
62+
beforeEach(() => cy.visit('/'));
5263
it('should be possible to submit', () => {
53-
cy.visit('/');
5464
// Set up a catch for the POST request
5565
cy.intercept(
5666
{
@@ -63,7 +73,7 @@ describe('Submit', () => {
6373
// Fill in values
6474
cy.get('#name').type('John Doe');
6575
cy.get('#mailFrom').type('jon@doe.com');
66-
cy.get('#mailTo').type('Webkom');
76+
selectItem('#mailTo', 'Webkom');
6777
cy.get('#accountNumber').type('1234 56 78903');
6878
cy.get('#amount').type('1000');
6979
cy.get('#date').type('1970-01-01');

0 commit comments

Comments
 (0)