testcafeを使ってwebサイトの自動テストをしています。
環境
- testcafe 1.0.0
- circleci 2.0.0
以下は、全角スペースのみを入力した際に表示されるエラーメッセージの文言を確認するテストです。
test('Appear the error message that push notification campaign name form is not accept double-byte space', async t => { await t .useRole(Admin) .navigateTo('https://staging-app.yyyy.com/apps/xxxxx/push_notifications/new') .typeText('#push_notification_name', ' ') .click('input.button.button-primary') .expect(Selector('.message').textContent).match(/\Campaign Name can't be blank./); });
localでtestcafeをtestcafe chrome *filepath*
で実行すると何度実行してもpassします。しかし、githubからcircleciを通すと落ちることがしばしばあります。
落ちた際のエラーメッセージは
1) AssertionError: expected 'Approx. displayable characters: 80-160 characters' to match /\Campaign Name can't be blank./ Browser: Chrome 60.0.3112 / Linux 0.0.0 56 | await t 57 | .useRole(Admin) 58 | .navigateTo('https://staging-app.sssss.com/apps/xxxxxxx/push_notifications/new') 59 | .typeText('#push_notification_name', ' ') 60 | .click('input.button.button-primary') > 61 | .expect(Selector('.message').textContent).match(/\Campaign Name can't be blank./); 62 |}); 63 | 64 |test('Push notification campaign name form is accept char length of 0 < name < 256 ', async t => { 65 | const uuid = uuidv4(); 66 | await t at match (/home/circleci/repo/tests/fixtures/marketing/push_notification/push_ui_spec/push_ui_spec.js:61:49) at test (/home/circleci/repo/tests/fixtures/marketing/push_notification/push_ui_spec/push_ui_spec.js:55:1) at markeredfn (/home/circleci/repo/node_modules/testcafe/src/api/wrap-test-function.js:17:28) at <anonymous> (/home/circleci/repo/node_modules/testcafe/src/api/wrap-test-function.js:7:5) at fn (/home/circleci/repo/node_modules/testcafe/src/test-run/index.js:240:19) at TestRun._executeTestFn (/home/circleci/repo/node_modules/testcafe/src/test-run/index.js:236:38) at _executeTestFn (/home/circleci/repo/node_modules/testcafe/src/test-run/index.js:289:24)
原因がわからず、どなたかご教示いただけないでしょうか。よろしくお願いします。
あなたの回答
tips
プレビュー