itemengine-cypress-automation 1.0.448-IEI-6684-thinksphere-cypress-fixes-6175be0.0 → 1.0.449-IEI-6684-thinksphere-cypress-fixes-1c92d2f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,13 +52,19 @@ describe('Create question page - Essay Response: Edit category', () => {
|
|
52
52
|
thinkSpherePage.steps.verifyCategoryCharactersAndUnSelectedState(unselectedSymbolsArray);
|
53
53
|
thinkSpherePage.steps.cancelCustomCategory();
|
54
54
|
});
|
55
|
-
} else if (key !== 'keyPad') {
|
55
|
+
} else if (equationEditorCategoriesAndSymbols[key] && key !== 'keyPad') {
|
56
56
|
it(`All the ${equationEditorCategoriesAndSymbols[key]?.displayName} characters should be displayed and should be in selected state also each one should have necessary tooltips`, () => {
|
57
57
|
const symbolsArray = Object.values(equationEditorCategoriesAndSymbols[key]?.symbols);
|
58
|
-
|
58
|
+
if (key !== 'otherSymbols') {
|
59
|
+
editCategoryFlyout.steps.openEditCategoryFlyout(key);
|
60
|
+
} else {
|
61
|
+
thinkSpherePage.steps.openEditCategoryFlyout(key);
|
62
|
+
}
|
59
63
|
thinkSpherePage.steps.verifyCategoryCharactersAndSelectedState(symbolsArray);
|
60
64
|
editCategoryFlyout.steps.verifyCategoryCharactersDragIcon();
|
61
|
-
|
65
|
+
if (key !== 'otherSymbols') {
|
66
|
+
thinkSpherePage.steps.cancelCustomCategory();
|
67
|
+
}
|
62
68
|
});
|
63
69
|
}
|
64
70
|
})
|
@@ -12,6 +12,7 @@ describe('Preview question : ThinkSphere Question - Solve Section - preview tab'
|
|
12
12
|
thinkSpherePage.steps.navigateToThinkSphereCreateQuestion();
|
13
13
|
thinkSpherePage.steps.switchToPreviewTab();
|
14
14
|
thinkSpherePage.steps.clickOnSolveTab();
|
15
|
+
cy.wait(5000);
|
15
16
|
});
|
16
17
|
|
17
18
|
describe('Whiteboard and its sections should be present', () => {
|
@@ -535,6 +535,7 @@ const steps = {
|
|
535
535
|
.click();
|
536
536
|
thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
|
537
537
|
.should('have.attr', 'data-aria-pressed', 'true');
|
538
|
+
cy.wait(5000);
|
538
539
|
},
|
539
540
|
/**
|
540
541
|
* Deselects an option from tools and controls.
|
@@ -1333,14 +1334,14 @@ const steps = {
|
|
1333
1334
|
|
1334
1335
|
verifyWritePlanMicSection: (isGrading=false) => {
|
1335
1336
|
thinkSpherePage.writePlanWrapper()
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1337
|
+
.within(() => {
|
1338
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.micIconWrapper(), 'visible');
|
1339
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'role', 'button');
|
1340
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'aria-label', 'Mic button');
|
1340
1341
|
if(isGrading) {
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1342
|
+
utilities.verifyElementAttribute(thinkSpherePage.micIconWrapper(), 'tabindex', -1);
|
1343
|
+
}
|
1344
|
+
});
|
1344
1345
|
},
|
1345
1346
|
|
1346
1347
|
verifyWritePlanTextAreaFunctionality: (planTextToEnter) => {
|
@@ -1410,7 +1411,7 @@ const steps = {
|
|
1410
1411
|
},
|
1411
1412
|
|
1412
1413
|
clickOnYourPlanButton : () => {
|
1413
|
-
|
1414
|
+
thinkSpherePage.yourPlanButton()
|
1414
1415
|
.click();
|
1415
1416
|
},
|
1416
1417
|
|
@@ -1453,10 +1454,10 @@ const steps = {
|
|
1453
1454
|
|
1454
1455
|
verifyAddStrategiesButtonDisabled: () => {
|
1455
1456
|
thinkSpherePage.addNewStrategyButton().should('have.attr', 'tabindex', '-1');
|
1456
|
-
|
1457
|
-
|
1457
|
+
thinkSpherePage.addNewStrategyButton().click({ force: true });
|
1458
|
+
utilities.verifyElementVisibilityState(thinkSpherePage.popupTitle(), 'notExist');
|
1458
1459
|
},
|
1459
|
-
|
1460
|
+
|
1460
1461
|
verifyStrategiesListButtonDisabled: () => {
|
1461
1462
|
utilities.getNthElement(thinkSpherePage.strategiesPreviewListLI(), 0).should('have.attr', 'tabindex', '-1');
|
1462
1463
|
utilities.getNthElement(thinkSpherePage.strategiesPreviewListLI(), 0).should('have.attr', 'aria-disabled', 'true');
|
@@ -1475,7 +1476,7 @@ const steps = {
|
|
1475
1476
|
},
|
1476
1477
|
|
1477
1478
|
verifyDisabledWriteYourPlanTextContainer: (textToEnter) => {
|
1478
|
-
|
1479
|
+
thinkSpherePage.writePlanWrapper()
|
1479
1480
|
.within(() => {
|
1480
1481
|
thinkSpherePage.contentEditableDiv().should('have.attr', 'readonly');
|
1481
1482
|
thinkSpherePage.contentEditableDiv().should('have.value', textToEnter);
|
@@ -1649,7 +1650,7 @@ const steps = {
|
|
1649
1650
|
|
1650
1651
|
verifyWhiteBoardPlayerPauseButtonVisible: () => {
|
1651
1652
|
thinkSpherePage.whiteboardPlaybackPauseButton()
|
1652
|
-
|
1653
|
+
.should('be.visible')
|
1653
1654
|
cy.wait(1000);
|
1654
1655
|
},
|
1655
1656
|
|
@@ -1699,6 +1700,16 @@ const steps = {
|
|
1699
1700
|
verifyDisabledAddSentenceStarterButtonTooltip: () => {
|
1700
1701
|
thinkSpherePage.planSentenceStarterAddItemButton().parent()
|
1701
1702
|
.verifyTooltip('Maximum 15 items can be added');
|
1703
|
+
},
|
1704
|
+
|
1705
|
+
openEditCategoryFlyout: (categoryName = 'general') => {
|
1706
|
+
cy.get(`#${categoryName}`)
|
1707
|
+
.find('button[class*="icon-button-custom-format"]')
|
1708
|
+
.parents('[id*="DraggableItem"]')
|
1709
|
+
.within(() => {
|
1710
|
+
essayResponsePage.equationEditorSectionCategoriesEditIcon()
|
1711
|
+
.click();
|
1712
|
+
});
|
1702
1713
|
}
|
1703
1714
|
};
|
1704
1715
|
|
@@ -2250,6 +2261,7 @@ const tests = {
|
|
2250
2261
|
thinkSpherePage.deleteVideoButton()
|
2251
2262
|
.click();
|
2252
2263
|
});
|
2264
|
+
cy.wait(1000);
|
2253
2265
|
thinkSpherePage.videoLinkComponent()
|
2254
2266
|
.within(() => {
|
2255
2267
|
thinkSpherePage.uploadVideoLinkButton()
|
@@ -2559,19 +2571,19 @@ const tests = {
|
|
2559
2571
|
});
|
2560
2572
|
},
|
2561
2573
|
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2574
|
+
/**
|
2575
|
+
* Verifies default visibility, selection, and behavior of whiteboard tools and their subtools.
|
2576
|
+
*
|
2577
|
+
* @param {Array<Object>} whiteBoardTools - An array of tool objects, where each object contains:
|
2578
|
+
* @param {string} whiteBoardTools[].name - Display name of the tool.
|
2579
|
+
* @param {string} whiteBoardTools[].dataTestId - The `data-testid` used to locate the tool in the DOM.
|
2580
|
+
* @param {boolean} [whiteBoardTools[].isDefault] - Whether the tool is visible by default.
|
2581
|
+
* @param {string[]} [whiteBoardTools[].subToolS] - An array of subtool identifiers (data-testid, data-name, or class).
|
2582
|
+
* @param {string} [whiteBoardTools[].popupSelector] - A selector used to locate popup elements that appear after tool interaction.
|
2583
|
+
* @param {string[]} [whiteBoardTools[].popupContent] - Optional array of class names used to verify the popup’s inner content.
|
2584
|
+
*
|
2585
|
+
* @param {string[]} editSectionWhiteBoardToolButtons - A list of tool names that will be enabled during edit phase.
|
2586
|
+
*/
|
2575
2587
|
|
2576
2588
|
verifyAllDefaultToolIds: (whiteBoardTools, editSectionWhiteBoardToolButtons) => {
|
2577
2589
|
const allToolIds = whiteBoardTools.map(tool => tool.dataTestId);
|
@@ -2593,57 +2605,57 @@ const tests = {
|
|
2593
2605
|
verifyWhiteBoardSubTools: (whiteBoardTools) => {
|
2594
2606
|
whiteBoardTools.forEach((tool) => {
|
2595
2607
|
it(`When user clicks on "${tool.name}" tool it should display its sub tools`, () => {
|
2596
|
-
|
2608
|
+
// Click the main tool by data-testid
|
2597
2609
|
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2610
|
+
cy.get(`[data-testid="${tool.dataTestId}"]`)
|
2611
|
+
.and('be.visible')
|
2612
|
+
.first()
|
2613
|
+
.click({ force: true }) // force in case some are behind overlays
|
2602
2614
|
cy.wait(1000); // Wait for any animations or transitions to complete
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2615
|
+
|
2616
|
+
// If the tool has subtools, verify each
|
2617
|
+
if (tool.subToolS && tool.subToolS.length > 0) {
|
2618
|
+
tool.subToolS.forEach((subTool) => {
|
2619
|
+
// Try data-testid first, fall back to data-name if needed
|
2620
|
+
cy.get(`[data-testid="${subTool}"], [data-name="${subTool}"], [class*="${subTool}"]`)
|
2621
|
+
.should('exist')
|
2622
|
+
.and('be.visible');
|
2623
|
+
});
|
2624
|
+
}
|
2613
2625
|
|
2614
2626
|
if(tool.popupSelector) {
|
2615
|
-
|
2627
|
+
// Verify the popup selector if it exists
|
2616
2628
|
if(tool.popupSelector === 'eraser-width-picker') {
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2621
|
-
|
2622
|
-
|
2623
|
-
|
2624
|
-
|
2625
|
-
|
2629
|
+
cy.get(`[data-name="ERASER_THICKNESS"]`)
|
2630
|
+
.should('exist')
|
2631
|
+
.and('be.visible')
|
2632
|
+
.first()
|
2633
|
+
.click({ force: true });
|
2634
|
+
cy.get(`[class*="${tool.popupSelector}"]`).should('exist').and('be.visible');
|
2635
|
+
} else {
|
2636
|
+
cy.get(`[data-testid="${tool.popupSelector}"]`).should('exist').and('be.visible');
|
2637
|
+
}
|
2626
2638
|
if(tool.popupContent) {
|
2627
|
-
|
2628
|
-
|
2629
|
-
|
2630
|
-
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2639
|
+
// Verify the content inside the popup
|
2640
|
+
tool.popupContent.forEach((content) => {
|
2641
|
+
cy.get(`[class="${content}"]`).scrollIntoView().should('exist').and('be.visible');
|
2642
|
+
});
|
2643
|
+
thinkSpherePage.steps.clickOnReviewTab();
|
2644
|
+
cy.wait(1000);
|
2645
|
+
thinkSpherePage.steps.clickOnSolveTab();
|
2646
|
+
cy.wait(1000);
|
2647
|
+
}
|
2635
2648
|
}
|
2636
|
-
}
|
2637
2649
|
|
2638
2650
|
if(tool.name === 'simple calculator' || tool.name ==='scientific calculator') {
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2642
|
-
|
2651
|
+
cy.get(`[data-testid="${tool.dataTestId}"]`)
|
2652
|
+
.and('be.visible')
|
2653
|
+
.first()
|
2654
|
+
.click({ force: true }) // force in case some are behind overlays
|
2643
2655
|
cy.wait(1000);
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2656
|
+
}
|
2657
|
+
thinkSpherePage.steps.clickOnReviewTab();
|
2658
|
+
thinkSpherePage.steps.clickOnSolveTab();
|
2647
2659
|
});
|
2648
2660
|
});
|
2649
2661
|
},
|
@@ -2761,13 +2773,13 @@ const tests = {
|
|
2761
2773
|
.eq(0)
|
2762
2774
|
.check()
|
2763
2775
|
.should('be.checked');
|
2764
|
-
|
2776
|
+
|
2765
2777
|
thinkSpherePage.yourPlanStrategiesList()
|
2766
2778
|
.find('input[type="checkbox"]')
|
2767
2779
|
.eq(2)
|
2768
2780
|
.check()
|
2769
2781
|
.should('be.checked');
|
2770
|
-
|
2782
|
+
|
2771
2783
|
// Uncheck first strategy option
|
2772
2784
|
thinkSpherePage.yourPlanStrategiesList()
|
2773
2785
|
.find('input[type="checkbox"]')
|
@@ -2794,20 +2806,20 @@ const tests = {
|
|
2794
2806
|
'justify-content': 'space-between',
|
2795
2807
|
'align-items': 'center',
|
2796
2808
|
});
|
2797
|
-
|
2809
|
+
|
2798
2810
|
utilities.verifyCSS(thinkSpherePage.yourPlanHeadingLabel(), {
|
2799
2811
|
'font-size': css.fontSize.huge,
|
2800
2812
|
'font-weight': css.fontWeight.bold,
|
2801
2813
|
'color': css.color.panelLabel,
|
2802
2814
|
});
|
2803
|
-
|
2815
|
+
|
2804
2816
|
utilities.verifyCSS(thinkSpherePage.yourPlanStrategiesList(), {
|
2805
2817
|
'padding': '0px',
|
2806
2818
|
'margin': '0px 0px 24px'
|
2807
2819
|
});
|
2808
2820
|
thinkSpherePage.yourPlanCloseButton().click();
|
2809
2821
|
});
|
2810
|
-
|
2822
|
+
|
2811
2823
|
it('Accessibility of Your Plan section', { tags: 'a11y' }, () => {
|
2812
2824
|
thinkSpherePage.steps.clickOnYourPlanButton();
|
2813
2825
|
cy.checkAccessibility(thinkSpherePage.yourPlanContainer());
|
@@ -2868,7 +2880,7 @@ const tests = {
|
|
2868
2880
|
thinkSpherePage.steps.clickOnRecordingOrPauseButton();
|
2869
2881
|
thinkSpherePage.steps.verifyRecordingStatus('Paused');
|
2870
2882
|
});
|
2871
|
-
|
2883
|
+
|
2872
2884
|
it('When the user click on Plan, or Review tab while recording, it should show a warning popup to the user', () => {
|
2873
2885
|
thinkSpherePage.steps.clickOnRecordingOrPauseButton();
|
2874
2886
|
thinkSpherePage.steps.clickOnReviewTab();
|
@@ -2900,11 +2912,11 @@ const tests = {
|
|
2900
2912
|
// 'background-color': css.color.primaryBtnBg
|
2901
2913
|
});
|
2902
2914
|
});
|
2903
|
-
|
2915
|
+
|
2904
2916
|
it('Accessibility of whiteboard warning popup', { tags: 'a11y' }, () => {
|
2905
2917
|
cy.checkAccessibility(thinkSpherePage.whiteboardRecordingInProgressWarning());
|
2906
2918
|
});
|
2907
|
-
|
2919
|
+
|
2908
2920
|
it('The user should be able to switch to Review tab without warning after stopping the recording and the Review tab should contain the Playback option', () => {
|
2909
2921
|
thinkSpherePage.steps.clickOnWhiteBoardRecordingInProgressWarningOkButton();
|
2910
2922
|
cy.get(`[data-testid="${whiteBoardTools[0].dataTestId}"]`)
|
@@ -2932,16 +2944,16 @@ const tests = {
|
|
2932
2944
|
thinkSpherePage.steps.clickOnWhiteBoardPlaybackPlayButton();
|
2933
2945
|
cy.wait(1000);
|
2934
2946
|
thinkSpherePage.whiteboardPlaybackTime()
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2942
|
-
|
2943
|
-
|
2944
|
-
|
2947
|
+
.invoke('text')
|
2948
|
+
.then((text) => {
|
2949
|
+
const currentTime = text.split('/')[0].trim(); // extract current time before "/"
|
2950
|
+
|
2951
|
+
// Assert it matches mm:ss format
|
2952
|
+
expect(currentTime).to.match(/^\d{2}:\d{2}$/);
|
2953
|
+
|
2954
|
+
// Assert it's not 00:00
|
2955
|
+
expect(currentTime).not.to.equal('00:00');
|
2956
|
+
});
|
2945
2957
|
});
|
2946
2958
|
|
2947
2959
|
it('When the user clicks on the Pause button, it should pause the recording', () => {
|
package/package.json
CHANGED