`
);
assert.equal(
- this.element.querySelectorAll(`[data-test-table-header] > div`).length,
+ this.element.querySelectorAll(
+ `[data-test-table-header] > [data-test-table-header-item]`
+ ).length,
3,
'3 table header exist'
);
diff --git a/tests/integration/components/partner/client-project-list/item-test.js b/tests/integration/components/partner/client-project-list/item-test.js
index 34ba811d04..57846a468d 100644
--- a/tests/integration/components/partner/client-project-list/item-test.js
+++ b/tests/integration/components/partner/client-project-list/item-test.js
@@ -70,10 +70,11 @@ module(
@clientId={{this.clientId}}
@project={{this.project}}/>`
);
- assert.dom(`[data-test-view-files]`).exists();
- assert.dom(`[data-test-view-files]`).hasClass('button');
- assert.dom(`[data-test-view-files]`).hasText(`t:viewUploads:()`);
- assert.dom(`[data-test-view-files]`).hasTagName('a');
+ assert
+ .dom(`[data-test-view-files]`)
+ .exists()
+ .hasText(`t:viewUploads:()`)
+ .hasTagName('a');
});
test('it should not show view files btn', async function (assert) {
diff --git a/tests/integration/components/partner/client-report-download-test.js b/tests/integration/components/partner/client-report-download-test.js
index 9890e53e95..e71b35cdd7 100644
--- a/tests/integration/components/partner/client-report-download-test.js
+++ b/tests/integration/components/partner/client-report-download-test.js
@@ -235,7 +235,7 @@ module(
.hasClass(styles['button-progress']);
assert
.dom('[data-test-download-button-generating-progress]')
- .hasClass('is-progress')
+ .hasClass(styles['is-progress'])
.hasClass(styles['progress-loader'])
.hasAttribute('style', `width: ${report.progress}%`);
assert
diff --git a/tests/integration/components/partner/client-uploads-list/component-test.js b/tests/integration/components/partner/client-uploads-list/component-test.js
index 356e48f9dc..1ff671c948 100644
--- a/tests/integration/components/partner/client-uploads-list/component-test.js
+++ b/tests/integration/components/partner/client-uploads-list/component-test.js
@@ -133,7 +133,9 @@ module(
hbs`
`
);
assert.strictEqual(
- this.element.querySelectorAll('[data-test-table-header] > div').length,
+ this.element.querySelectorAll(
+ '[data-test-table-header] > [data-test-table-header-item]'
+ ).length,
3,
'Should have 3 headers by default'
);
@@ -322,7 +324,9 @@ module(
hbs`
`
);
assert.strictEqual(
- this.element.querySelectorAll('[data-test-table-header] > div').length,
+ this.element.querySelectorAll(
+ '[data-test-table-header] > [data-test-table-header-item]'
+ ).length,
5,
'Should have 5 headers by default'
);
@@ -395,7 +399,9 @@ module(
hbs`
`
);
assert.strictEqual(
- this.element.querySelectorAll('[data-test-table-header] > div').length,
+ this.element.querySelectorAll(
+ '[data-test-table-header] > [data-test-table-header-item]'
+ ).length,
3,
'Should have 3 headers by default'
);
diff --git a/tests/integration/components/partner/credit-transfer/index-test.js b/tests/integration/components/partner/credit-transfer/index-test.js
index 015fc027f9..ed1bb8a838 100644
--- a/tests/integration/components/partner/credit-transfer/index-test.js
+++ b/tests/integration/components/partner/credit-transfer/index-test.js
@@ -5,7 +5,6 @@ import { setupIntl } from 'ember-intl/test-support';
import { click, find, render, triggerEvent } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { underscore } from '@ember/string';
-import styles from 'irene/components/partner/credit-transfer/index.scss';
function serializer(payload) {
const serializedPayload = {};
@@ -174,8 +173,7 @@ module('Integration | Component | partner/credit-transfer', function (hooks) {
await render(hbs`
`);
- assert.dom('[data-test-plus-btn]').exists();
- assert.dom('[data-test-plus-btn]').hasClass(styles['disabled-btn']);
+ assert.dom('[data-test-plus-btn]').exists().isDisabled();
const creditTransferTooltip = find(
'[data-test-credit-transfer] [data-test-ak-tooltip-root]'
@@ -218,8 +216,7 @@ module('Integration | Component | partner/credit-transfer', function (hooks) {
this.set('client', this.server.create('partner/partnerclient'));
await render(hbs`
`);
- assert.dom('[data-test-plus-btn]').exists();
- assert.dom('[data-test-plus-btn]').hasClass(styles['disabled-btn']);
+ assert.dom('[data-test-plus-btn]').exists().isDisabled();
const creditTransferTooltip = find(
'[data-test-credit-transfer] [data-test-ak-tooltip-root]'
@@ -262,8 +259,8 @@ module('Integration | Component | partner/credit-transfer', function (hooks) {
this.set('client', this.server.create('partner/partnerclient'));
await render(hbs`
`);
- assert.dom('[data-test-plus-btn]').exists();
- assert.dom('[data-test-plus-btn]').doesNotHaveClass(styles['disabled-btn']);
+ assert.dom('[data-test-plus-btn]').exists().isNotDisabled();
+
assert
.dom(`#client-${this.client.id}-tooltip`)
.doesNotExist('Tooltip not required for clickable state');
diff --git a/tests/integration/components/partner/invite-client-test.js b/tests/integration/components/partner/invite-client-test.js
index acb0b7682c..f4ee118c42 100644
--- a/tests/integration/components/partner/invite-client-test.js
+++ b/tests/integration/components/partner/invite-client-test.js
@@ -1,11 +1,10 @@
-/* eslint-disable prettier/prettier, qunit/no-identical-names */
-import { module, test } from "qunit";
-import { setupRenderingTest } from "ember-qunit";
-import { render, click, fillIn } from "@ember/test-helpers";
-import { setupIntl } from "ember-intl/test-support";
-import { setupMirage } from "ember-cli-mirage/test-support";
-import { hbs } from "ember-cli-htmlbars";
-import Service from "@ember/service";
+import { module, test } from 'qunit';
+import { setupRenderingTest } from 'ember-qunit';
+import { render, click, fillIn } from '@ember/test-helpers';
+import { setupIntl } from 'ember-intl/test-support';
+import { setupMirage } from 'ember-cli-mirage/test-support';
+import { hbs } from 'ember-cli-htmlbars';
+import Service from '@ember/service';
class OrganizationStub extends Service {
selected = {
@@ -17,32 +16,32 @@ class RealtimeStub extends Service {
RegistrationRequestCounter = 0;
}
-module("Integration | Component | partner/invite-client", function (hooks) {
+module('Integration | Component | partner/invite-client', function (hooks) {
setupRenderingTest(hooks);
setupMirage(hooks);
- setupIntl(hooks, "en");
+ setupIntl(hooks, 'en');
hooks.beforeEach(function () {
- this.owner.register("service:organization", OrganizationStub);
- this.owner.register("service:realtime", RealtimeStub);
+ this.owner.register('service:organization', OrganizationStub);
+ this.owner.register('service:realtime', RealtimeStub);
});
- test("it should render invite button", async function (assert) {
+ test('it should render invite button', async function (assert) {
await render(hbs`
`);
- assert.dom("[data-test-invite-client-button]").exists();
+ assert.dom('[data-test-invite-client-button]').exists();
assert
- .dom("[data-test-invite-client-button]")
- .hasTextContaining("Invite Clients");
+ .dom('[data-test-invite-client-button]')
+ .hasTextContaining('Invite Clients');
});
- test("it should open modal with invite form on invite button click", async function (assert) {
- assert.dom("[data-test-invite-client-form]").doesNotExist();
+ test('it should open modal with invite form on invite button click', async function (assert) {
+ assert.dom('[data-test-invite-client-form]').doesNotExist();
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- assert.dom("[data-test-invite-client-form]").exists();
+ assert.dom('[data-test-invite-client-form]').exists();
});
test('it should close modal only on close button click', async function (assert) {
@@ -58,172 +57,162 @@ module("Integration | Component | partner/invite-client", function (hooks) {
await click(overlayElement);
assert.dom('[data-test-invite-client-form]').exists();
- const closeButton = this.element.querySelector('[data-test-modal-close-btn]');
+ const closeButton = this.element.querySelector(
+ '[data-test-modal-close-btn]'
+ );
await click(closeButton);
assert.dom('[data-test-invite-client-form]').doesNotExist();
});
- test("it should render email, first name, last name & company input fields", async function (assert) {
+ test('it should render email, first name, last name & company input fields', async function (assert) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
- );
- await click(inviteBtn);
- assert.dom("[data-test-input-email]").exists();
- assert.dom("[data-test-input-firstname]").exists();
- assert.dom("[data-test-input-lastname]").exists();
- assert.dom("[data-test-input-company]").exists();
- });
-
- test("it does not render error messages on initial load", async function (assert) {
- await render(hbs`
`);
- const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
-
- assert.dom("[data-test-input-error-email]").doesNotExist();
- assert.dom("[data-test-input-error-name]").doesNotExist();
- assert.dom("[data-test-input-error-company]").doesNotExist();
+ assert.dom('[data-test-input-email]').exists();
+ assert.dom('[data-test-input-firstname]').exists();
+ assert.dom('[data-test-input-lastname]').exists();
+ assert.dom('[data-test-input-company]').exists();
});
- test("it does not render error messages on initial load", async function (assert) {
+ test('it does not render error messages on initial load', async function (assert) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- assert.dom("[data-test-input-error-email]").doesNotExist();
- assert.dom("[data-test-input-error-name]").doesNotExist();
- assert.dom("[data-test-input-error-company]").doesNotExist();
+ assert.dom('[data-test-input-error-email]').doesNotExist();
+ assert.dom('[data-test-helper-text]').doesNotExist();
+ assert.dom('[data-test-input-error-company]').doesNotExist();
});
- test("it should validate email on input", async function (assert) {
+ test('it should validate email on input', async function (assert) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- const emailInput = this.element.querySelector("[data-test-input-email]");
+ const emailInput = this.element.querySelector('[data-test-input-email]');
// accept valid email
- await fillIn(emailInput, "test@example.com");
- assert.dom("[data-test-input-error-email]").doesNotExist();
+ await fillIn(emailInput, 'test@example.com');
+ assert.dom('[data-test-helper-text]').doesNotExist();
- await fillIn(emailInput, "t@t.1");
- assert.dom("[data-test-input-error-email]").doesNotExist();
+ await fillIn(emailInput, 't@t.1');
+ assert.dom('[data-test-helper-text]').doesNotExist();
// reject invalid email formats
- await fillIn(emailInput, "test.com@");
- assert.dom("[data-test-input-error-email]").exists();
+ await fillIn(emailInput, 'test.com@');
+ assert.dom('[data-test-helper-text]').exists();
- await fillIn(emailInput, "🙂@🙂.🙂");
- assert.dom("[data-test-input-error-email]").exists();
+ await fillIn(emailInput, '🙂@🙂.🙂');
+ assert.dom('[data-test-helper-text]').exists();
await fillIn(emailInput, "'@t.'");
- assert.dom("[data-test-input-error-email]").exists();
+ assert.dom('[data-test-helper-text]').exists();
// reject empty email
- await fillIn(emailInput, "");
- assert.dom("[data-test-input-error-email]").exists();
+ await fillIn(emailInput, '');
+ assert.dom('[data-test-helper-text]').exists();
});
- test("it should validate first name on input", async function (assert) {
+ test('it should validate first name on input', async function (assert) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
const firstNameInput = this.element.querySelector(
- "[data-test-input-firstname]"
+ '[data-test-input-firstname]'
);
// accept less than 150 characters
- await fillIn(firstNameInput, "f".repeat(150));
- assert.dom("[data-test-input-error-name]").doesNotExist();
+ await fillIn(firstNameInput, 'f'.repeat(150));
+ assert.dom('[data-test-helper-text]').doesNotExist();
// reject more than 150 characters
- await fillIn(firstNameInput, "f".repeat(151));
- assert.dom("[data-test-input-error-name]").exists();
+ await fillIn(firstNameInput, 'f'.repeat(151));
+ assert.dom('[data-test-helper-text]').exists();
// accept empty input
- await fillIn(firstNameInput, "");
- assert.dom("[data-test-input-error-name]").doesNotExist();
+ await fillIn(firstNameInput, '');
+ assert.dom('[data-test-helper-text]').doesNotExist();
// accept whitespace string
- await fillIn(firstNameInput, " ");
- assert.dom("[data-test-input-error-name]").doesNotExist();
+ await fillIn(firstNameInput, ' ');
+ assert.dom('[data-test-helper-text]').doesNotExist();
});
- test("it should validate last name on input", async function (assert) {
+ test('it should validate last name on input', async function (assert) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
const lastNameInput = this.element.querySelector(
- "[data-test-input-lastname]"
+ '[data-test-input-lastname]'
);
// accept less than 150 characters
- await fillIn(lastNameInput, "l".repeat(150));
- assert.dom("[data-test-input-error-name]").doesNotExist();
+ await fillIn(lastNameInput, 'l'.repeat(150));
+ assert.dom('[data-test-helper-text]').doesNotExist();
// reject more than 150 characters
- await fillIn(lastNameInput, "l".repeat(151));
- assert.dom("[data-test-input-error-name]").exists();
+ await fillIn(lastNameInput, 'l'.repeat(151));
+ assert.dom('[data-test-helper-text]').exists();
// accept empty input
- await fillIn(lastNameInput, "");
- assert.dom("[data-test-input-error-name]").doesNotExist();
+ await fillIn(lastNameInput, '');
+ assert.dom('[data-test-helper-text]').doesNotExist();
// accept whitespace string
- await fillIn(lastNameInput, " ");
- assert.dom("[data-test-input-error-name]").doesNotExist();
+ await fillIn(lastNameInput, ' ');
+ assert.dom('[data-test-helper-text]').doesNotExist();
});
- test("it should validate company name on input", async function (assert) {
+ test('it should validate company name on input', async function (assert) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
const companyInput = this.element.querySelector(
- "[data-test-input-company]"
+ '[data-test-input-company]'
);
// accept less than 150 characters
- await fillIn(companyInput, "c".repeat(255));
- assert.dom("[data-test-input-error-company]").doesNotExist();
+ await fillIn(companyInput, 'c'.repeat(255));
+ assert.dom('[data-test-helper-text]').doesNotExist();
// reject more than 150 characters
- await fillIn(companyInput, "c".repeat(256));
- assert.dom("[data-test-input-error-company]").exists();
+ await fillIn(companyInput, 'c'.repeat(256));
+ assert.dom('[data-test-helper-text]').exists();
// reject empty input
- await fillIn(companyInput, "");
- assert.dom("[data-test-input-error-company]").exists();
+ await fillIn(companyInput, '');
+ assert.dom('[data-test-helper-text]').exists();
// accept whitespace string
- await fillIn(companyInput, " ");
- assert.dom("[data-test-input-error-company]").doesNotExist();
+ await fillIn(companyInput, ' ');
+ assert.dom('[data-test-helper-text]').doesNotExist();
});
- test("it should close modal on valid form submit", async function (assert) {
+ test('it should close modal on valid form submit', async function (assert) {
const rrInvitationSample = this.server.createList(
- "partner/registrationRequest",
+ 'partner/registrationRequest',
1,
- { approvalStatus: "approved", source: "invitation" }
+ { approvalStatus: 'approved', source: 'invitation' }
)[0];
this.server.post(
- "v2/partners/1/registration_requests",
+ 'v2/partners/1/registration_requests',
(schema, request) => {
- const rrSchema = schema["partner/registrationRequests"];
+ const rrSchema = schema['partner/registrationRequests'];
const body = JSON.parse(request.requestBody);
let obj = rrSchema.create({
email: body.email,
@@ -239,41 +228,41 @@ module("Integration | Component | partner/invite-client", function (hooks) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- const emailInput = this.element.querySelector("[data-test-input-email]");
+ const emailInput = this.element.querySelector('[data-test-input-email]');
const firstNameInput = this.element.querySelector(
- "[data-test-input-firstname]"
+ '[data-test-input-firstname]'
);
const lastNameInput = this.element.querySelector(
- "[data-test-input-lastname]"
+ '[data-test-input-lastname]'
);
const companyInput = this.element.querySelector(
- "[data-test-input-company]"
+ '[data-test-input-company]'
);
- await fillIn(emailInput, "test@test.test");
- await fillIn(firstNameInput, "TestFirstName");
- await fillIn(lastNameInput, "TestLastName");
- await fillIn(companyInput, "TestCompany");
+ await fillIn(emailInput, 'test@test.test');
+ await fillIn(firstNameInput, 'TestFirstName');
+ await fillIn(lastNameInput, 'TestLastName');
+ await fillIn(companyInput, 'TestCompany');
- await click("[data-test-input-send-btn]");
+ await click('[data-test-input-send-btn]');
- assert.dom("[data-test-invite-client-form]").doesNotExist();
+ assert.dom('[data-test-invite-client-form]').doesNotExist();
});
- test("it should not close modal on form submission with invalid inputs", async function (assert) {
+ test('it should not close modal on form submission with invalid inputs', async function (assert) {
const rrInvitationSample = this.server.createList(
- "partner/registrationRequest",
+ 'partner/registrationRequest',
1,
- { approvalStatus: "approved", source: "invitation" }
+ { approvalStatus: 'approved', source: 'invitation' }
)[0];
this.server.post(
- "v2/partners/1/registration_requests",
+ 'v2/partners/1/registration_requests',
(schema, request) => {
- const rrSchema = schema["partner/registrationRequests"];
+ const rrSchema = schema['partner/registrationRequests'];
const body = JSON.parse(request.requestBody);
let obj = rrSchema.create({
email: body.email,
@@ -289,35 +278,41 @@ module("Integration | Component | partner/invite-client", function (hooks) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- const emailInput = this.element.querySelector("[data-test-input-email]");
+ const emailInput = this.element.querySelector('[data-test-input-email]');
const companyInput = this.element.querySelector(
- "[data-test-input-company]"
+ '[data-test-input-company]'
);
- await fillIn(emailInput, "");
- await fillIn(companyInput, "");
+ await fillIn(emailInput, '');
+ await fillIn(companyInput, '');
+
+ await click('[data-test-input-send-btn]');
- await click("[data-test-input-send-btn]");
+ assert.dom('[data-test-invite-client-form]').exists();
- assert.dom("[data-test-invite-client-form]").exists();
- assert.dom("[data-test-input-error-email]").exists();
- assert.dom("[data-test-input-error-company]").exists();
+ assert
+ .dom('[data-test-input-email-container] [data-test-helper-text]')
+ .exists();
+
+ assert
+ .dom('[data-test-input-company-container] [data-test-helper-text]')
+ .exists();
});
- test("it should submit form with email & company but without first & last names", async function (assert) {
+ test('it should submit form with email & company but without first & last names', async function (assert) {
const rrInvitationSample = this.server.createList(
- "partner/registrationRequest",
+ 'partner/registrationRequest',
1,
- { approvalStatus: "approved", source: "invitation" }
+ { approvalStatus: 'approved', source: 'invitation' }
)[0];
this.server.post(
- "v2/partners/1/registration_requests",
+ 'v2/partners/1/registration_requests',
(schema, request) => {
- const rrSchema = schema["partner/registrationRequests"];
+ const rrSchema = schema['partner/registrationRequests'];
const body = JSON.parse(request.requestBody);
let obj = rrSchema.create({
email: body.email,
@@ -333,62 +328,62 @@ module("Integration | Component | partner/invite-client", function (hooks) {
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- const emailInput = this.element.querySelector("[data-test-input-email]");
+ const emailInput = this.element.querySelector('[data-test-input-email]');
const firstNameInput = this.element.querySelector(
- "[data-test-input-firstname]"
+ '[data-test-input-firstname]'
);
const lastNameInput = this.element.querySelector(
- "[data-test-input-lastname]"
+ '[data-test-input-lastname]'
);
const companyInput = this.element.querySelector(
- "[data-test-input-company]"
+ '[data-test-input-company]'
);
- await fillIn(emailInput, "test@test.test");
- await fillIn(firstNameInput, "");
- await fillIn(lastNameInput, "");
- await fillIn(companyInput, "TestCompany");
+ await fillIn(emailInput, 'test@test.test');
+ await fillIn(firstNameInput, '');
+ await fillIn(lastNameInput, '');
+ await fillIn(companyInput, 'TestCompany');
- await click("[data-test-input-send-btn]");
+ await click('[data-test-input-send-btn]');
- assert.dom("[data-test-invite-client-form]").doesNotExist();
+ assert.dom('[data-test-invite-client-form]').doesNotExist();
});
- test("it should render api response field errors in respective inputs", async function (assert) {
+ test('it should render api response field errors in respective inputs', async function (assert) {
this.server.post(
- "v2/partners/1/registration_requests",
+ 'v2/partners/1/registration_requests',
{
- email: ["A user with this email has been already invited."],
+ email: ['A user with this email has been already invited.'],
},
400
);
await render(hbs`
`);
const inviteBtn = this.element.querySelector(
- "[data-test-invite-client-button]"
+ '[data-test-invite-client-button]'
);
await click(inviteBtn);
- assert.dom("[data-test-invite-client-form]").exists();
+ assert.dom('[data-test-invite-client-form]').exists();
- const emailInput = this.element.querySelector("[data-test-input-email]");
+ const emailInput = this.element.querySelector('[data-test-input-email]');
const companyInput = this.element.querySelector(
- "[data-test-input-company]"
+ '[data-test-input-company]'
);
- await fillIn(emailInput, "test@test.test");
- await fillIn(companyInput, "Test");
- await click("[data-test-input-send-btn]");
+ await fillIn(emailInput, 'test@test.test');
+ await fillIn(companyInput, 'Test');
+ await click('[data-test-input-send-btn]');
- assert.dom("[data-test-invite-client-form]").exists();
+ assert.dom('[data-test-invite-client-form]').exists();
- assert.dom("[data-test-input-error-email]").exists();
assert
- .dom("[data-test-input-error-email]")
- .hasText("A user with this email has been already invited.");
+ .dom('[data-test-input-email-container] [data-test-helper-text]')
+ .exists()
+ .hasText('A user with this email has been already invited.');
});
});
diff --git a/tests/integration/components/partner/registration-request-pending-list-test.js b/tests/integration/components/partner/registration-request-pending-list-test.js
index 5f36e79d27..c8ddfbfefa 100644
--- a/tests/integration/components/partner/registration-request-pending-list-test.js
+++ b/tests/integration/components/partner/registration-request-pending-list-test.js
@@ -131,10 +131,11 @@ module(
'[data-test-pending-requests-table-header]'
);
- assert.equal(header.children[0].textContent, 'Requested by');
- assert.equal(header.children[1].textContent, 'Company');
- assert.equal(header.children[2].textContent, 'Requested');
- assert.equal(header.children[3].textContent, '');
+ assert.true(header.children[0].textContent.trim().includes('Requested'));
+ assert.true(header.children[0].textContent.trim().includes('by'));
+ assert.equal(header.children[1].textContent.trim(), 'Company');
+ assert.equal(header.children[2].textContent.trim(), 'Requested');
+ assert.equal(header.children[3].textContent.trim(), '');
});
test('it does not render table header for empty state', async function (assert) {
diff --git a/tests/integration/components/partner/registration-request-pending-test.js b/tests/integration/components/partner/registration-request-pending-test.js
index 4a9d557e72..b2993e89fb 100644
--- a/tests/integration/components/partner/registration-request-pending-test.js
+++ b/tests/integration/components/partner/registration-request-pending-test.js
@@ -252,18 +252,11 @@ module(
await render(
hbs`
`
);
- assert.dom('[data-test-pending-request-approve-button]').exists();
- const btn = this.element.querySelector(
- '[data-test-pending-request-approve-button]'
- );
- assert
- .dom('[data-test-pending-request-approve-button]')
- .hasClass('is-success');
assert
.dom('[data-test-pending-request-approve-button]')
- .hasAttribute('title');
- assert.equal(btn.title, 'Send invitation');
+ .exists()
+ .hasAttribute('title', 'Send invitation');
});
test('it renders reject button as primary btn with title reject request', async function (assert) {
@@ -284,18 +277,11 @@ module(
await render(
hbs`
`
);
- assert.dom('[data-test-pending-request-reject-button]').exists();
- const btn = this.element.querySelector(
- '[data-test-pending-request-reject-button]'
- );
- assert
- .dom('[data-test-pending-request-reject-button]')
- .hasClass('is-primary');
assert
.dom('[data-test-pending-request-reject-button]')
- .hasAttribute('title');
- assert.equal(btn.title, 'Reject request');
+ .exists()
+ .hasAttribute('title', 'Reject request');
});
}
);