<commit_before>describe('Form edition', function () {
    before(function () {
        // runs once before the first test in this block
        cy.visit('/index.php/view/map/?repository=testsrepository&project=end2end_form_edition')
        // Todo wait for map to be fully loaded
        cy.wait(1000)
    })

    it('submits form and gets success message', function () {
        cy.get('#button-edition').click()
        cy.get('#edition-draw').click()
        cy.get('#jforms_view_edition_value').type('42')
        cy.get('#jforms_view_edition__submit_submit').click()

        // Assert success message is displayed
        cy.get('#message .jelix-msg-item-success').should('be.visible')
    })
})<commit_msg>[e2e] test digitization tab not visible  for non geom layers<commit_after>describe('Form edition', function () {
    beforeEach(function () {
        cy.visit('/index.php/view/map/?repository=testsrepository&project=end2end_form_edition')
        // Todo wait for map to be fully loaded
        cy.wait(1000)
        // Display edition if not active
        cy.get('li.edition #button-edition').click()
    })

    it('must not show digitization tab for non geom layers', function () {
        // Intercept editFeature query to wait for its end
        cy.intercept('/index.php/lizmap/edition/editFeature*').as('editFeature')

        cy.get('#edition-draw').click()

        // Wait editFeature query ends + slight delay for UI to be ready
        cy.wait('@editFeature')
        cy.wait(200)

        cy.get('.edition-tabs a[href="#tabdigitization"]').should('not.be.visible')
    })


    it('submits form and gets success message', function () {
        cy.get('#edition-draw').click()
        cy.get('#jforms_view_edition_value').type('42')
        cy.get('#jforms_view_edition__submit_submit').click()

        // Assert success message is displayed
        cy.get('#message .jelix-msg-item-success').should('be.visible')
    })
})
{'fraction_non_alphanumeric': 0.14556637621732446, 'fraction_numerical': 0.009226037929267043, 'mean_word_length': 2.8962075848303392, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7551861', 'n_tokens_mistral': 591, 'n_tokens_neox': 561, 'n_words': 123}