-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Prince Sanchez <[email protected]>
- Loading branch information
1 parent
e6ba2b3
commit 57f7110
Showing
4 changed files
with
124 additions
and
5 deletions.
There are no files selected for viewing
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
76 changes: 76 additions & 0 deletions
76
canvas_modules/harness/cypress/e2e/canvas/comments-wysiwyg.cy.js
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,76 @@ | ||
describe("Test for verifying WYSIWYG comments functionality in the application", function() { | ||
beforeEach(() => { | ||
cy.visit("/"); | ||
cy.setCanvasConfig({ "selectedWYSIWYGComments": true }); | ||
cy.rightClickToDisplayContextMenu(500, 50); | ||
cy.verifyOptionInContextMenu("New WYSIWYG comment"); | ||
cy.clickOptionFromContextMenu("New WYSIWYG comment"); | ||
cy.editTextInComment("", "First Comment", false); | ||
}); | ||
|
||
it("Test to verify functionality of font option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("submenu-font", "IBM Plex Mono"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "font-family", styleValue: "IBM Plex Mono" }); | ||
}); | ||
|
||
it("Test to verify functionality of text size option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("submenu-text-size", "18"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "font-size", styleValue: "18px" }); | ||
}); | ||
|
||
it("Test to verify functionality of bold option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("bold"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "font-weight", styleValue: "600" }); | ||
}); | ||
|
||
it("Test to verify functionality of italics option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("italics"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "font-style", styleValue: "italic" }); | ||
}); | ||
|
||
it("Test to verify functionality of underline option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("underline"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "text-decoration", styleValue: "underline" }); | ||
}); | ||
|
||
it("Test to verify functionality of striketrough option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("strikethrough"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "text-decoration", styleValue: "line-through" }); | ||
}); | ||
|
||
it("Test to verify functionality of text color option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("submenu-text-color", "#A2191F"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "color", styleValue: "rgb(162, 25, 31)" }); | ||
}); | ||
|
||
it("Test to verify functionality of horizontal align option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("submenu-align-horiz", "Center"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "text-align", styleValue: "center" }); | ||
}); | ||
|
||
it("Test to verify functionality of vertical align option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("submenu-align-vert", "Bottom"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "vertical-align", styleValue: "bottom" }); | ||
}); | ||
|
||
it("Test to verify functionality of background color option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("submenu-background-color", "#0E6027"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "background-color", styleValue: "rgb(14, 96, 39)" }); | ||
}); | ||
|
||
it("Test to verify functionality of outline option in WYSIWYG toolbar", function() { | ||
cy.clickTextToolbarOption("sub-menu-outline", "Solid outline"); | ||
cy.clickCanvasAt(5, 5); | ||
cy.verifyWysiwygCommentStyles({ styleName: "border-width", styleValue: "1px" }); | ||
}); | ||
}); |
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