-
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.
[RFR] Task manager - table column management validation (#1306)
* Task manager - table column management validation Signed-off-by: Maayan Hadasi <[email protected]> * Changes after review Signed-off-by: Maayan Hadasi <[email protected]> --------- Signed-off-by: Maayan Hadasi <[email protected]>
- Loading branch information
Showing
4 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
cypress/e2e/tests/migration/task-manager/manage_columns.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,74 @@ | ||
/* | ||
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 { | ||
clickByText, | ||
login, | ||
openManageColumns, | ||
restoreColumnsToDefault, | ||
selectColumns, | ||
validateCheckBoxIsDisabled, | ||
validateTextPresence, | ||
} from "../../../../utils/utils"; | ||
import { TaskManager } from "../../../models/migration/task-manager/task-manager"; | ||
import { button, cancel, save } from "../../../types/constants"; | ||
import { tableHead } from "../../../views/common.view"; | ||
import { TaskManagerTableHeaders } from "../../../views/taskmanager.view"; | ||
|
||
describe(["@tier3"], "Task manager - table column management validation", function () { | ||
const taskManagerDefaultColumns = Object.values(TaskManagerTableHeaders).slice(0, 6); | ||
const columnsToSelect = [ | ||
TaskManagerTableHeaders.pod, | ||
TaskManagerTableHeaders.started, | ||
TaskManagerTableHeaders.terminated, | ||
]; | ||
|
||
before("Login", function () { | ||
login(); | ||
}); | ||
|
||
it("Open task manager page - table default columns should be visible", function () { | ||
TaskManager.open(); | ||
taskManagerDefaultColumns.forEach((column) => validateTextPresence(tableHead, column)); | ||
columnsToSelect.forEach((column) => validateTextPresence(tableHead, column, false)); | ||
}); | ||
|
||
it("Select columns to display in the table view - they should be visible", function () { | ||
// Check the unchecked columns and verify that all columns are visible | ||
selectColumns(columnsToSelect); | ||
Object.values(TaskManagerTableHeaders).forEach((column) => | ||
validateTextPresence(tableHead, column) | ||
); | ||
}); | ||
|
||
it("Validate ID checbox in the manage columns window is checked and disabled", function () { | ||
openManageColumns(); | ||
validateCheckBoxIsDisabled(TaskManagerTableHeaders.id, true); | ||
clickByText(button, save); | ||
}); | ||
|
||
it("Validate restoring columns to default", function () { | ||
restoreColumnsToDefault(); | ||
taskManagerDefaultColumns.forEach((column) => validateTextPresence(tableHead, column)); | ||
}); | ||
|
||
it("Validate cancel button in the manage columns window", function () { | ||
openManageColumns(); | ||
clickByText(button, cancel); | ||
taskManagerDefaultColumns.forEach((column) => validateTextPresence(tableHead, column)); | ||
}); | ||
}); |
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
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
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