Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
MayraMelisa committed Sep 26, 2024
1 parent 576a052 commit 4db3f03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions pages/naturalLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export class NaturalLanguage {
}

setDataOnDescription(descriptionData){
cy.get(selectors.descriptionNL).type(descriptionData,{delay:500});
cy.get('[class="tox-edit-area__iframe"]').then(($iframe) => {
const $body = $iframe.contents().find('body');
cy.wrap($body).find('p').type(descriptionData);
});
//cy.get(selectors.descriptionNL).type(descriptionData,{delay:500});
}

clickOnGenerate(){
Expand Down Expand Up @@ -114,7 +118,10 @@ export class NaturalLanguage {

clickOnUseModel(processName){
cy.get(selectors.useModelBtn).click();
cy.get('input[name="name"]').should('be.visible').type(processName, {delay:50});
cy.get('[class="modal-header"]').should('be.visible');
cy.get('input[name="name"]').click().clear();
cy.wait(1000);
cy.get('input[name="name"]').should('be.visible').type(processName, {delay:100});
cy.xpath(selectors.saveBtn).should('be.visible').click();
}

Expand Down
2 changes: 1 addition & 1 deletion selectors/naturalLanguage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default{
aiProcessBtn: '//img[@class="mb-2"]',
descriptionNL: '[data-test="textarea-prompt"]',
descriptionNL: '[class="tox-edit-area"]',
generateBTtnNL: '[data-test="generate-button"]',
processDetailsTab: '[data-test="details-button"]',
historyTab: '[data-test="history-button"]',
Expand Down

0 comments on commit 4db3f03

Please sign in to comment.