diff --git a/frontend_tests/casper_tests/12-custom-profile.js b/frontend_tests/casper_tests/12-custom-profile.js index 870c64e280..e135bcedfe 100644 --- a/frontend_tests/casper_tests/12-custom-profile.js +++ b/frontend_tests/casper_tests/12-custom-profile.js @@ -20,11 +20,11 @@ casper.then(function () { casper.then(function () { casper.waitUntilVisible('#admin-add-profile-field-status img', function () { casper.test.assertSelectorHasText('div#admin-add-profile-field-status', 'Saved'); - }); - casper.waitUntilVisible('.profile-field-row span.profile_field_name', function () { - casper.test.assertSelectorHasText('.profile-field-row span.profile_field_name', 'Teams'); - casper.test.assertSelectorHasText('.profile-field-row span.profile_field_type', 'Short text'); - casper.click('.profile-field-row button.open-edit-form'); + common.wait_for_text('.profile-field-row span.profile_field_name', 'Teams', function () { + casper.test.assertSelectorHasText('.profile-field-row span.profile_field_name', 'Teams'); + casper.test.assertSelectorHasText('.profile-field-row span.profile_field_type', 'Short text'); + casper.click('.profile-field-row button.open-edit-form'); + }); }); });