forked from konveyor/tackle-ui-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFR] Test few operations after disabling Keycloak (konveyor#1041)
* Re-add disable Keycloak tests Signed-off-by: Nandini Chandra <[email protected]> * Added additional tests Signed-off-by: Nandini Chandra <[email protected]> * Minor change Signed-off-by: Nandini Chandra <[email protected]> * Additional changes Signed-off-by: Nandini Chandra <[email protected]> * Update login() Signed-off-by: Nandini Chandra <[email protected]> * Update login() Signed-off-by: Nandini Chandra <[email protected]> * Minor change Signed-off-by: Nandini Chandra <[email protected]> * Adding log message Signed-off-by: Nandini Chandra <[email protected]> * Reverting log message Signed-off-by: Nandini Chandra <[email protected]> --------- Signed-off-by: Nandini Chandra <[email protected]>
- Loading branch information
Showing
2 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
Copyright © 2021 the Konveyor Contributors (https://konveyor.io/) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
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. | ||
*/ | ||
/// <reference types="cypress" /> | ||
|
||
import { | ||
getRandomApplicationData, | ||
patchTackleCR, | ||
createMultipleStakeholders, | ||
deleteByList, | ||
login, | ||
} from "../../../utils/utils"; | ||
import { Stakeholders } from "../../models/migration/controls/stakeholders"; | ||
import { Application } from "../../models/migration/applicationinventory/application"; | ||
import { | ||
legacyPathfinder, | ||
cloudReadinessQuestionnaire, | ||
cloudReadinessFilePath, | ||
SEC, | ||
} from "../../types/constants"; | ||
import { AssessmentQuestionnaire } from "../../models/administration/assessment_questionnaire/assessment_questionnaire"; | ||
import { Analysis } from "../../models/migration/applicationinventory/analysis"; | ||
import { applicationInventory } from "../../types/constants"; | ||
|
||
let application = new Application(getRandomApplicationData()); | ||
let stakeholders: Stakeholders[]; | ||
|
||
describe(["@tier5"], "Perform certain operations after disabling Keycloak", function () { | ||
// Automates Polarion MTA-293 | ||
before("Disable Keycloak", function () { | ||
patchTackleCR("keycloak", false); | ||
login(); | ||
|
||
application.create(); | ||
stakeholders = createMultipleStakeholders(1); | ||
|
||
AssessmentQuestionnaire.deleteAllQuestionnaires(); | ||
AssessmentQuestionnaire.import(cloudReadinessFilePath); | ||
AssessmentQuestionnaire.enable(cloudReadinessQuestionnaire); | ||
AssessmentQuestionnaire.disable(legacyPathfinder); | ||
}); | ||
|
||
beforeEach("Load data", function () { | ||
// RBAC rules for architect are applicable to admin as well | ||
cy.fixture("rbac").then(function (rbacRules) { | ||
this.rbacRules = rbacRules["architect"]; | ||
}); | ||
}); | ||
|
||
it("With Auth disabled, Perform application assessment and review", function () { | ||
application.perform_assessment("high", stakeholders, null, cloudReadinessQuestionnaire); | ||
cy.wait(SEC); | ||
application.verifyStatus("assessment", "Completed"); | ||
|
||
application.perform_review("low"); | ||
cy.wait(SEC); | ||
application.verifyStatus("assessment", "Completed"); | ||
}); | ||
|
||
it("Validate content of top kebab menu", function () { | ||
// Import button should be available | ||
Analysis.validateTopActionMenu(this.rbacRules); | ||
}); | ||
|
||
it("Validate content of application kebab menu", function () { | ||
application.validateAppContextMenu(this.rbacRules); | ||
}); | ||
|
||
after("Clean up", function () { | ||
// Keycloak is not re-enabled because of Bug MTA-1152 | ||
application.delete(); | ||
deleteByList(stakeholders); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters