Skip to content

Commit

Permalink
Merge pull request #2884 from glific/updates
Browse files Browse the repository at this point in the history
Removed the promotion banner and updated the size for pdfs
  • Loading branch information
kurund authored May 8, 2024
2 parents 0eefdcb + 4173e38 commit 5a5303b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
git clone https://github.com/glific/cypress-testing.git
echo done. go to dir.
cd cypress-testing
git checkout test_cases_wa_group
git checkout main
cd ..
cp -r cypress-testing/cypress cypress
yarn add [email protected]
Expand Down
5 changes: 3 additions & 2 deletions src/containers/Auth/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import WhatsAppIcon from 'assets/images/icons/Social/Whatsapp.svg?react';
import { termsOfUse } from 'containers/Organization/Organization';
import { Button } from 'components/UI/Form/Button/Button';
import GlificLogo from 'assets/images/logo/Logo.svg';
import { Promotion } from './Promotion/Promotion';
// import { Promotion } from './Promotion/Promotion';
import styles from './Auth.module.css';
import axios from 'axios';
import { ORGANIZATION_NAME } from 'config';
Expand Down Expand Up @@ -259,7 +259,8 @@ export const Auth = ({
) : null}
</div>

{mode === 'login' && <Promotion />}
{/* commenting out promotion banner */}
{/* {mode === 'login' && <Promotion />} */}
</div>
);
};
4 changes: 2 additions & 2 deletions src/containers/KnowledgeBase/UploadFile/UploadFile.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ test('shows errors for invalid file', async () => {

fireEvent.change(screen.getByTestId('uploadFile'), {
target: {
files: [mockFile('application/pdf', 1700000)],
files: [mockFile('application/pdf', 21000000)],
},
});

await waitFor(() => {
expect(screen.getAllByText('File size should be less than 1MB')[0]).toBeInTheDocument();
expect(screen.getAllByText('File size should be less than 20MB')[0]).toBeInTheDocument();
});

fireEvent.change(screen.getByTestId('uploadFile'), {
Expand Down
6 changes: 3 additions & 3 deletions src/containers/KnowledgeBase/UploadFile/UploadFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export const UploadFile = ({ setFile, setCategory }: UploadFileProps) => {
const addFile = (event: any) => {
const media = event.target.files[0];
if (media) {
if (media.size / 1000000 > 1) {
setErrors('File size should be less than 1MB');
if (media.size / 1000000 > 20) {
setErrors('File size should be less than 20MB');
return;
} else if (media.type !== 'application/pdf') {
setErrors('File type should be PDF');
Expand Down Expand Up @@ -137,7 +137,7 @@ export const UploadFile = ({ setFile, setCategory }: UploadFileProps) => {
</p>
<p className={styles.HelperText}>
Please upload a single page PDF. <br />
Size should not exceed 1MB.
Size should not exceed 20MB.
</p>
</div>
</Form>
Expand Down

0 comments on commit 5a5303b

Please sign in to comment.