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 Funtions #320

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pages/execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ export class Execution {

goToLastTaskAndFillFormTCP4_2397(){
//cy.get(selectors.lastTask).click();
cy.get('tr > :nth-child(2) > a').should('be.visible').click();
//cy.get('tr > :nth-child(2) > a').should('be.visible').click();
cy.get('[data-cy="screen-field-name"]').should('be.visible').type('name1');
cy.get('[data-cy="screen-field-phone"]').should('be.visible').type('123');
cy.get('.form-group > .btn').click();
Expand Down
10 changes: 6 additions & 4 deletions pages/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export class Screens {
}

clickOnSave() {
cy.get(Selectors.saveBtn).should('be.visible').click();
cy.xpath(Selectors.saveBtn)
.should('be.visible')
.click();
}
clickOnPublishSave() {
cy.xpath(Selectors.savePublishBtn).should('be.visible').click();
Expand Down Expand Up @@ -90,9 +92,9 @@ export class Screens {
} else {
this.clickOnSaveVersions();
this.clickOnSave();
cy.xpath(Selectors.sucessToastMsg).should('be.visible');
cy.xpath(Selectors.sucessToastMsg).should('not.exist');
//cy.wait(2000);
//cy.xpath(Selectors.sucessToastMsg).should('be.visible');
//cy.xpath(Selectors.sucessToastMsg).should('not.exist');
cy.wait(2000);
}
}

Expand Down
18 changes: 12 additions & 6 deletions pages/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ export class Tasks {
}

searchByPMQL(query){
//Click in Field to write Query
//Click in Field to write Query
cy.xpath(selectors.tasksTable).should('be.visible');
cy.get(selectors.searchbar).eq(0).type(query).should('have.value', query);
cy.get(selectors.searchbar).eq(0)
.type(query)
.should('have.value', query);
cy.get(selectors.searchbar).eq(0).type('{enter}');
//Click in Search Button
cy.get(selectors.searchButton).eq(0).click();

//cy.get(selectors.searchButton).eq(0).click();
}


verifyValueInTable(taskName){
cy.xpath(selectors.tasksTable).should('be.visible');
cy.xpath(selectors.tasksTable).should('be.visible').should('contain',taskName);
cy.xpath(selectors.tasksTable)
.should('be.visible')
.should('contain',taskName);

}
deleteQuery(){
Expand All @@ -32,7 +36,9 @@ export class Tasks {
}

searchTaskName(name){
cy.get(selectors.searchbar).eq(0).type(name).click();
cy.get(selectors.searchbar).eq(0)
.type(name)
.click();
cy.get(selectors.searchButton).eq(0).click();
cy.get(selectors.openTaskButton).eq(0).click();
}
Expand Down
4 changes: 2 additions & 2 deletions selectors/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default{
screenTypeEmail: '[data-cy="type-container-E-mail"]',
screenTypeDisplay: '[data-cy="type-container-Display"]',
screenTypeConversational: '[data-cy="type-container-Conversational"]',
saveBtn: '[data-cy="create_screen_save_btn"]',
saveBtn: '//button[text()="Publish"]',
savePublishBtn: '//button[text()="Publish"]',
varaibleNameTxtBx: '[name="Variable Name"]',
//Data Source configuration
Expand Down Expand Up @@ -103,7 +103,7 @@ export default{
clickonplus: "//a[@data-cy='inspector-add-option']",
clickonvalueInptBx:"//label[text()='Value']/following::input[1]",
clickoncontentInptBx:"//label[text()='Content']/following::input[1]",
clickonsaveBtn:"//button[text()[normalize-space()='Save']]",
clickonsaveBtn:"//button[text()[normalize-space()='Publish']]",
//nested screen
nestedscreenDrpDwnBtn:"(//div[@role='combobox']//div)[1]",
nestedscreenInputTxtBX:"//label[text()='Screen']/following::input[1]",
Expand Down
4 changes: 2 additions & 2 deletions selectors/tasks.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default {
sidebarCompletedButton:'.filter-bar.justify-content-between',
searchbar:".search-bar-manual-input.form-control",
searchbar:'textarea[aria-label="Advanced Search (PMQL)"]',
tasksTableCell: '[class="vuetable table table-hover table-responsive-lg text-break mb-0]',
lastTask:'tr > :nth-child(2) > a',
searchButton:'.border-top-0 > .basic-search > :nth-child(1) > .flex-grow-1 > .search-bar-basic > .search-bar-actions > .btn',
tasksTable:'//table[@class="vuetable table table-hover table-responsive-lg text-break mb-0"]',
tasksTable:'//table[@class="pm-table-filter"]',
openTaskButton: ".popout > .btn > .fas",
claimTaskSelfService: ".alert > .btn",
formTab: "//div[@id='task']//a[@id='pending-tab']",
Expand Down
Loading