casper: Use wait_for_text in custom profile test.

This should avoid some test flakes.
This commit is contained in:
Steve Howell 2020-04-10 11:24:37 +00:00 committed by showell
parent c2cf55ce1b
commit 629f87b071
1 changed files with 5 additions and 5 deletions

View File

@ -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');
});
});
});