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

fix(#7055): Expand on image with double click #7308

Merged
merged 13 commits into from
Jan 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor exampleImagery.e2e.spec.js
  • Loading branch information
marcelo-earth committed Dec 20, 2023
commit 9171c89292ab0f3cc2727eaebd09141dd9b52b58
40 changes: 19 additions & 21 deletions e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,33 +460,31 @@ test.describe('Example Imagery in Display Layout', () => {

test.describe('Example Imagery in Flexible layout', () => {
let flexibleLayout;
test.describe('Example Imagery in Flexible layout', () => {
test.beforeEach(async ({ page }) => {
await page.goto('./', { waitUntil: 'domcontentloaded' });

flexibleLayout = await createDomainObjectWithDefaults(page, { type: 'Flexible Layout' });
test.beforeEach(async ({ page }) => {
await page.goto('./', { waitUntil: 'domcontentloaded' });

// Create Example Imagery inside the Flexible Layout
await createDomainObjectWithDefaults(page, {
type: 'Example Imagery',
parent: flexibleLayout.uuid
});
flexibleLayout = await createDomainObjectWithDefaults(page, { type: 'Flexible Layout' });

// Navigate back to Flexible Layout
await page.goto(flexibleLayout.url);
// Create Example Imagery inside the Flexible Layout
await createDomainObjectWithDefaults(page, {
type: 'Example Imagery',
parent: flexibleLayout.uuid
});

test('Can double-click on the image to view large image', async ({ page }) => {
// Double-click on the image to open large view
const imageElement = await page.waitForSelector('.image-wrapper');
await imageElement.dblclick();
// Navigate back to Flexible Layout
await page.goto(flexibleLayout.url);
});

// Check if the large view is visible
await page.waitForSelector('.c-imagery__main-image__bg', { state: 'visible' });
test('Can double-click on the image to view large image', async ({ page }) => {
// Double-click on the image to open large view
const imageElement = await page.waitForSelector('.image-wrapper');
await imageElement.dblclick();

// Close the large view
await page.getByLabel('Close').click();
});
// Check if the large view is visible
await page.waitForSelector('.c-imagery__main-image__bg', { state: 'visible' });

// Close the large view
await page.getByLabel('Close').click();
});

// let flexibleLayout;
Expand Down
Loading