From 92ec863fbc535d2665e6268baf6509b28974262c Mon Sep 17 00:00:00 2001 From: agriyadev5 Date: Fri, 27 Aug 2021 14:11:11 +0530 Subject: [PATCH] #623 line missing test case added --- .../ui/__snapshots__/scenario5.js.snap | 424 +++++++++++++++++- cypress/integration/ui/scenario5.js | 52 ++- 2 files changed, 471 insertions(+), 5 deletions(-) diff --git a/cypress/integration/ui/__snapshots__/scenario5.js.snap b/cypress/integration/ui/__snapshots__/scenario5.js.snap index 947b63a5..a9135fb8 100644 --- a/cypress/integration/ui/__snapshots__/scenario5.js.snap +++ b/cypress/integration/ui/__snapshots__/scenario5.js.snap @@ -252,7 +252,7 @@ exports[`use all parts of svg-edit > check tool_line_clone #0`] = ` `; -exports[`use all parts of svg-edit > check tool_fhrect_change_x_y_coordinate #0`] = ` +exports[`use all parts of svg-edit > check tool_line_bring_to_back #0`] = ` check tool_fhrect_change_x_y_coordinate #0` stroke="#000000" stroke-width="5" opacity="0.5" - x1="225" + x1="200" y1="200" - x2="475" - y2="425" + x2="450" + y2="450" id="svg_2" fill-opacity="1" stroke-opacity="1" @@ -310,3 +310,419 @@ exports[`use all parts of svg-edit > check tool_fhrect_change_x_y_coordinate #0` `; + +exports[`use all parts of svg-edit > check tool_line_bring_to_front #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; + +exports[`use all parts of svg-edit > check tool_line_change_x_y_coordinate #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; + +exports[`use all parts of svg-edit > check tool_line_change_stroke_width #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; + +exports[`use all parts of svg-edit > check tool_line_change_stroke_style #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; + +exports[`use all parts of svg-edit > check tool_line_change_line_cap #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; + +exports[`use all parts of svg-edit > check tool_line_align_to_page #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; + +exports[`use all parts of svg-edit > check tool_line_change_stoke_color #0`] = ` + + + Layer 1 + + + + + + + + + + + +`; diff --git a/cypress/integration/ui/scenario5.js b/cypress/integration/ui/scenario5.js index 4fd22c95..ce20994d 100644 --- a/cypress/integration/ui/scenario5.js +++ b/cypress/integration/ui/scenario5.js @@ -94,7 +94,17 @@ describe('use all parts of svg-edit', function () { cy.get('#tool_clone').click({ force: true }); cy.get('#svgcontent').toMatchSnapshot(); }); - it('check tool_fhrect_change_x_y_coordinate', function () { + it('check tool_line_bring_to_back', function () { + cy.get('#svg_2').click({ force: true }); + cy.get('#tool_move_bottom').click({ force: true }); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_line_bring_to_front', function () { + cy.get('#svg_2').click({ force: true }); + cy.get('#tool_move_top').click({ force: true }); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_line_change_x_y_coordinate', function () { cy.get('#svg_2').click({ force: true }); for(let n = 0; n < 25; n ++){ cy.get('#line_x1').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0) @@ -114,4 +124,44 @@ describe('use all parts of svg-edit', function () { } cy.get('#svgcontent').toMatchSnapshot(); }); + it('check tool_line_change_stroke_width', function () { + cy.get('#svg_2').click({ force: true }); + for(let n = 0; n < 10; n ++){ + cy.get('#stroke_width').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0) + .click({ force: true }); + } + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_line_change_stroke_style', function () { + cy.get('#svg_2').click({ force: true }); + cy.get('#stroke_style').shadow().find('elix-dropdown-list').eq(0).invoke('attr', 'opened', 'opened'); + cy.get('#stroke_style').find('se-list-item').eq(3).shadow().find('elix-option').eq(0) + .click({ force: true }); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_line_change_line_cap', function () { + cy.get('#svg_2').click({ force: true }); + cy.get('#stroke_linecap').shadow().find('elix-dropdown-list').eq(0).invoke('attr', 'opened', 'opened'); + cy.get('#stroke_linecap').find('se-list-item').eq(1).shadow().find('elix-option').eq(0) + .click({ force: true }); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_line_align_to_page', function () { + cy.get('#svg_3').click({ force: true }); + cy.get('#tool_position').shadow().find('elix-dropdown-list').eq(0).invoke('attr', 'opened', 'opened'); + cy.get('#tool_position').find('se-list-item').eq(2).shadow().find('elix-option').eq(0) + .click({ force: true }); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_line_change_stoke_color', function () { + cy.get('#svg_3').click({ force: true }); + cy.get('#stroke_color').shadow().find('#picker').eq(0).click({ force: true }); + cy.get('#stroke_color').shadow().find('#color_picker').eq(0) + .find('#jGraduate_colPick').eq(0).find('#jPicker-table').eq(0) + .find('.QuickColor').eq(9).click({ force: true }); + cy.get('#stroke_color').shadow().find('#color_picker').eq(0) + .find('#jGraduate_colPick').eq(0).find('#jPicker-table').eq(0) + .find('#Ok').eq(0).click({ force: true }); + cy.get('#svgcontent').toMatchSnapshot(); + }); });