Skip to content

Commit

Permalink
Tests - Add move point tests about editing value relation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and github-actions[bot] committed Feb 3, 2025
1 parent 18d1fd9 commit 9626b4f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 30 deletions.
57 changes: 57 additions & 0 deletions tests/end2end/playwright/editing-value-relation.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// @ts-check
import { test, expect } from '@playwright/test';
import {ProjectPage} from "./pages/project";

test.describe('Value relation widget',
{
tag: ['@readonly'],
},() => {

test('Move geom and update select with a QGIS expression', async ({ page }) => {
const project = new ProjectPage(page, 'form_edition_value_relation_field');
await project.open();
await project.openEditingFormWithLayer('point');

const select = await page.locator("#jforms_view_edition_code_with_geom_exp");

await project.clickOnMapLegacy(650, 200);

await select.selectOption({value: ''});

await project.mapOl2.dragTo(project.mapOl2, {
sourcePosition: { x: 650, y: 200 },
targetPosition: { x: 500, y: 200 },
});

await select.selectOption({value: 'A2'});

await project.mapOl2.dragTo(project.mapOl2, {
sourcePosition: { x: 500, y: 200 },
targetPosition: { x: 350, y: 200 },
});

await select.selectOption({value: 'A1'});

await project.mapOl2.dragTo(project.mapOl2, {
sourcePosition: { x: 350, y: 200 },
targetPosition: { x: 350, y: 500 },
});

await select.selectOption({value: 'B1'});

await project.mapOl2.dragTo(project.mapOl2, {
sourcePosition: { x: 350, y: 500 },
targetPosition: { x: 500, y: 500 },
});

await select.selectOption({value: 'B2'});

await project.mapOl2.dragTo(project.mapOl2, {
sourcePosition: { x: 500, y: 500 },
targetPosition: { x: 650, y: 200 },
});

await select.selectOption({value: ''});

})
})
30 changes: 0 additions & 30 deletions tests/qgis-projects/tests/form_edition_value_relation_field.md

This file was deleted.

0 comments on commit 9626b4f

Please sign in to comment.