test: regression tests for import flow (#38457)
Added test for import app validation at app level /ok-to-test tags="@tag.All" <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12653467361> > Commit: 1ac6a57472822360ae786bef59df3238cba130c4 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12653467361&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 08 Jan 2025 04:28:32 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Added a new test suite to verify import functionality for applications - Implemented test case to check import options and data source validation at the app level - **New Features** - Added new locators for import button and list item title to support testing <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: “NandanAnantharamu” <“nandan@thinkify.io”>
This commit is contained in:
parent
057c6267bd
commit
2dadb16b22
|
|
@ -0,0 +1,65 @@
|
|||
import {
|
||||
agHelper,
|
||||
homePage,
|
||||
gitSync,
|
||||
appSettings,
|
||||
locators,
|
||||
} from "../../../../support/Objects/ObjectsCore";
|
||||
import EditorNavigation, {
|
||||
AppSidebar,
|
||||
AppSidebarButton,
|
||||
} from "../../../../support/Pages/EditorNavigation";
|
||||
import ReconnectLocators from "../../../../locators/ReconnectLocators";
|
||||
|
||||
describe("Tests Import option for normal apps at app level", {}, () => {
|
||||
before(() => {
|
||||
gitSync.CreateNConnectToGit();
|
||||
});
|
||||
|
||||
it("1. Verify Import Option at app level", () => {
|
||||
let Datasource = [
|
||||
"AWSLambda",
|
||||
"Airtable",
|
||||
"GSheets_RWDSelected",
|
||||
"GSheets_RWDAll",
|
||||
"Hubspot",
|
||||
"gsheet",
|
||||
"Twilio",
|
||||
"Dynamo",
|
||||
"ElasticSearch",
|
||||
"Firestore",
|
||||
"Movies",
|
||||
"Mongo",
|
||||
"Oracle",
|
||||
"Redshift",
|
||||
"PostGreSQL",
|
||||
"SMTP",
|
||||
"Snowflake",
|
||||
"S3",
|
||||
"Oauth2.0",
|
||||
"Pixabay",
|
||||
"OpenAI",
|
||||
];
|
||||
AppSidebar.navigate(AppSidebarButton.Settings);
|
||||
agHelper.GetNClick(appSettings.locators._importHeader);
|
||||
agHelper.AssertElementEnabledDisabled(appSettings.locators._importBtn);
|
||||
|
||||
homePage.NavigateToHome();
|
||||
homePage.CreateNewApplication();
|
||||
AppSidebar.navigate(AppSidebarButton.Settings);
|
||||
agHelper.GetNClick(appSettings.locators._importHeader);
|
||||
agHelper.AssertElementEnabledDisabled(
|
||||
appSettings.locators._importBtn,
|
||||
0,
|
||||
false,
|
||||
);
|
||||
agHelper.GetNClick(appSettings.locators._importBtn);
|
||||
homePage.ImportApp("TryToCoverMore.json", "", true);
|
||||
agHelper.GetNClick(ReconnectLocators.SkipToAppBtn);
|
||||
|
||||
AppSidebar.navigate(AppSidebarButton.Data);
|
||||
Datasource.forEach((ds) => {
|
||||
agHelper.GetNAssertContains(locators._listItemTitle, ds);
|
||||
});
|
||||
});
|
||||
});
|
||||
1
app/client/cypress/fixtures/TryToCoverMore.json
Normal file
1
app/client/cypress/fixtures/TryToCoverMore.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -350,6 +350,7 @@ export class CommonLocators {
|
|||
_editorTab = ".editor-tab";
|
||||
_entityTestId = (entity: string) =>
|
||||
`[data-testid="t--entity-item-${entity}"]`;
|
||||
_listItemTitle = ".ads-v2-listitem__title";
|
||||
_dropdownOption = ".rc-select-item-option-content";
|
||||
_dropdownActiveOption = ".rc-select-dropdown .rc-select-item-option-active";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ export class AppSettings {
|
|||
_scrollArrows: ".scroll-arrows",
|
||||
_getActivePage: (pageName: string) =>
|
||||
`//span[contains(text(),"${pageName}")]//ancestor::a[contains(@class,'is-active')]`,
|
||||
_importBtn: "[data-testid='t--app-setting-import-btn']",
|
||||
};
|
||||
|
||||
public errorMessageSelector = (fieldId: string) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user