Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Add Files folder to Media component and to "FileSystem local" adapter #43532

Open
wants to merge 19 commits into
base: 5.3-dev
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
test
  • Loading branch information
Fedik committed May 29, 2024
commit c324611abf880f9da18a9491c41caf2b143d0581
8 changes: 4 additions & 4 deletions tests/System/integration/api/com_media/Files.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,26 @@ describe('Test that media files API endpoint', () => {

it('can create a file with adapter', () => {
cy.readFile('tests/System/data/com_media/test-image-1.jpg', 'binary')
.then((data) => cy.api_post('/media/files', { path: 'local-images:/test-dir/test.jpg', content: Buffer.from(data, 'binary').toString('base64') }))
.then((data) => cy.api_post('/media/files', { path: 'local-files:/test-dir/test.jpg', content: Buffer.from(data, 'binary').toString('base64') }))
.then((response) => {
cy.wrap(response).its('body').its('data').its('attributes')
.its('name')
.should('include', 'test.jpg');
cy.wrap(response).its('body').its('data').its('attributes')
.its('path')
.should('include', 'local-images:/test-dir/test.jpg');
.should('include', 'local-files:/test-dir/test.jpg');
});
});

it('can create a folder with adapter', () => {
cy.api_post('/media/files', { path: 'local-images:/test-dir/test-from-create' })
cy.api_post('/media/files', { path: 'local-files:/test-dir/test-from-create' })
.then((response) => {
cy.wrap(response).its('body').its('data').its('attributes')
.its('name')
.should('include', 'test-from-create');
cy.wrap(response).its('body').its('data').its('attributes')
.its('path')
.should('include', 'local-images:/test-dir/test-from-create');
.should('include', 'local-files:/test-dir/test-from-create');
});
});

Expand Down