-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4379d83
commit 7e05339
Showing
6 changed files
with
130 additions
and
3 deletions.
There are no files selected for viewing
97 changes: 94 additions & 3 deletions
97
app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Branding_settings_Spec.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 |
---|---|---|
@@ -1,17 +1,108 @@ | ||
import { | ||
agHelper, | ||
adminSettings, | ||
locators, | ||
} from "../../../../support/Objects/ObjectsCore"; | ||
import { CURRENT_REPO, REPO } from "../../../../fixtures/REPO"; | ||
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; | ||
import AdminsSettings from "../../../../locators/AdminsSettings"; | ||
|
||
describe( | ||
"Admin Branding Page - Branding page validations", | ||
{ tags: ["@tag.Settings"] }, | ||
() => { | ||
it("1. Verify branding data update for community user", () => { | ||
featureFlagIntercept({ license_branding_enabled: true }); | ||
adminSettings.NavigateToAdminSettings(); | ||
agHelper.AssertElementVisibility(AdminsSettings.LeftPaneBrandingLink); | ||
agHelper.GetNClick(AdminsSettings.LeftPaneBrandingLink); | ||
|
||
// branding logo PNG | ||
cy.get(AdminsSettings.AdmingSettingsLogoInput).selectFile( | ||
"cypress/fixtures/appsmithlogo.png", | ||
{ force: true }, | ||
); | ||
agHelper.AssertElementAbsence(locators._toastMsg); | ||
agHelper.AssertElementVisibility( | ||
AdminsSettings.AdmingSettingsLogoInputImage, | ||
); | ||
agHelper.WaitForCondition(() => { | ||
cy.get(AdminsSettings.BrandingLogo) | ||
.invoke("attr", "src") | ||
.then((src) => { | ||
cy.get(AdminsSettings.AdmingSettingsLogoInputImage) | ||
.invoke("attr", "src") | ||
.should("equal", src); | ||
}); | ||
}); | ||
|
||
// branding logo jpg | ||
cy.get(AdminsSettings.AdmingSettingsLogoInput).selectFile( | ||
"cypress/fixtures/AAAFlowerVase.jpeg", | ||
{ force: true }, | ||
); | ||
agHelper.AssertElementAbsence(locators._toastMsg); | ||
agHelper.AssertElementVisibility( | ||
AdminsSettings.AdmingSettingsLogoInputImage, | ||
); | ||
agHelper.WaitForCondition(() => { | ||
cy.get(AdminsSettings.BrandingLogo) | ||
.invoke("attr", "src") | ||
.then((src) => { | ||
cy.get(AdminsSettings.AdmingSettingsLogoInputImage) | ||
.invoke("attr", "src") | ||
.should("equal", src); | ||
}); | ||
}); | ||
|
||
// branding logo svg | ||
// comment due to bug: https://github.com/appsmithorg/appsmith/issues/34329 | ||
// cy.get(AdminsSettings.AdmingSettingsLogoInput).selectFile( | ||
// "cypress/fixtures/appsmith-community-logo.svg", | ||
// { force: true }, | ||
// ); | ||
// agHelper.AssertElementAbsence(locators._toastMsg); | ||
|
||
// agHelper.AssertElementVisibility( | ||
// AdminsSettings.AdmingSettingsLogoInputImage, | ||
// ); | ||
// agHelper.WaitForCondition(() => { | ||
// cy.get(AdminsSettings.BrandingLogo) | ||
// .invoke("attr", "src") | ||
// .then((src) => { | ||
// cy.get(AdminsSettings.AdmingSettingsLogoInputImage) | ||
// .invoke("attr", "src") | ||
// .should("equal", src); | ||
// }); | ||
// }); | ||
|
||
// branding favicon png | ||
cy.get(AdminsSettings.AdmingSettingsFaviconInput).selectFile( | ||
"cypress/fixtures/branding_sample.png", | ||
{ force: true }, | ||
); | ||
agHelper.AssertElementAbsence(locators._toastMsg); | ||
agHelper.AssertElementVisibility( | ||
AdminsSettings.AdmingSettingsFaviconInputImage, | ||
); | ||
cy.get(AdminsSettings.BrandingFavicon) | ||
.invoke("attr", "src") | ||
.then((src) => { | ||
cy.get(AdminsSettings.AdmingSettingsFaviconInputImage) | ||
.invoke("attr", "src") | ||
.should("equal", src); | ||
}); | ||
|
||
// branding favicon jpg | ||
cy.get(AdminsSettings.AdmingSettingsFaviconInput).selectFile( | ||
"cypress/fixtures/branding_samplejpg.jpg", | ||
{ force: true }, | ||
); | ||
agHelper.AssertElementAbsence(locators._toastMsg); | ||
|
||
// branding favicon ico | ||
cy.get(AdminsSettings.AdmingSettingsFaviconInput).selectFile( | ||
"cypress/fixtures/branding_sampleICO.ico", | ||
{ force: true }, | ||
); | ||
agHelper.AssertElementAbsence(locators._toastMsg); | ||
}); | ||
}, | ||
); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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