Size: a a a

2020 January 11

OK

Oleksandr Khotemskyi in JS for testing
Там в примере есть как юзать
источник

A

Andrii in JS for testing
AssertionError: expected 'pending...' to equal 'done'
     + expected - actual
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
AssertionError: expected 'pending...' to equal 'done'
     + expected - actual
Это уже не из wait летит
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
AssertionError: expected 'pending...' to equal 'done'
     + expected - actual
Wait кидает TimeoutError
источник

A

Andrii in JS for testing
але хіба цей кусок коду browser.wait(EC.not(EC.textToBePresentInElement(element, 'pending...')), 8000); не має чекати поки текст зміниться? browser.wait в мене не чекає 8 сек
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
але хіба цей кусок коду browser.wait(EC.not(EC.textToBePresentInElement(element, 'pending...')), 8000); не має чекати поки текст зміниться? browser.wait в мене не чекає 8 сек
Должен, но покажи еще выше как вызываешь свой хелпер
источник

A

Andrii in JS for testing
it.only('Should wait text with message not pending', async () => {
       await customWaitPage.clickOnTimeoutButton();
       await customWaitPage.waitForPendingTextIsDisappeared(customWaitPage.timeoutTextArea);
       await expect(customWaitPage.timeoutTextArea.getText()).to.eventually.equal('done');
   });
источник

A

Andrii in JS for testing
Все розібрався
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
it.only('Should wait text with message not pending', async () => {
       await customWaitPage.clickOnTimeoutButton();
       await customWaitPage.waitForPendingTextIsDisappeared(customWaitPage.timeoutTextArea);
       await expect(customWaitPage.timeoutTextArea.getText()).to.eventually.equal('done');
   });
Так все правильно, ты ждешь pending, а потом ассертишь done
источник

OK

Oleksandr Khotemskyi in JS for testing
Код не наврал
источник

A

Andrii in JS for testing
не поставив return перед  browser.wait(EC.not(EC.textToBePresentInElement(element, 'pending...')), 8000);
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
it.only('Should wait text with message not pending', async () => {
       await customWaitPage.clickOnTimeoutButton();
       await customWaitPage.waitForPendingTextIsDisappeared(customWaitPage.timeoutTextArea);
       await expect(customWaitPage.timeoutTextArea.getText()).to.eventually.equal('done');
   });
eventualy.equal кстати лучше не юзай раз на авейтах
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
не поставив return перед  browser.wait(EC.not(EC.textToBePresentInElement(element, 'pending...')), 8000);
Там ненужен ретурн
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
it.only('Should wait text with message not pending', async () => {
       await customWaitPage.clickOnTimeoutButton();
       await customWaitPage.waitForPendingTextIsDisappeared(customWaitPage.timeoutTextArea);
       await expect(customWaitPage.timeoutTextArea.getText()).to.eventually.equal('done');
   });
it.only('Should wait text with message not pending', async () => {
       await customWaitPage.clickOnTimeoutButton();
       await customWaitPage.waitForPendingTextIsDisappeared(customWaitPage.timeoutTextArea);
        expect(await customWaitPage.timeoutTextArea.getText()).to.equal('done', 'error message');
   });
источник

A

Andrii in JS for testing
ок зараз попробую
источник

A

Andrii in JS for testing
а чому eventualy краще не юзати ?
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
а чому eventualy краще не юзати ?
Он ненужен, это был костыль когда await небыло
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
а чому eventualy краще не юзати ?
Можешь вообще снести его из зависимостей
источник

OK

Oleksandr Khotemskyi in JS for testing
Andrii
а чому eventualy краще не юзати ?
Ты кстати SELENIUM_PROMISE_MANAGER: false поставил?
источник

A

Andrii in JS for testing
да
источник