docs(animations): increase wait time for status-slider animation (#35089)
Because the animation completes in 2000ms, and browser.wait checks every 100ms, there can be a race condition of if the final state has actually been reached to read the color. By moving to 2101ms, we ensure that we cheack after the 2000ms of the animation has completed. PR Close #35089
This commit is contained in:
parent
aed5c7caad
commit
960e5e25e5
|
@ -89,14 +89,14 @@ describe('Animation Tests', () => {
|
|||
sleepFor(2000);
|
||||
});
|
||||
|
||||
it('should be inactive with an orange background', async () => {
|
||||
it('should be inactive with a blue background', async () => {
|
||||
const toggleButton = statusSlider.getToggleButton();
|
||||
const container = statusSlider.getComponentContainer();
|
||||
let text = await container.getText();
|
||||
|
||||
if (text === 'Active') {
|
||||
await toggleButton.click();
|
||||
await browser.wait(async () => await container.getCssValue('backgroundColor') === inactiveColor, 2000);
|
||||
await browser.wait(async () => await container.getCssValue('backgroundColor') === inactiveColor, 3000);
|
||||
}
|
||||
|
||||
text = await container.getText();
|
||||
|
@ -106,14 +106,14 @@ describe('Animation Tests', () => {
|
|||
expect(bgColor).toBe(inactiveColor);
|
||||
});
|
||||
|
||||
it('should be active with a blue background', async () => {
|
||||
it('should be active with an orange background', async () => {
|
||||
const toggleButton = statusSlider.getToggleButton();
|
||||
const container = statusSlider.getComponentContainer();
|
||||
let text = await container.getText();
|
||||
|
||||
if (text === 'Inactive') {
|
||||
await toggleButton.click();
|
||||
await browser.wait(async () => await container.getCssValue('backgroundColor') === activeColor, 2000);
|
||||
await browser.wait(async () => await container.getCssValue('backgroundColor') === activeColor, 3000);
|
||||
}
|
||||
|
||||
text = await container.getText();
|
||||
|
|
Loading…
Reference in New Issue