itemengine-cypress-automation 1.0.26 → 1.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -464,347 +464,6 @@ describe('Create Item page - Highlight image: Customize highlight properties', (
464
464
  });
465
465
  });
466
466
 
467
- //Failing due to https://redmine.zeuslearning.com/issues/546130
468
- describe('Customize highlight properties accordion: Global and option tab functionality of default state in set correct answer and preview tab', () => {
469
- abortEarlySetup();
470
- before(() => {
471
- cy.log('Navigating to highlight image question type');
472
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
473
- cy.barsPreLoaderWait();
474
- cy.log('Uploading an image');
475
- uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
476
- uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
477
- uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
478
- utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
479
- highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
480
- highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
481
- highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
482
- highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(0, flowerHighlightRegion);
483
- highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
484
- highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(1, leafHighlightRegion);
485
- highlightImagePage.steps.expandCustomizeHighlightProperties();
486
- });
487
-
488
- it('When the user has not updated \'Fill color\' and \'Border color\' of \'Default\' state in \'Global\' tab then the default state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the \'Set correct answer\' section', () => {
489
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
490
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(82, 0, 255)', '1');
491
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
492
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
493
- });
494
-
495
- it('When the user has not updated \'Fill color\' and \'Border color\' of \'Default\' state in \'Global\' tab then the default state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the\'Preview tab\'', () => {
496
- cy.log('Switching to preview Tab');
497
- highlightImagePage.steps.switchToPreviewTab();
498
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
499
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(82, 0, 255)', '1');
500
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
501
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
502
- });
503
-
504
- it('When the user updates the \'Fill color\' and \'Border color\' of \'Default\' state in \'Option 1\' tab then the default state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of default state according to the \'Global\' tab and hover and active state for \'Option 1\' and \'Option 2\' highlight region should be also according to the \'Global\' tab in the \'Set correct answer\' section', () => {
505
- cy.log('Switching to edit Tab');
506
- highlightImagePage.steps.switchToEditTab();
507
- highlightImagePage.steps.navigateToOptionTab(1);
508
- highlightImagePage.steps.clickOnHighlightColorBlock('defaultFillColor');
509
- colorPopupComponent.steps.selectRecommendedColorBlock(0);
510
- colorPopupComponent.steps.addInputToOpacityInputField('50');
511
- colorPopupComponent.steps.clickOnOkButton();
512
- highlightImagePage.steps.clickOnHighlightColorBlock('defaultBorderColor');
513
- colorPopupComponent.steps.selectRecommendedColorBlock(1);
514
- colorPopupComponent.steps.addInputToOpacityInputField('50');
515
- colorPopupComponent.steps.clickOnOkButton();
516
- cy.log("Verifying default state");
517
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(229, 76, 25)', '0.5');
518
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.5');
519
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
520
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
521
- cy.log("Verifying hover state");
522
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
523
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(66, 0, 204)', '1');
524
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
525
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
526
- cy.log("Verifying active state");
527
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(107, 139, 255)', '0.7');
528
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(41, 0, 128)', '1');
529
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
530
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
531
- });
532
-
533
- it('When the user has updated the \'Fill color\' and \'Border color\' of \'Default\' state in \'Option 1\' tab then the default state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of default state according to the \'Global\' tab and hover and active state for \'Option 1\' and \'Option 2\' highlight region should be also according to the \'Global\' tab in the \'Preview tab\'', () => {
534
- cy.log('Switching to preview Tab');
535
- highlightImagePage.steps.switchToPreviewTab();
536
- cy.log("Verifying default state");
537
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(229, 76, 25)', '0.5');
538
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.5');
539
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
540
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
541
- cy.log("Verifying hover state");
542
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
543
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(66, 0, 204)', '1');
544
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
545
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
546
- cy.log("Verifying active state");
547
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(107, 139, 255)', '0.7');
548
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(41, 0, 128)', '1');
549
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
550
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
551
- });
552
-
553
- it('When the user updates \'Fill color\' and \'Border color\' of \'Default\' state in \'Global tab\' then the default state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of default state should be according to \'Option 1\' tab in the \'Set correct answer\' section', () => {
554
- cy.log('Switching to edit Tab');
555
- highlightImagePage.steps.switchToEditTab();
556
- highlightImagePage.steps.navigateToGlobalTab();
557
- highlightImagePage.steps.clickOnHighlightColorBlock('defaultFillColor');
558
- colorPopupComponent.steps.selectRecommendedColorBlock(3);
559
- colorPopupComponent.steps.addInputToOpacityInputField(70);
560
- colorPopupComponent.steps.clickOnOkButton();
561
- highlightImagePage.steps.clickOnHighlightColorBlock('defaultBorderColor');
562
- colorPopupComponent.steps.selectRecommendedColorBlock(2);
563
- colorPopupComponent.steps.addInputToOpacityInputField(70);
564
- colorPopupComponent.steps.clickOnOkButton();
565
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(0, 0, 0)', '0.7');
566
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(9, 179, 33)', '0.7');
567
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(229, 76, 25)', '0.5');
568
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.5');
569
- });
570
-
571
- it('When the user has updated \'Fill color\' and \'Border color\' of \'Default\' state in \'Global tab\' then the default state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of default state should be according to \'Option 1\' tab in the in the \'Preview tab\'', () => {
572
- cy.log('Switching to preview Tab');
573
- highlightImagePage.steps.switchToPreviewTab();
574
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(0, 0, 0)', '0.7');
575
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(9, 179, 33)', '0.7');
576
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(229, 76, 25)', '0.5');
577
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.5');
578
- });
579
- });
580
-
581
- //Failing due to https://redmine.zeuslearning.com/issues/546130
582
- describe('Customize highlight properties accordion: Global and option tab functionality of hover state in set correct answer and preview tab', () => {
583
- abortEarlySetup();
584
- before(() => {
585
- cy.log('Navigating to highlight image question type');
586
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
587
- cy.barsPreLoaderWait();
588
- cy.log('Uploading an image');
589
- uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
590
- uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
591
- uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
592
- utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
593
- highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
594
- highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
595
- highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
596
- highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(0, flowerHighlightRegion);
597
- highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
598
- highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(1, leafHighlightRegion);
599
- highlightImagePage.steps.expandCustomizeHighlightProperties();
600
- });
601
-
602
- it('When the user has not updated \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global\' tab then the hover state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the \'Set correct answer\' section', () => {
603
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
604
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(66, 0, 204)', '1');
605
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
606
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
607
- });
608
-
609
- it('When the user has not updated \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global\' tab then the hover state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the\'Preview tab\'', () => {
610
- highlightImagePage.steps.switchToPreviewTab();
611
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
612
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(66, 0, 204)', '1');
613
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
614
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
615
- });
616
-
617
- it('When the user updates the \'Fill color\' and \'Border color\' of \'Hover\' state in \'Option 1\' tab then the hover state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of hover state according to the \'Global\' tab and default and active state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Set correct answer\' section', () => {
618
- cy.log('Switching to edit Tab');
619
- highlightImagePage.steps.switchToEditTab();
620
- highlightImagePage.steps.navigateToOptionTab(1);
621
- highlightImagePage.steps.clickOnHighlightColorBlock('hoverFillColor');
622
- colorPopupComponent.steps.selectRecommendedColorBlock(2);
623
- colorPopupComponent.steps.addInputToOpacityInputField(70);
624
- colorPopupComponent.steps.clickOnOkButton();
625
- highlightImagePage.steps.clickOnHighlightColorBlock('hoverBorderColor');
626
- colorPopupComponent.steps.selectRecommendedColorBlock(3);
627
- colorPopupComponent.steps.addInputToOpacityInputField(70);
628
- colorPopupComponent.steps.clickOnOkButton();
629
- cy.log("Verifying hover state");
630
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(9, 179, 33)', '0.7');
631
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.7');
632
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
633
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
634
- cy.log("Verifying default state");
635
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
636
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(82, 0, 255)', '1');
637
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
638
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
639
- cy.log("Verifying active state");
640
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(107, 139, 255)', '0.7');
641
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(41, 0, 128)', '1');
642
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
643
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
644
- });
645
-
646
- it('When the user has updated the \'Fill color\' and \'Border color\' of \'Hover\' state in \'Option 1\' tab then the hover state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of hover state according to the \'Global\' tab and default and active state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Preview\' tab', () => {
647
- cy.log('Switching to preview Tab');
648
- highlightImagePage.steps.switchToPreviewTab();
649
- cy.log("Verifying hover state");
650
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(9, 179, 33)', '0.7');
651
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.7');
652
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
653
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
654
- cy.log("Verifying default state");
655
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
656
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(82, 0, 255)', '1');
657
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
658
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
659
- cy.log("Verifying active state");
660
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(107, 139, 255)', '0.7');
661
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(41, 0, 128)', '1');
662
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
663
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
664
- });
665
-
666
- it('When the user updates \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global tab\' then the hover state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of hover state should be according to \'Option 1\' tab in the \'Set correct answer\' section', () => {
667
- cy.log('Switching to edit Tab');
668
- highlightImagePage.steps.switchToEditTab();
669
- highlightImagePage.steps.navigateToGlobalTab();
670
- highlightImagePage.steps.clickOnHighlightColorBlock('hoverFillColor');
671
- colorPopupComponent.steps.selectRecommendedColorBlock(0);
672
- colorPopupComponent.steps.addInputToOpacityInputField(30);
673
- colorPopupComponent.steps.clickOnOkButton();
674
- highlightImagePage.steps.clickOnHighlightColorBlock('hoverBorderColor');
675
- colorPopupComponent.steps.selectRecommendedColorBlock(1);
676
- colorPopupComponent.steps.addInputToOpacityInputField(30);
677
- colorPopupComponent.steps.clickOnOkButton();
678
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(229, 76, 25)', '0.3');
679
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(255, 240, 25)', '0.3');
680
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(9, 179, 33)', '0.7');
681
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.7');
682
- });
683
-
684
- it('When the user has updated \'Fill color\' and \'Border color\' of \'Hover\' state in \'Global tab\' then the hover state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of hover state should be according to \'Option 1\' tab in the in the \'Preview tab\'', () => {
685
- cy.log('Switching to preview Tab');
686
- highlightImagePage.steps.switchToPreviewTab();
687
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(229, 76, 25)', '0.3');
688
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(255, 240, 25)', '0.3');
689
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(9, 179, 33)', '0.7');
690
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.7');
691
- });
692
- });
693
-
694
- //Failing due to https://redmine.zeuslearning.com/issues/546130
695
- describe('Customize highlight properties accordion: Global and option tab functionality of active state in set correct answer and preview tab', () => {
696
- abortEarlySetup();
697
- before(() => {
698
- cy.log('Navigating to highlight image question type');
699
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
700
- cy.barsPreLoaderWait();
701
- cy.log('Uploading an image');
702
- uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
703
- uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
704
- uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
705
- utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
706
- highlightImagePage.steps.verifyImageUploadedInHighlightRegion();
707
- highlightImagePage.steps.verifyImageUploadedInSetCorrectAnswerSection();
708
- highlightImagePage.steps.highlightRegionInImage(flowerHighlightRegion);
709
- highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(0, flowerHighlightRegion);
710
- highlightImagePage.steps.highlightRegionInImage(leafHighlightRegion);
711
- highlightImagePage.steps.verifyHighlightRegionsInSetCorrectAnswerSection(1, leafHighlightRegion);
712
- highlightImagePage.steps.expandCustomizeHighlightProperties();
713
- });
714
-
715
- it('When the user has not updated \'Fill color\' and \'Border color\' of \'Active\' state in \'Global\' tab then the active state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the \'Set correct answer\' section', () => {
716
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(107, 139, 255)', '0.7');
717
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(41, 0, 128)', '1');
718
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
719
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
720
- });
721
-
722
- it('When the user has not updated \'Fill color\' and \'Border color\' of \'Active\' state in \'Global\' tab then the active state of \'Option 1\' and \'Option 2\' highlight region should have the \'Fill color\' and \'Border color\' according to the global tab in the\'Preview tab\'', () => {
723
- cy.log('Switching to preview Tab');
724
- highlightImagePage.steps.switchToPreviewTab();
725
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(107, 139, 255)', '0.7');
726
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(41, 0, 128)', '1');
727
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
728
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
729
- });
730
-
731
- it('When the user updates the \'Fill color\' and \'Border color\' of \'Active\' state in \'Option 1\' tab then the active state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of active state according to the \'Global\' tab and default and hover state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Set correct answer\' section', () => {
732
- cy.log('Switching to edit Tab');
733
- highlightImagePage.steps.switchToEditTab();
734
- highlightImagePage.steps.navigateToOptionTab(1);
735
- highlightImagePage.steps.clickOnHighlightColorBlock('activeFillColor');
736
- colorPopupComponent.steps.selectRecommendedColorBlock(1);
737
- colorPopupComponent.steps.addInputToOpacityInputField(90);
738
- colorPopupComponent.steps.clickOnOkButton();
739
- highlightImagePage.steps.clickOnHighlightColorBlock('activeBorderColor');
740
- colorPopupComponent.steps.selectRecommendedColorBlock(3);
741
- colorPopupComponent.steps.addInputToOpacityInputField(90);
742
- colorPopupComponent.steps.clickOnOkButton()
743
- cy.log('Verfying default state')
744
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
745
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(82, 0, 255)', '1');
746
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
747
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(82, 0, 255)', '1');
748
- cy.log("Verifying hover state");
749
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(186, 201, 255)', '0.4');
750
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(66, 0, 204)', '1');
751
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(186, 201, 255)', '0.4');
752
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(66, 0, 204)', '1');
753
- cy.log("Verifying active state");
754
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.9');
755
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.9');
756
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(107, 139, 255)', '0.7');
757
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(41, 0, 128)', '1');
758
- });
759
-
760
- it('When the user has updated the \'Fill color\' and \'Border color\' of \'Active\' state in \'Option 1\' tab then the active state of the \'Option 1\' highlight region should be updated accordingly and the \'Option 2\' highlight region should have \'Fill color\' and \'Border color\' of active state according to the \'Global\' tab and default and hover state for \'Option 1\' and \'Option 2 \' highlight region should be also according to the \'Global\' tab in the \'Preview tab\'', () => {
761
- cy.log('Switching to preview Tab');
762
- highlightImagePage.steps.switchToPreviewTab();
763
- cy.log('Verfying default state')
764
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
765
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(82, 0, 255)', '1');
766
- highlightImagePage.steps.verifyDefaultFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
767
- highlightImagePage.steps.verifyDefaultBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(82, 0, 255)', '1');
768
- cy.log("Verifying hover state");
769
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(0, 'rgb(186, 201, 255)', '0.4');
770
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(66, 0, 204)', '1');
771
- highlightImagePage.steps.verifyHoverFillColorOfHighlightRegionInPreviewTab(1, 'rgb(186, 201, 255)', '0.4');
772
- highlightImagePage.steps.verifyHoverBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(66, 0, 204)', '1');
773
- cy.log("Verifying active state");
774
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.9');
775
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.9');
776
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(107, 139, 255)', '0.7');
777
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(41, 0, 128)', '1');
778
- });
779
-
780
- it('When the user updates \'Fill color\' and \'Border color\' of \'Active\' state in \'Global tab\' then the active state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of active state should be according to \'Option 1\' tab in the \'Set correct answer\' section', () => {
781
- cy.log('Switching to edit Tab');
782
- highlightImagePage.steps.switchToEditTab();
783
- highlightImagePage.steps.navigateToGlobalTab();
784
- highlightImagePage.steps.clickOnHighlightColorBlock('activeFillColor');
785
- colorPopupComponent.steps.selectRecommendedColorBlock(0);
786
- colorPopupComponent.steps.addInputToOpacityInputField(80);
787
- colorPopupComponent.steps.clickOnOkButton();
788
- highlightImagePage.steps.clickOnHighlightColorBlock('activeBorderColor');
789
- colorPopupComponent.steps.selectRecommendedColorBlock(2);
790
- colorPopupComponent.steps.addInputToOpacityInputField(80);
791
- colorPopupComponent.steps.clickOnOkButton();
792
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(229, 76, 25)', '0.8');
793
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(1, 'rgb(9, 179, 33)', '0.8');
794
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(255, 240, 25)', '0.9');
795
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInSetCorrectAnswerSection(0, 'rgb(0, 0, 0)', '0.9');
796
- });
797
-
798
- it('When the user has updated \'Fill color\' and \'Border color\' of \'Active\' state in \'Global tab\' then the active state of the \'Option 2\' highlight region should be updated accordingly and \'Fill color\' and \'Border color\' of \'Option 1\' highlight region of active state should be according to \'Option 1\' tab in the in the \'Preview tab\'', () => {
799
- cy.log('Switching to preview Tab');
800
- highlightImagePage.steps.switchToPreviewTab();
801
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(1, 'rgb(229, 76, 25)', '0.8');
802
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(1, 'rgb(9, 179, 33)', '0.8');
803
- highlightImagePage.steps.verifyActiveFillColorOfHighlightRegionInPreviewTab(0, 'rgb(255, 240, 25)', '0.9');
804
- highlightImagePage.steps.verifyActiveBorderColorOfHighlightRegionInPreviewTab(0, 'rgb(0, 0, 0)', '0.9');
805
- });
806
- });
807
-
808
467
  describe('Customize highlight properties accordion: Apply pattern on active state', () => {
809
468
  abortEarlySetup();
810
469
  before(() => {