Skip to content

Commit

Permalink
Fixed Assessment selectors (#744)
Browse files Browse the repository at this point in the history
Signed-off-by: Shveta Sachdeva <[email protected]>
Co-authored-by: Shveta Sachdeva <[email protected]>
  • Loading branch information
sshveta and Shveta Sachdeva authored Oct 14, 2023
1 parent 7ffe7a3 commit bbf9afa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
16 changes: 10 additions & 6 deletions cypress/e2e/models/migration/applicationinventory/assessment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ import {
tdTag,
trTag,
button,
next,
review,
save,
assessment,
SEC,
assessAppButton,
migration,
} from "../../../types/constants";
import { navMenu, navTab } from "../../../views/menu.view";
Expand All @@ -48,6 +45,7 @@ import {
selectUserPerspective,
performRowActionByIcon,
checkSuccessAlert,
clickJs,
} from "../../../../utils/utils";
import * as data from "../../../../utils/data_utils";
import {
Expand Down Expand Up @@ -199,9 +197,9 @@ export class Assessment extends Application {
}
});
if (i === 4) {
clickByText(button, save);
clickJs(commonView.nextButton);
} else {
clickByText(button, next);
clickJs(commonView.nextButton);
}
}
}
Expand Down Expand Up @@ -235,6 +233,10 @@ export class Assessment extends Application {
cy.get(commonView.actionMenuItem).contains("Assess").click();
}

take_questionnaire(): void {
clickByText(button, "Take");
}

perform_assessment(
risk,
stakeholders?: Array<string>,
Expand All @@ -251,9 +253,11 @@ export class Assessment extends Application {
this.selectApplication();
this.click_assess_button();
cy.wait(6000);
this.take_questionnaire();
cy.wait(SEC);
if (stakeholders) this.selectStakeholders(stakeholders);
if (stakeholderGroups) this.selectStakeholderGroups(stakeholderGroups);
clickByText(button, next);
clickJs(commonView.nextButton);
cy.wait(SEC);
this.selectAnswers(risk);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import { GeneralConfig } from "../../../../models/administration/general/general
const stakeholdersList: Array<Stakeholders> = [];
const stakeholdersNameList: Array<string> = [];

describe(["@tier1"], "Application assessment and review tests", () => {
describe.skip(["@tier1"], "Application assessment and review tests", () => {
// Need to be unskipped when bug MTA-1449 is fixed . All test are failing .
before("Login and Create Test Data", function () {
login();

Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/views/assessment.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
export const stakeholderSelect = "#stakeholders-select-toggle-select-multi-typeahead-typeahead";
export const stakeholdergroupsSelect =
"#stakeholder-groups-select-toggle-select-multi-typeahead-typeahead";
export const stakeholderSelect = "input[aria-label='stakeholder-select-toggle']";
export const stakeholdergroupsSelect = "input[aria-label='stakeholder-groups-select-toggle']";
export const questionBlock = "div[cy-data='question']";
export const radioInput = "input[type='radio']";
export const assessmentColumnSelector = "td[data-label='Assessment']";
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/views/common.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ export const commonTable = "table[aria-label='main-table']";
export const dropdownClearSelection = "pf-v5-c-select__toggle-clear";
export const footer = "footer";
export const manageImportsActionsButton = 'button[aria-label="Actions"]';
export const nextButton = "button[cy-data='next']";

0 comments on commit bbf9afa

Please sign in to comment.