Skip to content

Commit ec780eb

Browse files
FredWantoulucas-rubagotti
authored andcommitted
PROCESS: Upload image in document may be tested with cypress-cucumber (see #199).
Co-authored-by: lucas-rubagotti <lucas.rubagotti@utt.fr>
1 parent 2d736b6 commit ec780eb

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed
File renamed without changes.

frontend/tests/event.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,13 @@ Quand("j'essaie d'ouvrir l'URI {string} reçue par courriel", (uri) => {
8787
Quand("je souhaite modifier le contenu du document principal", () => {
8888
cy.get('.icon.edit').click();
8989
cy.click_on_text('content');
90+
});
91+
92+
Quand("j'essaye d'ajouter une image à une glose", () => {
93+
context = cy.get('.scholium').eq(1);
94+
cy.click_on_contextual_menu_item(context, 'Add a picture...');
95+
cy.get('[id="image-input"]').selectFile('../docs/architecture.png', {
96+
force: true,
97+
});
98+
});
9099
});

frontend/tests/outcome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Alors("je peux lire {string}", (text) => {
1313
});
1414

1515
Alors("je vois l'image {string} dans la glose", (alternative_text) => {
16-
cy.get('.row:not(.runningHead)>.main').should('have.descendants', `img[alt='${alternative_text}']`);
16+
cy.get('.row:not(.runningHead)>.scholium').should('have.descendants', `img[alt='${alternative_text}']`);
1717
});
1818

1919
Alors("{string} est le document principal", (title) => {

0 commit comments

Comments
 (0)