-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
test: added test for incompatible file #37323
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { | ||
homePage, | ||
partialImportExport, | ||
agHelper | ||
} from "../../../../support/Objects/ObjectsCore"; | ||
|
||
describe( | ||
"Partial import App", | ||
{ tags: ["@tag.ImportExport", "@tag.Git"] }, | ||
() => { | ||
beforeEach(() => { | ||
partialImportExport.OpenImportModal(); | ||
}); | ||
|
||
it("1. Verify Importing App into Page shows error message for incompatible json file ", () => { | ||
homePage.ImportApp("PartialImportAppNegative.json", "", true); | ||
agHelper.ValidateToastMessage("Unable to import artifact in workspace The file is not compatible with the current partial import operation. Please check the file and try again.. {1}") | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Refactor test case to follow best practices.
+ const ERROR_MESSAGES = {
+ INCOMPATIBLE_FILE: "Unable to import artifact in workspace The file is not compatible with the current partial import operation. Please check the file and try again.. {1}"
+ };
+ const TEST_FILES = {
+ INCOMPATIBLE_JSON: "PartialImportAppNegative.json"
+ };
it("1. Verify Importing App into Page shows error message for incompatible json file ", () => {
- homePage.ImportApp("PartialImportAppNegative.json", "", true);
- agHelper.ValidateToastMessage("Unable to import artifact in workspace The file is not compatible with the current partial import operation. Please check the file and try again.. {1}")
+ homePage.ImportApp(TEST_FILES.INCOMPATIBLE_JSON, "", true);
+ agHelper.ValidateToastMessage(ERROR_MESSAGES.INCOMPATIBLE_FILE)
});
|
||
}, | ||
); |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||
# To run only limited tests - give the spec names in below format: | ||||||
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js | ||||||
cypress/e2e/Regression/ClientSide/PartialImportExport/ParitalImportAppNegative_spec.ts | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix typo in spec filename: "Parital" → "Partial" The specification filename contains a typo that should be corrected to ensure consistency and prevent potential issues. Apply this diff: -cypress/e2e/Regression/ClientSide/PartialImportExport/ParitalImportAppNegative_spec.ts
+cypress/e2e/Regression/ClientSide/PartialImportExport/PartialImportAppNegative_spec.ts 📝 Committable suggestion
Suggested change
|
||||||
# For running all specs - uncomment below: | ||||||
#cypress/e2e/**/**/* | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance test robustness with constants and additional assertions
While the test follows most best practices, consider these improvements:
Here's how you could improve it: