-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add archetype update method Signed-off-by: Nandini Chandra <[email protected]> * Archetype CRUD tests Signed-off-by: Nandini Chandra <[email protected]> * Archetype CRUD tests Signed-off-by: Nandini Chandra <[email protected]> * Archetype CRUD tests Signed-off-by: Nandini Chandra <[email protected]> * Minor changes Signed-off-by: Nandini Chandra <[email protected]> --------- Signed-off-by: Nandini Chandra <[email protected]>
- Loading branch information
Showing
3 changed files
with
150 additions
and
7 deletions.
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
82 changes: 82 additions & 0 deletions
82
cypress/e2e/tests/migration/applicationinventory/archetypes/crud.test.ts
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,82 @@ | ||
/* | ||
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 { | ||
login, | ||
exists, | ||
createMultipleStakeholders, | ||
createMultipleStakeholderGroups, | ||
checkSuccessAlert, | ||
createMultipleTags, | ||
notExists, | ||
} from "../../../../../utils/utils"; | ||
|
||
import { successAlertMessage } from "../../../../views/common.view"; | ||
import * as data from "../../../../../utils/data_utils"; | ||
import { Archetype } from "../../../../models/migration/applicationinventory/archetype"; | ||
import { Stakeholders } from "../../../../models/migration/controls/stakeholders"; | ||
import { Stakeholdergroups } from "../../../../models/migration/controls/stakeholdergroups"; | ||
import { Tag } from "../../../../models/migration/controls/tags"; | ||
|
||
let stakeholders: Stakeholders[]; | ||
let stakeholderGroups: Stakeholdergroups[]; | ||
let tagList: Tag[]; | ||
|
||
describe(["@tier1"], "Archetype CRUD operations", () => { | ||
before("Login", function () { | ||
login(); | ||
stakeholders = createMultipleStakeholders(2); | ||
stakeholderGroups = createMultipleStakeholderGroups(2); | ||
tagList = createMultipleTags(2); | ||
}); | ||
|
||
// Automates Polarion MTA-395 | ||
it("Archetype CRUD operations", function () { | ||
const archetype = new Archetype( | ||
data.getRandomWord(8), | ||
[tagList[0].name], | ||
[tagList[1].name], | ||
null, | ||
stakeholders, | ||
stakeholderGroups | ||
); | ||
archetype.create(); | ||
checkSuccessAlert( | ||
successAlertMessage, | ||
`Success alert:Archetype ${archetype.name} was successfully created.`, | ||
true | ||
); | ||
exists(archetype.name); | ||
|
||
const updatedArchetypeName = data.getRandomWord(8); | ||
archetype.edit({ name: updatedArchetypeName }); | ||
checkSuccessAlert( | ||
successAlertMessage, | ||
`Success alert:Archetype was successfully saved.`, | ||
true | ||
); | ||
exists(updatedArchetypeName); | ||
|
||
archetype.delete(); | ||
checkSuccessAlert( | ||
successAlertMessage, | ||
`Success alert:Archetype ${archetype.name} was successfully deleted.`, | ||
true | ||
); | ||
notExists(archetype.name); | ||
}); | ||
}); |
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