-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display all image previews in reference picker (#1524)
* display referenced image * object fit * remove console log * unit test * test fix * show thumbnail in picker if available * unit test for refimg thumbnail * common icon logic * de lunnecessary image lines * remove image import in refpicker * undo refactor icon conditions * remove image icon tests * remove image test type * add reference picker e2e test --------- Co-authored-by: Ádám Hassan <hassana@sensenet.com>
- Loading branch information
1 parent
29a5851
commit 9c16a58
Showing
4 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { PATHS, resolvePathParams } from '../../../src/application-paths' | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
describe('Batch operations: ', () => { | ||
beforeEach(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
|
||
it('it should render a preview in reference picker if it is an image', () => { | ||
cy.visit( | ||
pathWithQueryParams({ | ||
path: resolvePathParams({ path: PATHS.content.appPath, params: { browseType: 'explorer' } }), | ||
newParams: { repoUrl: Cypress.env('repoUrl'), path: '/SampleWorkspace/Blog' }, | ||
}), | ||
) | ||
|
||
cy.get('[data-test="table-cell-6-ways-to-unlock-true-collaboration-with-a-headless-cms"]').rightclick({ | ||
force: true, | ||
}) | ||
cy.get('[data-test="content-context-menu-edit"]').click({ force: true }) | ||
cy.get('[for="LeadImage"]').siblings('ul').find('li:last-of-type button').click() | ||
cy.get('[placeholder="Search"]').type('teamwork') | ||
cy.get( | ||
'.MuiDialogContent-root img[src="https://daily.test.sensenet.cloud/Root/Content/SampleWorkspace/Blog/Images/teamwork.gif"]', | ||
).should('be.visible') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters