Skip to content

Commit

Permalink
fix: Video2 spec flaky fix (appsmithorg#36166)
Browse files Browse the repository at this point in the history
## Description
RCA: We are using youtube url for `Verify Basic Functionality of Video
Widget - muted`. Which leads to flakiness. Also this case needs a human
intervention to fulfilled the actual user case.

Solution: Deleted this test as it can be part of manual testing.

Fixes #`36164`  

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10766784105>
> Commit: 11d8d95
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10766784105&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 09 Sep 2024 05:41:15 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Removed a test case for the muted functionality of the Video Widget,
streamlining the test suite.
  
- **Chores**
- Updated the test path in the limited-tests file to prioritize video
widget testing over template testing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
sagar-qa007 authored and Shivam-z committed Sep 26, 2024
1 parent 95f12f3 commit 4320db1
Showing 1 changed file with 5 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,7 @@ describe(
agHelper.AssertProperty(widgetLocators.video, "ended", true);
});

it("2. Verify Basic Functionality of Video Widget - muted", function () {
deployMode.NavigateBacktoEditor();
EditorNavigation.SelectEntityByName("Video1", EntityType.Widget);
//Validate video for youtube url
propPane.TypeTextIntoField("URL", testdata.videoUrl);
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.VIDEO));
agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.VIDEO));
agHelper.Sleep(2000);
agHelper.GetElement(widgetLocators.iFrame).then(($iframe) => {
const doc = $iframe.contents();
const video = doc.find(widgetLocators.video);
//Check play, mute & unmute, volume buttons
cy.wrap(
doc.find(widgetLocators.videoWidgetYoutubeLargePlayBtn),
).click();
cy.wrap(video).click();
agHelper.Sleep(1000);
cy.wrap(doc.find(widgetLocators.videoWidgetYoutubeMuteBtn)).click();
agHelper.AssertProperty(video, "muted", true);
agHelper.AssertProperty(video, "paused", true);
cy.wrap(doc.find(widgetLocators.videoWidgetYoutubeVolumeBtn)).type(
"{rightarrow}{rightarrow}",
);
agHelper.AssertProperty(video, "muted", false);
});
});

it("3. Verify widget for invalid URL's", function () {
it("2. Verify widget for invalid URL's", function () {
deployMode.NavigateBacktoEditor();
EditorNavigation.SelectEntityByName("Video1", EntityType.Widget);
propPane.RemoveText("URL");
Expand Down Expand Up @@ -107,7 +80,7 @@ describe(
});
});

it("4. Verify auto play property", function () {
it("3. Verify auto play property", function () {
deployMode.NavigateBacktoEditor();
EditorNavigation.SelectEntityByName("Video1", EntityType.Widget);
agHelper.AssertExistingToggleState("Autoplay", "false");
Expand All @@ -128,7 +101,7 @@ describe(
agHelper.AssertProperty(widgetLocators.video, "paused", true);
});

it("5. Verify visible property", function () {
it("4. Verify visible property", function () {
deployMode.NavigateBacktoEditor();
EditorNavigation.SelectEntityByName("Video1", EntityType.Widget);
agHelper.AssertExistingToggleState("Visible", "true");
Expand All @@ -154,7 +127,7 @@ describe(
);
});

it("6. Verify OnPlay, OnPause, OnEnd events are JS convertible", function () {
it("5. Verify OnPlay, OnPause, OnEnd events are JS convertible", function () {
deployMode.NavigateBacktoEditor();
EditorNavigation.SelectEntityByName("Video1", EntityType.Widget);
propPane.EnterJSContext(
Expand Down Expand Up @@ -193,7 +166,7 @@ describe(
});
});

it("7. Verify video styles", function () {
it("6. Verify video styles", function () {
deployMode.NavigateBacktoEditor();
EditorNavigation.SelectEntityByName("Video1", EntityType.Widget);
propPane.MoveToTab("Style");
Expand Down

0 comments on commit 4320db1

Please sign in to comment.